I am trying to start an interactive shell with a docker container I have. I wish to run docker exec as follows:
➜ ~ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a6e4b07ed32d da34aa05cadd "/bin/sh" 20 minutes ago Exited (0) 2 minutes ago blissful_williamson
➜ ~ docker start a6e4b07ed32d
a6e4b07ed32d
➜ ~ docker exec -it a6e4b07ed32d bash
Error response from daemon: Container a6e4b07ed32d1db3697b1afb5494230176c72503fccd8196785c651a4549201a is not running
What do I need to do in order to make sure the container is running, so that I can use docker exec to start a shell with it? As far as I know docker start should make sure the container is running.
docker startcommand should start the container, but there are some questions around here, is your container running a one-time process or is it configured to run continuously, also is there anything incapacitate your container from running? You should put more detailed information. You can retrieve detailed information withdocker inspect <container>,docker logs <container>commands, also you can put your Dockerfile.