Search code examples
node.jsdockerdocker-composedockerfiledocker-machine

OCI runtime exec failed: exec failed: container_linux.go:344: starting container process


When i run the below command

$ docker container exec -it nginx1 ping nginx2 

This is the error which i faced :

OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "exec: \"ping\": executable file not found in $PATH": unknown

How to resolve this issue ?


Solution

  • Before reading this answer just let you know, it's my 2nd day of learning docker, It may not be the perfect help for you.

    This error may also occur when the ping package is not installed in the container, I resolved the problem as follow, bash into the container like this

    docker container exec -it my_nginx /bin/bash
    

    then install ping package

    apt-get update
    apt-get install inetutils-ping
    

    This solved my problem.