docker: Error response from daemon: OCI runtime create failed: container_ linux. Go: 380 error reporting solution
Docker installs mysql5.0 7 fails to run and reports OCI runtime create failed
Pull mysql5 on docker 7 no problem
execute the code and report an error
docker run -p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7
CD goes to/mydata/MySQL/conf and finds that it is not mounted correctly, and there is no file path of/etc/MySQL
Error reason: the docker version needs to be downgraded or reinstalled because of the compatibility between Linux and docker
There are two solutions:
Reinstall the docker of the specified version and demote the docker to the specified version
The first method: uninstall and reinstall:
//Step 1: Uninstall docker
//List the packages downloaded by docker
sudo yum list installed | grep docker
//remove all the above related installed packages sudo yum -y remove "above show related packages"
sudo yum -y remove docker-ce.x86_64
sudo yum -y remove docker-ce-cli.x86_64
// Remove related images and containers
sudo rm -rf /var/lib/docker
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
// Test for deletion of
docker -v
// Step 2: reinstall the specified version of docker
// Install some necessary system tools.
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
// Add software source information: sudo yum-config -y
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
//Update the yum cache.
sudo yum makecache fast
//View the available versions of Docker-ce: sudo yum list docker-ce
yum list docker-ce --showduplicates | sort -r
// If you need to show only table versions, you can turn off the list for test versions: yum list
sudo yum-config-manager --enable docker-ce-edge
sudo yum-config-manager --enable docker-ce-test
//Update the yum package index
yum makecache fast
//Install the specified version of docker-ce: sudo yum install -y docker-ce
sudo yum install -y docker-ce-17.03.2.ce-1.el7.centos
// Error: If the installation of the specified version of docker shows that the specified version of the docker-ce-selinux dependency package needs to be installed, please install.
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
Then pull MySQL again
docker pull mysql:5.7
The second method: downgrade docker to the specified version:
//Stop docker
sudo systemctl stop docker
//Enter the downgrade command
yum downgrade --setopt=obsoletes=0 -y docker-ce-17.03.2.ce-1.el7 docker-ce-selinux-17.03.2.ce-1.el7 containerd.io
//Checking the docker version
docker -v
Recreate the container and start
docker run -p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7
success!!
Read More:
- [Solved] OCI runtime create failed: /usr/bin/nvidia-container-runtime did not terminate successfully: unknown
- [Solved] OCI runtime create failed: runc create failed: unable to start container process:
- Linux Virtual Machine Boot Container: Error response from daemon: driver failed programming external connectivity on endpoint
- The docker export container cannot be run after being imported: error response from daemon: no command specified
- [Solved] Docker Filed to Start Container: Error response from daemon: network XXX not found
- Docker Start Container Error: Error response from daemon: task already exists: unknown
- [Solved] Win 10 VS Code Connect to the container of the server error: Cannot connect to the Docker daemon at … Is the docker daemon running
- How to Solve Docker delete container image error: Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced)
- Docker pull Command Error response from daemon: Head https://registry-1.docker.io/v2/library/
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- [Solved] Docker Staratup Error: Failed to start Docker Application Container Engineadsafdsad.
- Docker Startup Error: standard_init_linux.go:211: exec user process caused “no such file or directory”
- [Solved] Docker Download Mirror Error: Cannot connect to the Docker daemon at…
- [Solved] Docker error: “unknown runtime specified NVIDIA” using GPU“
- [docker][issue]Error response from daemon: mkdir xxx: file exists: unknown
- Docker Error: error invoking remote method ‘docker-start-container‘: error: (http code 500) server error –
- [Solved] Error response from daemon: manifest for nvidia/cuda:latest not found: manifest unknown: manifest
- [Solved] docker Startup Error: Job for docker.service failed because the control process exited with error code
- [Solved] Go use zoom to connect DM database and start reporting error in Linux
- [Solved] Job for docker.service failed because the control process exited with error code. After changing the docker configuration