Back to Tutorials
Container Logs and Terminal
Stream live logs from a container, filter output, and open an interactive terminal session.
Prerequisites
- Docker is running
- A running container exists
Scenario 1: View Live Logs
- Click Containers in the sidebar
- Click a running container to open its detail view
- The log view opens automatically, streaming logs in real-time
- Use the Search field to filter logs by keyword — matching lines are highlighted
- Toggle Timestamps to show/hide log timestamps
- Toggle Auto-scroll to pin the log view to the bottom as new lines arrive
- Click Clear to clear the log view (does not delete actual logs)
Scenario 2: Open a Terminal Session
- Find the running container in the Containers list
- Click the terminal icon on the container row (tooltip: "Open Terminal")
- A terminal session opens using
docker exec -it <container-id> /bin/sh - If the container has bash installed, the shell may be
/bin/bashinstead - Run commands inside the container:
shellsession
/ # ls /
bin dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
/ # ps aux
PID USER TIME COMMAND
1 root 0:00 nginx: master process nginx -g daemon off;
29 nginx 0:00 nginx: worker process- Type
exitor press Ctrl+D to close the terminal session
Scenario 3: Debug a Failing Container
- Notice a container with a red "Exited" badge
- Click the container to open Inspect
- Click the container to open the log view and see error output:
log
2026-02-20 10:32:45 Error: Cannot find module '/app/server.js'
2026-02-20 10:32:45 at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)- The error reveals the issue — the expected file is missing from the mount
- Fix the file on the host, then right-click the container and click Start
What You'll See
- Logs appear in a monospace font with optional timestamps
- The search field highlights matches within the log stream
- The terminal provides a fully interactive shell session
- Log filtering works on the client side — all logs are fetched and filtered locally
Tips
- Log streaming uses the Docker API's
logsendpoint withfollow=true - Very long-running containers may produce large log volumes — use the search/filter to find relevant entries
- If the terminal shows "OCI runtime exec failed: unable to start container process: exec: /bin/sh: not found", the container may use a distroless image with no shell
- You can open multiple terminal sessions to the same container simultaneously