报错如下:docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting “/var/lib/docker/containers/c66b4d3d24dae3eda2a7b949cc8d26d6bdabe57909d3422e1f38348d72927385/resolv.conf” to rootfs at “/etc/resolv.conf” caused: mount through procfd: possibly malicious path detected – refusing to operate on /etc/resolv.conf: unknown.
排除掉版本冲突以后
解决如下:

sed -i 's/ -H unix:\/\///' /usr/lib/systemd/system/docker.service
sed -i 's/ -H fd:\/\///' /usr/lib/systemd/system/docker.service 
systemctl daemon-reload 
rm -fr /var/lib/docker

vim /etc/docker/daemon.json 添加:

{
"registry-mirrors": ["https://d8b3zdiw.mirror.aliyuncs.com"]
}

然后重启docker

转载自:https://blog.csdn.net/arcow/article/details/118582289

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐