Linux Labs

Containers: Docker and compose / Stage 5 of 11 · step 6 of 7

Data after re-creation

medium ~20 min
Not running Starting usually ~20 s
Report a problem

Situation

The on-call shift keeps its notes in the notes application. It runs in a Docker container of the same name and lists the notes since the start of the month on port 8080. Last night a colleague updated the application to version 1.1: they removed the container and created a new one from the notes:1.1 image with the same port, NOTES_TITLE variable and restart policy. The container is running, but this morning curl http://localhost:8080/ shows notes: 0.

Run docker commands with sudo: the student user has no direct access to Docker. The machine has no internet access; the notes:1.0 and notes:1.1 images are already built.

Task

  1. http://localhost:8080/ answers with version 1.1 of the application and shows all the notes that existed before the update.
  2. The notes container keeps the notes where they were before the update and has no extra volumes.
  3. The earlier notes are unchanged.
  4. notes runs with the same port, NOTES_TITLE and restart policy as before: it will come up by itself after the machine reboots.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 4
  • http://localhost:8080/ answers with notes 1.1 and shows all the notes that existed before the update — not checked yet
  • The notes container keeps the notes where they were before the update and has no extra volumes — not checked yet
  • The earlier notes are unchanged — their checksums match — not checked yet
  • notes runs with the same port, NOTES_TITLE and restart policy as before — it will come up by itself after a reboot — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…