Warning: Stopping docker.service, but it can still be activated by: docker.socket解决方案
Warning: Stopping docker.service, but it can still be activated by:docker.socke遇到启动docker容器后执行关闭docker发现还有容器在运行的解决措施
问题描述:
当容器开启自动启动时,我们想要关闭docker的时候发现会出现:
Warning: Stopping docker.service, but it can still be activated by: docker.socket
原因:This is because in addition to the docker.service unit file, there is a docker.socket unit file… this is for socket activation. The warning means if you try to connect to the docker socket while the docker service is not running, then systemd will automatically start docker for you. You can get rid of this by removing /lib/systemd/system/docker.socket… you may also need to remove -H fd:// from the docker.service unit file.
也就是:这是因为除了docker.service单元文件外,还有一个docker.socket单元文件…这是用来激活socket的。这个警告意味着如果你在docker服务没有运行的情况下尝试连接docker套接字,那么systemd会自动为你启动docker。
1.解决方案一
你可以通过删除/lib/systemd/system/docker.socket来解决这个问题…你可能还需要从docker.service单元文件中删除-H fd://。
2.解决方案二:
输入以下命令:systemctl stop docker.socket
更多推荐
所有评论(0)