WSL2 Ubuntu18运行docker run报错:docker: Error response from daemon: OCI runtime create fail

环境:WSL2 + Ubuntu18
win10 版本号:1809
docker版本:

root@zm:/# docker --version
Docker version 19.03.2, build 6a30dfc

运行docker run
具体错误信息如下:

root@zm:~# docker run hello-world
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:303: getting the final child's pid from pipe caused \"EOF\"": unknown.
ERRO[0003] error waiting for container: context canceled

参考这篇文章:https://www.jianshu.com/p/20ebdbf68744
说是docker版本和 win10版本不兼容的问题,
之后直接降级docker就正常了,
命令如下:

 apt install -y --allow-downgrades docker-ce=18.06.1~ce~3-0~ubuntu

降级后查看docker版本:

root@zm:/# docker --version
Docker version 18.06.1-ce, build e68fc7a

启动docker,OK了

-----------------------------------------------------------------------------------
蛋疼,docker pull的时候发现还是不能正常运行,报错如下:

failed to register layer: Error processing tar file(exit status 1): link /var/lib/yum/yumdb/G/1017448244ce3b6fea28b6b9eceb8b10e3114253-GeoIP-1.5.0-13.el7-x86_64/installed_by /var/lib/yum/yumdb/p/7efdb522ba267abe97246b9cbffe08b2d27038b0-plymouth-plugin-two-step-0.8.9-0.31.20140113.el7.centos-x86_64/installed_by: invalid argument

查询了几个博客发现可能还是版本不兼容的问题,
参考:http://stitz.org/running-docker-containers-on-windows-10-home/
继续降级到17.09

你可能感兴趣的:(docker)