简体   繁体   中英

Docker container don't start

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. scr

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:

docker run -it ubuntu:latest

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 use docker ps to see the running container. You can of course exec into it to do something docker exec -it <container> bash . You can stop it docker stop <container> . Re-start it docker start <container> . Finally delete (stopped) it as you don't need it anymore docker container rm <container> .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM