docker-compose up/down just one container

I have not been able to find a way to up/down just one container in a docker-compose.yml file. I can off-course start and stop a single container, but I cannot make changes to a containers configuration between restarts (environment variables, mount points etc.)

What am I missing here? What is the best practice in this case?

Answer

I had this need recently and solved it by having a separate docker-compose-production.yml file to deal with tweaks. Then remember to launch with docker-compose -f docker-compose-production.yml...

Attribution
Source : Link , Question Author : Inquisitor Shm , Answer Author : icarito

Leave a Comment