提交正在使用的容器: docker commit [ContainerId]
提交停止正在运行无法使用Systemctl的容器: docker stop [ContainerId]
删除这个容器(可选): docker rm [ContainerId]

通过刚刚提交的镜像重启容器, 注意启动命令

docker run -itd --name dev-centos --privileged=true dev/centos:latest /usr/sbin/init

注意: 一定要加上 --privileged=true

exec进入交互终端: docker exec -it dev-centos /bin/bash

使用systecmctl

相关文章:

  • 2021-07-18
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2021-06-05
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-10
  • 2021-10-22
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案