Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Devops
  3. Question
Devops

How to rebuild docker container in docker-compose.yml?

Asked by Nicholas Walsh Jul 15, 2021 3.0K views 1 answer
Share

About this question

 So I learned that there are a lot of services that are defined  docker-compose.yml. I started a few of these services. I want to create only one of these and then start it up without using the other services 

These are the commands I have run :

docker-compose up -d # run all services
docker-compose stop nginx # stop only one. but it still running !!!
docker-compose build --no-cache nginx 
docker-compose up -d --no-deps # link nginx to other services


I got a nginx container by the end and I also learned that docker-compose will not kill all running containers! How docker rebuild container?

 

Your answer

1 Answer

More Devops discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest DevOps Blogs

Guides, tips and career advice on DevOps from JanBask experts.