OCI runtime exec failed: exec failed: container_linux.go:344: starting container process
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.
Please use alpine image of nginx:
docker container run -d --name my_nginx_name nginx:alpine
docker container run -d --name my_nginx_name2 nginx:alpine
Then try to ping using below command:
docker container exec -it my_nginx_name ping my_nginx_name2
This something I came across recently. When ran a docker container with a custom name and if we put an command/option(s)/etc after the name, that would be passed to the container as commands. So in here container tried to find the ping command inside it but couldn't, So as the above answer you must install the inetutils-ping
inside the container and run the command