Docker容器开机自动启动

1)使用ststemctl命令

  #systemctl enable docker
2)将Docker的docker.service服务移动到系统服务中
  # cp /usr/lib/systemd/system/docker.service /etc/systemd/system/
  # systemctl daemon-reload
  # systemctl restart docker
  # ll /etc/systemd/system/multi-user.target.wants/docker.service

原文地址:https://www.cnblogs.com/cyjch/p/9803733.html