Warning: Stopping docker.service, but it can still be activated by: docker.socket

Scroll Down

Linux停止docker服务报错

问题

ubuntu执行systemctl stop docker命令报错:

Warning: Stopping docker.service, but it can still be activated by:
  docker.socket

解决办法

删除/lib/systemd/system/docker.socket文件夹

rm -rf /lib/systemd/system/docker.socket

或者

# 关闭docker自启动
sudo systemctl stop docker.socket