23/53
Sign inSign up free

839. Configure hadolint for the Team

medium 20 XP ~10 minHands-on lab

Labs have no container engine, so nothing is built: your files are checked by reading them. hadolint is installed.

CI runs hadolint Dockerfile in /home/student/projects/gateway (hadolint reads .hadolint.yaml from there), and it fails. The team agreed:

  1. Pinning apt package versions (DL3008) is not required in this project.
  2. Unpinned pip install (DL3013) is accepted only for the one existing pip install line, not anywhere else.
  3. Images may only come from docker.io and registry.example.com. Images from other registries are mirrored to registry.example.com/mirror/<original path> with the same tag.
  4. Only warnings and errors fail the build; info and style findings don't.

Task

Create .hadolint.yaml (rules 1, 3 and 4) and change the Dockerfile (rules 2 and 3), so that hadolint Dockerfile passes. Don't ignore any other rule.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.