Linux Labs

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

A new image version

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

Situation

The team's status page runs in the app container on port 8080: this is version 1.0, the app:1.0 image. A developer prepared version 1.1: its files and Dockerfile are in ~/app. He did not get to build the image — the build kept failing for him.

Run docker commands with sudo: the student user has no direct access to Docker. There is no internet on the machine, and the busybox image is already loaded.

Task

  1. The app:1.1 image is built from the ~/app directory: sudo docker build ~/app succeeds and gives an image with the same layers.
  2. Container app runs from the app:1.1 image and is not restarting.
  3. curl http://localhost:8080/ gets the version 1.1 page from container app.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 3
  • The app:1.1 image is built from ~/app — building that directory gives an image with the same layers — not checked yet
  • Container app runs from the app:1.1 image and is not restarting — not checked yet
  • http://localhost:8080/ serves the version 1.1 page from container app — 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…