How to exit after a while? What's the reason?

Alibaba cloud Q & A 2022-02-13 06:22:46 阅读数:334

exit reason

docker exec -it bash Automatically quit

After entering the container , In a few seconds, he automatically quit . I want to ask why

Take the answer 1:

Hello! , The foreground process in the container hung up , And you set it again restart=always or restart=unless-stopped, Will start repeatedly -> Hang up -> sign out -> Cycle between restarts .

If you are sure that there is a foreground process in your image 、 Or you are docker run Other foreground processes are specified at the time of , Then you can docker inspect Take a look at the log path for analysis .

copyright:author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you.