Hi I’ve got a problem with docker. I’m using it on s390x Debian, everything was working fine but now i can’t start my containers. Old containers are working but when i create new container using for example: docker run ubuntu
then i’m trying docker start [CONTAINER]
my container don’t start. When i use docker ps -a
I’ve got all of my containers, but after when I use docker ps
i can’t see my new container. As you can see on scr. I created container with name practical_spence and ID 3e8562694e9f but when i use docker start
, it’s not starting. Please help.
2
Answers
As you do not specify a CMD or entrypoint to run, the default is used which is set to
"bash"
. But you are not running the container in interactive terminal mode, so the bash just exits. Run:to attach the running container to you terminal. Or specify the command you want to run in the container.
You container did start but exit instantly as it has nothing to do. You can start like this
docker run -d ubuntu sleep infinity
. Then usedocker ps
to see the running container. You can of course exec into it to do somethingdocker exec -it <container> bash
. You can stop itdocker stop <container>
. Re-start itdocker start <container>
. Finally delete (stopped) it as you don’t need it anymoredocker container rm <container>
.