From the course: Docker for Developers: Create and Manage Docker Containers

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Inspecting containers

Inspecting containers

- [Instructor] Inspecting Docker containers is a crucial part of understanding what's running in your environment. Whether you're debugging, checking resource usage, or exploring configuration details, Docker gives you a few great ways to peek inside a container. Let's walk through how to do that using the CLI, the Docker Desktop GUI, and the container tools extension for VS Code. I'm here in a TERMINAL in VS Code. You should still have a container running from the previous video. If you don't, go ahead and type docker run, the -d flag, then the -p flag, and map port 8080 on the host to port 80 inside the container, and we finish with the name of the image you want to use, which is nginx. Let's start by listing our running containers using the docker ps command. We can use this to get the CONTAINER ID and name to use in the next command. Copy either the CONTAINER ID or name, type docker inspect, and then paste…

Contents