docker build报错getting the final child's pid from pipe caused \"EOF\"": unknown解决

文章目录

    • 报错
    • 内核版本
    • 升级内核版本
    • 报错已修复
    • 参考

报错

升级到docker19.03.7版本后,执行docker build时报错OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:319: getting the final child's pid from pipe caused \"EOF\"": unknown,如下:

[root@master]# docker build -t wordpress-freetype:4.9.8 .
Sending build context to Docker daemon  792.7MB
Step 1/3 : FROM wordpress:4.9.8
 ---> 67daae3fda61
Step 2/3 : RUN echo 'deb http://mirrors.163.com/debian/ stretch main contrib non-free\ndeb http://mirrors.163.com/debian/ stretch-updates main contrib non-free\ndeb http://mirrors.163.com/debian/ stretch-backports main contrib non-free' > /etc/apt/sources.list
 ---> Running in 42917f3d1011
OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:319: getting the final child's pid from pipe caused \"EOF\"": unknown

内核版本

uname -a看到内核版本为3.10.0-862.el7.x86_64
在这里插入图片描述
docker version看到的版本信息如下:

[root@master]# docker version
Client: Docker Engine - Community
 Version:           19.03.7
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        7141c199a2
 Built:             Wed Mar  4 01:24:10 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.7
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       7141c199a2
  Built:            Wed Mar  4 01:22:45 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

看到runc版本感觉很怪异,居然是dev,又问了其他已装docker19.03.7的大佬,发现我安装的版本不对,那就卸载重装呗。

docker正确卸载安装方式可以移步:正确卸载和重装docker的方式

正确卸载重装后:

[root@master]# docker version 
Client: Docker Engine - Community
 Version:           19.03.7
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        7141c199a2
 Built:             Wed Mar  4 01:24:10 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.7
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       7141c199a2
  Built:            Wed Mar  4 01:22:45 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

如果docker安装没问题的话,很有可能是内核版本的原因。

升级内核版本

升级内核版本到最新版,请参考:升级Centos7/6内核版本到5.5.8的方法

注意:这里只是测试,最新版本可能会有更多的坑等着你。不建议生产上直接用。

升级后,查看内核版本:

[root@master ~]# uname -ra
Linux master 5.5.8-1.el7.elrepo.x86_64 #1 SMP Tue Mar 3 18:13:28 EST 2020 x86_64 x86_64 x86_64 GNU/Linux

报错已修复

docker build报错getting the final child's pid from pipe caused \

参考

升级Centos7/6内核版本到5.5.8的方法
Get Docker Engine - Community for CentOS

你可能感兴趣的:(docker build报错getting the final child's pid from pipe caused \"EOF\"": unknown解决)