Reputation: 4990
I am trying to get a shell inside the Docker container moul/phoronix-test-suite on Docker Hub using this command
docker run -t -i moul/phoronix-test-suite /bin/bash
but just after executing the command (binary file), the container stops and I get no shell into it.
[slazer@localhost ~]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0993189463e6 moul/phoronix-test-suite "phoronix-test-suite " 7 seconds ago Exited (0) 3 seconds ago kickass_shockley
It is a ubuntu:trusty
container. How can I get a shell into it, so that I can send arguments to the command phoronix-test-suite?
Upvotes: 3
Views: 2295
Reputation: 1323025
docker run -t -i moul/phoronix-test-suite /bin/bash
will not give you a bash (contrary to docker run -it fedora bash
)
According to its Dockerfile, what it will do is execute
phoronix-test-suite /bin/bash
Meaning, it will pass /bin/bash
as parameter to phoronix-test-suite
, which will exit immediately. That leaves you no time to execute a docker exec -it <container> bash
in order to open a bash in an active container session.
Upvotes: 5
Reputation: 19
Have you tried restarting your docker? It might need to restart or even reboot the host.
Upvotes: -1