Running containers is just the beginning.
In real-world scenarios, you will often need to peek inside the running containers to debug issues, inspect files, or execute additional commands.
This is where the docker exec
command becomes your best friend for container troubleshooting and exploration.
In this challenge, a Python API server is already running in a container called app-1
.
The application serves its main endpoints on 0.0.0.0:8080
but also opens a special debugging interface on 127.0.0.1:9000/debug
.
Since the debugging port is opened on localhost, it can only be accessed from within the container.
Your mission is to:
- Start an interactive shell inside the running
app-1
container. - Query the debugging endpoint to inspect the application's state.
Good luck!
Hint 1: Starting an interactive shell 💡
The docker exec
command allows you to execute arbitrary commands inside a running container.
To start an interactive shell session, you typically need to:
- Use the
-i
flag for interactive mode - Use the
-t
flag to allocate a pseudo-TTY - Specify the container name or ID
- Specify the shell to run (like
bash
orsh
)
Try running docker exec --help
to see the exact syntax or check this tutorial for more details.

Hint 2: Installing packages in the container 💡
While it's not a good practice to install packages in the containers on the fly, sometimes, you'll have to do it to complete your debugging or troubleshooting task.
If the target container does not have an HTTP client installed,
you can install curl
using the following command:
apt update && apt install -y curl
Level up your Server Side game — Join 11,000 engineers who receive insightful learning materials straight to their inbox