首页 > 解决方案 > 无法在 CentOS 中使用 docker run 命令

问题描述

这是我的 Docker 信息:

root$
root$ docker info
Containers: 10
 Running: 0
 Paused: 0
 Stopped: 10
Images: 4
Server Version: 18.02.0-ce
Storage Driver: devicemapper
 Pool Name: docker-253:0-604346318-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 10.74GB
 Backing Filesystem: xfs
 Udev Sync Supported: true
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Data Space Used: 1.305GB
 Data Space Total: 107.4GB
 Data Space Available: 57.11GB
 Metadata Space Used: 4.178MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.143GB
 Thin Pool Minimum Free Space: 10.74GB
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: true
 Deferred Deleted Device Count: 0
 Library Version: 1.02.140-RHEL7 (2017-05-03)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9b55aab90508bd389d7654c4baf173a981477d55
runc version: N/A (expected: 9f9c96235cc97674e935002fc3d78361b696a69e)
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-229.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 11.58GiB
Name: vmb2bcloud1
ID: WEXL:TIDY:RIX2:E2E2:TEPJ:VQ2E:WFVS:VTYK:X73D:WYBX:Z3TN:OC22
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: harishdamu
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
         Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

每次使用该命令时,docker run hello-world我都会收到错误消息:

root$ docker run hello-world
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/3a0643f1b0f1452b97acb3fc0b72797b94e200f6a56a94a63dde0de531851df7/log.json: no such file or directory): docker-runc did not terminate sucessfully: unknown.
ERRO[0000] error waiting for container: context canceled

我该如何解决这个问题?

标签: linuxdocker

解决方案


由于缺乏系统信息。这个问题可能会有所帮助。

只有 Docker 能够支持当前版本的 CentOS。

[ https://github.com/moby/moby/issues/35972#issuecomment-356581500]


推荐阅读