Answer the question
In order to leave comments, you need to log in
How to organize joint work of docker containers?
Tell me please. I have deployed the app in a container via docker compose. The task is to create several more containers with the same settings. When I run in another docker compos container, some apps don't deploy because they say the ports are already in use. I take the same image from the git. How to make the application run in other containers at the same time
Answer the question
In order to leave comments, you need to log in
You can leave the internal ports the same and change only the binding to the localhost. Localhost Port: Container Port
app1:
ports:
- '3001:3000'
app2:
ports:
- '3002:3000'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question