由于“卸载前无法运行auplink”错误,无法运行docker build

当我运行docker build我得到这个:

 Sending build context to Docker daemon 10.24kB WARN[11935] Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/21647778a50f097d4535246ec5206960dd909f4bb8b0e3d04fdd53a7402fc2de-init: exec: "auplink": executable file not found in $PATH Step 1/2 : FROM debian:jessie ---> 86baf4e8cde9 Step 2/2 : RUN apt-get update WARN[11935] Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/21647778a50f097d4535246ec5206960dd909f4bb8b0e3d04fdd53a7402fc2de: exec: "auplink": executable file not found in $PATH ---> Running in 1fef9bef5bf7 ERRO[11934] containerd: start container error="shim error: fork/exec /usr/bin/docker-runc: exec format error" id=1fef9bef5bf77141a97669d2aa785e74f9027a849919a937f714e93fbae3916d ERRO[11935] Create container failed with error: shim error: fork/exec /usr/bin/docker-runc: exec format error ERRO[11934] containerd: deleting container error="fork/exec /usr/bin/docker-runc: exec format error: \"\"" WARN[11935] Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/21647778a50f097d4535246ec5206960dd909f4bb8b0e3d04fdd53a7402fc2de: exec: "auplink": executable file not found in $PATH shim error: fork/exec /usr/bin/docker-runc: exec format error 

这里是我的Dockerfile的内容:

 FROM debian:jessie RUN apt-get update 

有什么问题? 这对我没有任何意义。

 ll /usr/bin | grep docker -rwxr-xr-x 1 root root 18471276 Aug 3 22:08 docker* -rwxr-xr-x 1 root root 9938352 Aug 3 22:08 docker-containerd* -rwxr-xr-x 1 root root 8941944 Aug 3 22:08 docker-containerd-ctr* -rwxr-xr-x 1 root root 3824920 Aug 3 22:08 docker-containerd-shim* -rwxr-xr-x 1 root root 40328816 Aug 3 22:08 dockerd* -rwxr-xr-x 1 root root 0 Aug 3 22:08 docker-init* -rwxr-xr-x 1 root root 0 Aug 3 22:08 docker-proxy* -rwxr-xr-x 1 root root 0 Aug 3 22:08 docker-runc* -rwxr-xr-x 1 root root 8962864 Aug 3 21:40 docker-volume-local-persist* 

从https://docs.docker.com/engine/installation/linux/docker-ce/binaries/安装

file $(which docker-runc)

 /usr/bin/docker-runc: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=e3d80e183baf26a9d48c3f0435931d42aa1bf340, not stripped 

lsb_release -a

 Distributor ID: Ubuntu Description: Ubuntu 17.04 Release: 17.04 Codename: zesty 

docker工人 – 版本

 Docker version 17.06.0-ce, build 02c1d87 

dockerd –version

 Docker version 17.06.0-ce, build 02c1d87 

docker集装箱 – 版本

 containerd version 0.2.3 commit: cfb82a876ecc11b5ca0977d1733adbe58599088a 

docker-containerd-ctr –version

 ctr version 0.2.3 commit: cfb82a876ecc11b5ca0977d1733adbe58599088a 

docker-init –version

 tini version 0.13.0 - git.949e6fa 

docker-runc –version

 runc version 1.0.0-rc3 commit: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4 spec: 1.0.0-rc5 

这是在非Intel / ARM 64位Ubuntu上运行吗? 例如树莓派或ARM64 CPU? 这个错误:

shim error: fork/exec /usr/bin/docker-runc: exec format error

这意味着(a)您的计算机上的二进制安装以某种方式损坏,或者(b)您尝试为系统上的其他体系结构运行二进制文件。

你可以发布uname -afile /usr/bin/docker-runc吗? 这可能有助于缩小问题的根源。

它看起来像一些有关aufs FS,你使用什么操作系统? 和你最近更新你的机器?

更新:

对于CONFIG_MEMCG_SWAP_ENABLED: missing, CONFIG_RT_GROUP_SCHED: missing and warning: /proc/config.gz does not exist, searching other paths for kernel config ...

这些都缺less内核configuration和标志,请确保你安装了linux-image-extra-$(uname -r) linux-image-extra-virtual ,首先确保你停止了docker守护进程sudo systemctl stop docker并安装这些软件包(包含额外的驱动程序,支持容器和aufs检查docker文档https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu ):

sudo apt-get install \ linux-image-extra-$(uname -r) \ linux-image-extra-virtual

并更新您的grub GRUB_CMDLINE_LINUX_DEFAULT将这些cgroup_enable=memory swapaccount=1到您的/etc/default/grubconfiguration文件,然后更新您的grub sudo update-grub检查https://github.com/moby/moby/issues/4250 && https: //github.com/moby/moby/pull/4251

对于aufs问题,现在的aufs有另一种解决scheme,因为docker从aufs移动到overlay2overlay2是configuration你的机器并应用overlay但是确保你备份了你的docker镜像和容器,因为这个修复可能会让你失去它们检查无法启动Docker服务在Ubuntu 16.04