Getting below error when trying to run docker
[root@localhost ~]# sudo docker run hello-world
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/4aae56811e04e2a75ade1817c465fc8873680e0e524c7a712cf3a79581baec70/log.json: no such file or directory): runc did not terminate successfully: exit status 127: unknown.
looks like docker can’t find runc(OCI runtime).
How did you install the docker?
could share output of these commands:
which runc
docker info
I think you will likely need to do yum update and docker reinstall
Thanks for the response, please find below details,
[root@localhost ~]# which runc
/usr/bin/runc
[root@localhost ~]# sudo systemctl start docker
[root@localhost ~]# sudo docker run hello-world
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/9ac5c6b46bd1e596b14000763cc60d547d986b7bfbc31cf56d65695d888dedf5/log.json: no such file or directory): runc did not terminate successfully: exit status 127: unknown.
[root@localhost ~]# docker info
Client: Docker Engine - Community
Version: 26.1.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.14.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.27.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 8
Running: 0
Paused: 0
Stopped: 8
Images: 3
Server Version: 26.1.3
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
runc version: N/A (expected: )
init version: de40ad0
Security Options:
seccomp
Profile: builtin
Kernel Version: 4.18.0-80.el8.x86_64
Operating System: CentOS Linux 8 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.849GiB
Name: localhost.localdomain
ID: 482796be-e468-4957-8fda-ae9f8871e01b
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
To quote from the docs:
Prerequisites
OS requirements
To install Docker Engine, you need a maintained version of one of the following CentOS versions:
- CentOS 9 (stream)