Linux Labs

Containers: Docker and compose / Stage 2 of 11

Ports, variables and restart

Not running Starting usually ~20 s
Leave the lesson

Step 5 of 8 · on a machine · 4 min

Experiment: a queue that comes back by itself

New conditions: the container already has settings, and they must not be lost.

The queue container from the worker:1 image runs in prod mode. It must come back by itself when its process crashes or the docker service restarts, and stay stopped when someone stops it by hand with docker stop. The prod mode must be kept.

Exercise · do it

The queue comes back by itself

Make the queue container come back by itself after its process crashes and after the docker service restarts, but stay stopped after docker stop. It must keep the prod mode.

Sign in and start The machine is available after signing in

Goals · 0 of 3

  • Make queue come back after failures not done yet
  • Keep the prod mode not done yet
  • Keep queue running on the worker:1 image not done yet

Step goals

0 of 3
  • Make queue come back after failures — not done yet
  • Keep the prod mode — not done yet
  • Keep queue running on the worker:1 image — not done yet
Ubuntu 24.04

Step goals

0 of 3
  • Make queue come back after failures — not done yet
  • Keep the prod mode — not done yet
  • Keep queue running on the worker:1 image — not done yet
Loading…