Tag Archives: oci runtime error

How to Solve docker run Error: oci runtime error

When deploying a new server to run the docker image, an error is encountered. Record the solution

The docker startup container reports an error: error response from daemon: OCI runtime error: container_linux.go:247: starting container process caused “process_linux.go:258: applying cgroup configuration for process caused \”Cannot set property TasksAccounting

docker   Yes via yum   install   I searched the docker installation because of the compatibility between Linux and docker. Then uninstall the old version and try installing the latest version

0. Check your current kernel version through the uname – R command

uname -r

1. Use  root   Log in to CentOS with permissions. Ensure that the yum package is up to date

sudo yum update

2. Uninstall the old version (if the old version has been installed)

sudo yum remove docker  docker-common docker-selinux docker-engine

 

3. Install the required software package,   Yum util provides the yum config manager function, and the other two are dependent on the devicemapper driver

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

4. Set Yum source

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

5. You can view all docker versions in all warehouses and select a specific version to install

yum list docker-ce --showduplicates | sort -r

>>>

6.installer docker

sudo yum install docker-ce

7. Start and add startup

sudo systemctl start dockersudo systemctl enable docker

8. Verify whether the installation is successful (both client and service parts indicate that the docker installation and startup are successful)

 docker version
  After the above operation, pull the image and then execute the docker run command, the problem is solved.