Step 6 of 7 · lab · 20 min
Data after re-creation
After the notes application was updated, the list is empty although the container is running. Find the notes and give them back to the application without losing any.
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
http://localhost:8080/answers with version 1.1 of the application and shows all the notes that existed before the update.- The
notescontainer keeps the notes where they were before the update and has no extra volumes. - The earlier notes are unchanged.
notesruns with the same port,NOTES_TITLEand restart policy as before: it will come up by itself after the machine reboots.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 4-
http://localhost:8080/ answers with notes 1.1 and shows all the notes that existed before the update — not done yet
-
The notes container keeps the notes where they were before the update and has no extra volumes — not done yet
-
The earlier notes are unchanged — their checksums match — not done yet
-
notes runs with the same port, NOTES_TITLE and restart policy as before — it will come up by itself after a reboot — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 4-
http://localhost:8080/ answers with notes 1.1 and shows all the notes that existed before the update — not done yet
-
The notes container keeps the notes where they were before the update and has no extra volumes — not done yet
-
The earlier notes are unchanged — their checksums match — not done yet
-
notes runs with the same port, NOTES_TITLE and restart policy as before — it will come up by itself after a reboot — not done yet
Goals are checked on the machine after every command.