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

前端 未结 10 2040
闹比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条回答
  •  旧时难觅i
    2021-01-29 17:49

    For me it only fetched new dependencies from Docker Hub with both --no-cache and --pull (which are available for docker-compose build.

    # other steps before rebuild
    docker-compose build --no-cache --pull nginx # rebuild nginx
    # other steps after rebuild, e.g. up (see other answers)
    

提交回复
热议问题