Tag: 坞员 组成

如何重builddocker-compose.yml中的docker容器?

在docker-compose.yml中定义了服务的范围。 这些服务已经开始。 我只需要重build其中一个,并启动它,而不用其他服务。 我运行以下命令: 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 最后我得到了旧的nginx容器。 顺便docker-compose不会杀死所有正在运行的容器!