我正在尝试从Dockerfile构建一个docker镜像,但看到错误shim error: docker-runc not installed on system
这是我的Dockerfile:
FROM ubuntu
RUN apt-get update \
&& apt-get install -y build-essential \
&& apt-get install -y libssl-dev libbz2-dev
$ docker build -t ub .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM ubuntu
---> 6a2f32de169d
Step 2 : RUN apt-get update && apt-get install -y build-essential && apt-get install -y libssl-dev libbz2-dev
---> Running in b7574a066f82
shim error: docker-runc not installed on system
Docker版本详细信息:
$ docker version
Client:
Version: 1.12.6
API version: 1.24
Package version: docker-common-1.12.6-16.sl7.x86_64
Go version: go1.7.4
Git commit: 3a094bd/1.12.6
Built: Fri Apr 14 09:57:15 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Package version: docker-common-1.12.6-16.sl7.x86_64
Go version: go1.7.4
Git commit: 3a094bd/1.12.6
Built: Fri Apr 14 09:57:15 2017
OS/Arch: linux/amd64
码头信息:
$ docker info
Containers: 11
Running: 0
Paused: 0
Stopped: 11
Images: 5
Server Version: 1.12.6
Storage Driver: devicemapper
Pool Name: docker-8:2-526997-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 856.8 MB
Data Space Total: 107.4 GB
Data Space Available: 7.817 GB
Metadata Space Used: 1.479 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.146 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.135-RHEL7 (2016-11-16)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge null host overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 3.10.0-229.20.1.el7.x86_64
Operating System: Scientific Linux 7.3 (Nitrogen)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 2
Total Memory: 7.641 GiB
Name: caspgval4
ID: RM5S:3ZWP:VPDC:AFOP:V3PA:XW4B:DMRS:VCB2:Q22K:3GBX:UYZO:EBAK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Insecure Registries:
127.0.0.0/8
Registries: docker.io (secure)
答案 0 :(得分:0)
您的docker安装似乎缺少一些必需的部件。您的安装可能存在错误,或者Scientific Linux安装可能存在安装问题。您可以尝试直接从docker升级到发行版,而不是使用Scientific Linux中的版本,并以root身份运行以下命令:
curl -sSL https://get.docker.com/ | sh