I have a docker container that is not running bash. My docker command to create container was:
docker run -it -d -p 8088:80 containername centos:centos6
Which pulls docker image centos6 from hub. Then run docker start containername
and returns the name of the container, which is on this example, containername
.
If I do docker exec -it containername bash
it says Container xxxxxx is not running, When I check on my docker app, it is shaded grey. Rerun docker start containername
then docker ps -a
it says Container exited 1 second ago.
I read somewhere that the -d (detached mode) will keep the container running but in this case, it does not. This docker run was already used on my computer but I had to reformat due to circumstances. Any help would be appreciated.
question from:
https://stackoverflow.com/questions/66060579/created-docker-container-not-running-bash 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…