Sign in

docker ps - A status exited ( 0 ) 8 minutes ago。

CogSciDawg edited in Thu, 11 Aug 2022

Docker run - it - P 823:823 XXX (project name) executes exit after entering the container. Some items cannot be found in docker PS, and can only be found in docker PS - A. at this time, the status of the container that cannot be found in PS is exited (0) 8 minutes ago



What is the reason for this? Is it because of the exit problem?

3 Replies
commented on Thu, 11 Aug 2022

Enter docker PS - A means to list all containers, including those that are not started. If you want to run in the background, add a - d

commented on Thu, 11 Aug 2022
-a, --all             Show all containers (default shows just running)

Without - A, only the running containers will be displayed

commented on Fri, 12 Aug 2022

In short, the command or program that you execute is completed, and the console container is released to exit. You need to let the program you start not run in the background. It has nothing to do with the - D parameter