我是 Docker 新手。我想在 CentOS Linux 主机上安装 docker-ce。
当我尝试运行我的容器时:
docker run -it hello-world
我收到此错误:
mounting "/var/lib/docker/containers/c467890Xxxxxxxxxxxxxxxxxxxxxxxxxx/resolv.conf" to rootfs at "/etc/resolv.conf" caused:
mount through procfd: possibly malicious path detected
refusing to operate on /etc/resolv.conf: unknown**
如何解决?
答案1
在我的旧 CentOS 7 (3.10.0-229) 上,我通过降级 docker 解决了这个问题。
我关注了这个网站: https://blog.csdn.net/weixin_43798031/article/details/121419229
sudo systemctl stop docker
sudo yum remove docker-ce docker-ce-cli containerd.io
sudo yum install containerd.io-1.3.7-3.1.el7
sudo yum install docker-ce-19.03.4 docker-ce-cli-19.03.4
sudo systemctl start docker