Skip to content

One Container

You'll install Docker on your server and run one service that comes back on its own after a reboot, an update and your own clumsy delete.

About

Containers are how most homelab software ships now. With one compose file and one command, a wiki or a dashboard is up and running. The first one is the hard one because all the words are new, and after that each new service is a copy of the last. This is also the first time something in the lab has to survive without you, which is why the badge ends with you deleting it on purpose. The usual first mistake is leaving out the volume line and losing everything on the first update. Pick something you'll actually use rather than something that looks cool.

At a glance

Per requirement
25 XP
Completion bonus
150 XP
Requirements
6
Takes
One weekend
Skill level
Beginner (done it a few times)
Cost
Free
Supplies
You need some
Where
At home
Other people
On your own
Locked for now
Earn two more Common badges in Homelab & Hardware to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Install Docker and Docker Compose on your server and run the hello-world image. Follow the official docs for your distribution rather than a random blog post. Add your user to the docker group, then log out and back in. Take a screenshot of the hello-world output. Photo
  2. 2
    Write a compose file for one service with a volume for its data. Uptime Kuma, a wiki, a bookmark manager or a recipe app are all good first picks. The volume line is what keeps your data when the container gets replaced. Take a screenshot of the compose file, which should be under thirty lines. Photo
  3. 3
    Bring it up and open it from another device. Run docker compose up -d, then browse to the server's address and port from your phone or laptop. Take a screenshot of the service open in your browser. Photo
  4. 4
    Reboot the server and show that the service came back on its own. That's what the restart: unless-stopped line does for you. Take a screenshot of docker ps after the reboot with the uptime column visible. Photo
  5. 5
    Update the container to a newer image without losing your data. Run docker compose pull, then docker compose up -d. Open the service and check that your data is still there. Take a screenshot of the new version number with your data visible. Photo
  6. 6
    Back up the volume to another disk, delete the container, and bring it back from the copy. Stop the container and copy the volume or the bind-mounted folder to a USB stick or another machine. Then remove the container and its volume on purpose, restore the copy, and run docker compose up -d again. If your data is there, you now know exactly what the volume line was for. Take a screenshot of the service showing your data after the restore. Photo