Containers: Docker and compose / Stage 2 of 11 · step 7 of 8
A service from a container
Not running
Starting
Situation
The team's status page on this machine is served by the status-legacy service on port
8080, version 0.9. The developers sent the new version as the Docker image
status-page:1.0: it holds httpd from busybox and the page itself. The image is already
loaded; now the page has to move into a container.
Run docker commands with sudo: the student user has no direct access to Docker. There
is no internet on the machine.
Task
- Container
statusfrom thestatus-page:1.0image is running and not restarting. curl http://localhost:8080/gets the new page,status-page 1.0, from containerstatus.- After a reboot, port 8080 belongs to container
statusagain: Docker starts at boot, and the old service does not. - The restart policy of
statusisunless-stopped: if the on-call admin stops the container by hand, it does not come back by itself. The page still answers aftersudo systemctl restart docker— the check restarts docker itself.
Lab goals
0 of 4-
Container status from the status-page:1.0 image is running and not restarting — not checked yet
-
http://localhost:8080/ serves the status-page 1.0 page from container status — not checked yet
-
After a reboot, port 8080 goes to the container — docker starts at boot, status-legacy does not — not checked yet
-
The restart policy of status is unless-stopped, and the page answers after a docker restart too — not checked yet
Hints
0 of 3 open · they open one at a time
Hint 1
Show the solution
after 3 failed checks