Mounting the docker centos7 primary reference https://mp.weixin.qq.com/s/cLQwNfNam70cb3qaEGybSQ
Key listed stepped pit
1, docker exec command
Privileged mode start container (non-privileged mode, then centos7.2 start docker [the vessel systemctl start docker
] will be reported Failed to get D-Bus connection: 原因是 非特权模式下 无法使用 systemctl 指令
)
$ docker run -d --name centos7.2 --privileged=true centos:7.2.1511 /usr/sbin/init
Into the container
$ winpty docker exec -it centos7.2 bash
pit
2, systemctl start docker instruction
[root@417f154997f9 /]# journalctl -xe
solve
Lack mkfs.ext4 command, install one, execution
yum install -y e4fsprogs
# Reboot can solve many difficult cases (their play what might accidentally messing up the environment environment variable)