Home > Operation and Maintenance > Docker > How to solve oci error in docker

How to solve oci error in docker

WBOY
Release: 2022-07-25 16:05:34
Original
2623 people have browsed it

Method: 1. Use "docker exec -it container name/bin/bash" to enter the container; 2. Use "apt update && apt install -y iproute2" to update the command resources; 3. Execute "apt-" sequentially get update", "apt install net-tools" and "apt install iputils-ping" commands; 4. Use "exit" to exit the container and re-execute the command.

How to solve oci error in docker

The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.

How docker solves oci errors

Error log

When I use ping, an OCI error is reported:

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ping": executable file not found in $PATH: unknown
Copy after login

How to solve oci error in docker

Solution

1. Enter the container

# docker exec -it 容器名 /bin/bash
docker exec -it tomcat01 /bin/bash
Copy after login

2. Update the command resource

ip addr

apt update && apt install -y iproute2
Copy after login

ping

3. The following needs to be executed one by one in order

apt-get update
apt install net-tools   # ifconfig 
apt install iputils-ping# ping
Copy after login

4. After the update is completed, exit the container and execute it again The required command

exit
Copy after login

How to solve oci error in docker

You can see that it was successful at this time!

Recommended learning: "docker video tutorial"

The above is the detailed content of How to solve oci error in docker. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template