docker保存对容器的修改

docker commit 容器ID 要保存的镜像名称

September 30, 2018 · 1 min · ZhaoGuibin

docker 不能运行 systemctl

docker centos7运行systemctl start nginx 报错: Failed to get D-BUS connection: Operation no permitted 解决方法: 在启动容器的时候添加上-d参数就可以了 docker run -itd --privileged -p 3306:3306 -v /opt/data/:/opt/mysql/data 镜像ID /usr/sbin/init docker exec -it 容器ID /bin/bash

September 30, 2018 · 1 min · ZhaoGuibin