Home > Enterprise >  Update a running container - Docker
Update a running container - Docker

Time:08-26

i have a running container that I want to update, due to some parameters that I add on docker-compose.

tried docker-compose up -d, but didn't work (complains about having the same port).

any solutions or do I have to remove and re-add the container?

CodePudding user response:

Try docker-compose restart or docker-compose down && docker-compose up -d.
The first command simply restarts the container with your new settings.
The second command deletes the old container and creates a new one also with your new settings.

CodePudding user response:

fixed by adding -p [PROJECT NAME] to the docker-compose up

  • Related