Docker Community Forums

Share and learn in the Docker community.

Multiple projects on one Dockerfile and docker-compose.yml

docker

(Vertisan) #1

I’m starting with Docker and in my opinion is great! Now I’m looking solution for this organization:
Now I have this structure:

Applications
| +--app1
| |  +--node_modules   
| |  +--package.json  
| |  +--...  
| +--app2  
| |  +--node_modules
| |  +--package.json  
| |  +--...  
| ....   
| docker-compose.app1.yml
| docker-compose.app2.yml
| ....
| Dockerfile  //my personalized image for all projects

But I want reach this:

Applications
| +--app1  
| |  +--node_modules //empty in host  
| |  +--package.json  
| |  +--docker-compose.app1.yml  //override compose
| |  +--...  
| +--app2  
| |  +--node_modules  //empty in host  
| |  +--package.json  
| |  +--...  
| ....  
| +--node_modules //global node_modules folder (linked to projects)  
| docker-compose.yml //principal compose  
| Dockerfile  //my personalized image for all projects

I thinking too about create one global “server” and link all projects on VHosts but how I’ll get access to each of project?


(Mundimduy2506) #2

is it too late to answer your question but I found this today regarding the same concern as yours.

How to build multiple .netcore projects in one solution.