使用docker运行hello-world时如何解决“等待容器的ERRO [0003]错误:上下文已取消”

时间:2019-04-30 14:00:29

标签: docker ubuntu

我在https://docs.docker.com/install/linux/docker-ce/ubuntu/之后安装了Docker CE。 看来我已经成功安装了它,但是运行hello-world时出现错误。我该如何解决?

我正在使用安装在Chromebook中的Ubuntu 16.04.5 LTS。

(base) (xenial)spkaikai@localhost:/$ docker run hello-world
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:275: applying cgroup configuration for process caused \"open /sys/fs/cgroup/cpuset/docker/cpuset.cpus: no such file or directory\"": unknown.
ERRO[0005] error waiting for container: context canceled 

下面是我的Docker信息。

(base) (xenial)spkaikai@localhost:/$ docker info
Containers: 4
 Running: 0
 Paused: 0
 Stopped: 4
Images: 11
Server Version: 18.09.5
Storage Driver: vfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.18.0-19095-g86596f58eadf
Operating System: Ubuntu 16.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.756GiB
Name: localhost
ID: Y4HI:IBME:EULW:5LU3:Q3ZT:EMEN:LOUU:P7AZ:JMH4:PU7G:6DR5:2SSY
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpuset support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

2 个答案:

答案 0 :(得分:1)

我最近有同样的问题。我只是使用apt-get autoremove docker-ce卸载了docker,然后重新安装了docker-ce。后 一切都很好。所有图像仍然在那里。

答案 1 :(得分:0)

我最近也遇到了同样的问题。在/ usr / local / bin(ctr,containerd *,docker-compose等)中查找旧的废话,然后将其删除。