Search⌘ K

Navigating the Container File System

Explore how to navigate Docker container file systems both when containers are running and stopped. Learn interactive commands like docker exec to inspect and modify files, use snapshots for state saving, and transfer files between containers and hosts. This lesson equips you with practical skills for efficient container file system management.

Interactive navigation

We’ve discussed a lot about reviewing Docker log files and inspecting containers. We’ve also looked at the use of the docker exec command, which aids in exploring a container in interactive mode. Let’s take it further by seeing how we can navigate containers when they’re running and when they’re not.

Interactive navigation of the Docker container file system has to do with exploring a container file system while the container is running.

We spin a container from an image, and then check the status of the container to check if it’s running already. Here’s how we can do that:

docker ps

We can make our container interactive with the following command:

docker exec -it <container_id> sh

When we get into our container, we can try out the following things:

  • Install software: We can install additional ...