当我运行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 --version
Docker version 17.06.0-ce, build 02c1d87
dockerd --version
Docker version 17.06.0-ce, build 02c1d87
docker-containerd --version
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
答案 0 :(得分:0)
它看起来像是与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 ...
这些是缺少的内核配置和标志,请确保安装linux-image-extra-$(uname -r)
linux-image-extra-virtual
,首先确保停止了docker守护程序sudo systemctl stop docker
并安装这些软件包(包含支持容器的额外驱动程序)和aufs check docker docs 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/grub
配置文件中,然后更新您的grub sudo update-grub
支票https://github.com/moby/moby/issues/4250&amp;&amp; https://github.com/moby/moby/pull/4251
对于aufs
问题,现代码头工人有另一种解决方案,因为码头工人从aufs
移至overlay
而overlay2
是配置您的机器并应用overlay
但请确保您备份了泊坞窗图片和容器,因为此修复程序可能会让您丢失它们,请检查Unable to start Docker Service in Ubuntu 16.04
答案 1 :(得分:0)
这是在非Intel / ARM 64位Ubuntu上运行吗?例如Raspberry Pi或ARM64 CPU?这个错误:
shim error: fork/exec /usr/bin/docker-runc: exec format error
意味着(a)您机器上的二进制安装以某种方式损坏,或者(b)您正在尝试为系统上的其他架构运行二进制文件。
您可以发布uname -a
和file /usr/bin/docker-runc
的输出吗?这可能有助于缩小问题的根源。