What changed inside the running container
A web container is using far more CPU than usual. Use docker diff to list files added since it started, then docker top to see what is running from them.
What you’re looking at
A web container is using far more CPU than usual. Use docker diff to list files added since it started, then docker top to see what is running from them.
Your goal: Find the program dropped into a running container, what it is doing, and how it would come back.
- Briefing
- the story: what happened and what evidence you were handed.
- Terminal
- the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
- Walkthrough
- the numbered path. Each step says what to type and what you should see. Hints open one at a time.
- Answer boxes
- under each question step. Type what you found and press Check.
Words you will meet
- CPU
- central processing unit, the processor
- PID
- process ID, the number Linux or Windows gives each running program
Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.
Briefing
The shop-web container on app-02 has been at 100% CPU since last night. Its image is built once and should never change at runtime.
docker diff lists files added (A), changed (C), or deleted (D) in a container compared with its image. docker top shows the processes inside it.
app-02 · Container audit
Type help for the command list and objectives for your tasks. Everything runs in this browser.
Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.
The whole walkthrough
Every step in order, written to be read aloud: 291 words, about 2 min. It gives away every answer, so try the steps first.