Practice the most common runtime debugging actions for a Docker container.
Learn how to inspect container details, open a shell, and restart a container safely.
Confirm which containers are currently active.
Command
docker psExpected Result
You should see one or more running containers.
View detailed JSON information about a running container.
Command
docker inspect <container>Expected Result
You should see container configuration, networking, mounts, and runtime metadata.
Access the running container to inspect files or environment variables.
Command
docker exec -it <container> shExpected Result
You should get an interactive shell inside the container.
Restart the container to simulate recovery after a change or issue.
Command
docker restart <container>Expected Result
Docker should stop and start the container successfully.
Watch logs in real time after the restart.
Command
docker logs -f <container>Expected Result
You should see log output stream live as the app runs.
You can inspect and debug a running Docker container confidently.
You know when to use inspect, exec, restart, and logs together.