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

前端 未结 10 2116
闹比i
闹比i 2021-01-29 17:14

There are scope of services which defined in docker-compose.yml. These service have been started. I need to rebuild only one of these and start it without up other services. I r

10条回答
  •  灰色年华
    2021-01-29 17:42

    This should fix your problem:

    docker-compose ps # lists all services (id, name)
    docker-compose stop  #this will stop only the selected container
    docker-compose rm  # this will remove the docker container permanently 
    docker-compose up # builds/rebuilds all not already built container 
    

提交回复
热议问题