Terminating the Main Process of a Container

Learn how to manage a container by terminating its main process, restarting the container, attaching to its shell, and exiting the container without stopping it.

Earlier in the chapter, we learned that containers are designed to run a single process, and terminating this process also terminates the container. Let’s test if that’s true.

Run the following command to start a new interactive container named ddd-ctr based on the Ubuntu image, specifying Bash as its main process.

Get hands-on with 1300+ tech skills courses.