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

前端 未结 10 2037
闹比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:40

    Simply use :

    docker-compose build [yml_service_name]
    

    Replace [yml_service_name] with your service name in docker-compose.yml file. You can use docker-compose restart to make sure changes are effected. You can use --no-cache to ignore the cache.

提交回复
热议问题