networking - Linking a docker container a subdirectory of another one -


i trying setup multiple docker containers can accessed through 1 main container.

for example:
http://localhost:80 main container
http://localhost:80/site1 separate container
http://localhost:80/site2 separate container again

i know --link flag has been deprecated , new way of doing things using --network flag.

when use --link (for testing) see entry of container linking in hosts file. stuck.

so set above scenario using docker --networking option.

usage case: /site1 might admin area or member website, have them in separate containers can maintain them easier.

the containers apache2 based, if possible refrain editing config files (but can if need to)

how go that?

you should use volumes set in docker-compose.yml this

version: '3.2' services:     container1:         volumes:             - shared-files:/directory/files     container2:         volumes:             - shared-files:/directory/files     container3:         volumes:             - shared-files:/directory/files   volumes:   shared-files: 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -