如何停止 docker service
而不删除( rm
)它?
Commands:
create Create a new service
inspect Display detailed information on one or more services
logs Fetch the logs of a service or task
ls List services
ps List the tasks of one or more services
rm Remove one or more services
rollback Revert changes to a service's configuration
scale Scale one or multiple replicated services
update Update a service
原文由 DenCowboy 发布,翻译遵循 CC BY-SA 4.0 许可协议
在 Docker 中,“服务”的概念表示代表一堆容器抽象的资源。它可以存在或不存在,但您不能“运行”服务。您只能运行容器。因此,您也不能“停止”服务,只能将其删除。