I ran docker run busybox a few times with success.
docker run busybox echo "hello from busybox"
hello from busybox
docker ps -a shows the following:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 59be6eaee13e busybox "echo 'hello from bu…" 2 minutes ago Exited (0) 2 minutes ago lucid_ride 2d1a63cfd696 busybox "echo 'hello from bu…" 4 minutes ago Exited (0) 4 minutes ago quizzical_engelbart 69804c9b7db5 busybox "echo 'hello from bu…" 49 minutes ago Exited (0) 49 minutes ago focused_clarke 65c371540c5d busybox "echo 'hello from bu…" 59 minutes ago Exited (0) 59 minutes ago charming_merkle 2fc6bd074048 busybox "sh" About an hour ago Exited (0) About an hour ago nice_noyce
Trying to use either docker run or docker exec with the name in the Names column instead of the imange name busyboxy.
docker run lucid_ride echo "hello from lucid_ride"
docker: Error response from daemon: pull access denied for lucid_ride, repository does not exist...
docker exec -it lucid_ride echo "hello from lucid_ride"
Error response from daemon: Container 59be6eaee13e4089a5abcccee7fa4778f8b76332e15a0dc2f698057c0368f95f is not running
So, I can run docker run busybox all day and have instances show up in the results of the docker ps -a. But, when I try to use any of the names in the Names column (either with exec or run) it doesn't work. Why is this? Thank you.