Managing the Container Life Cycle
Learn about typical container life cycle events, such as stopping, restarting, and deleting a container, and how these events impact any changes made to the container.
Modifying files within a container
In this lesson, we’ll exec onto the webserver
container and edit the web server configuration to display a new message on the home page. We’ll also stop and restart the container and verify your changes aren’t lost.
Warning: This lesson is for demonstration purposes only. In the real world, you shouldn’t change live containers like this. If you need to change a live container, you should create and test a new container with the required changes and then replace the existing container with the new one.
Open a new interactive session to the webserver
container with the following command:
Get hands-on with 1300+ tech skills courses.