Stop Re-Downloading Packages on Every Build
Labs have no container engine, so nothing is built: your files are checked by reading them.
requirements.txt of audit-log changes almost daily, and every time the CI builder downloads all 400 MB of wheels again. The same happens to the apt packages.
Change /home/student/projects/audit-log/Dockerfile to use BuildKit cache mounts (the files stay out of the image, but survive between builds on the same builder):
# syntax=docker/dockerfile:1,pip install RUN mounts a cache at /root/.cache/pip and no longer uses --no-cache-dir,/var/cache/apt and /var/lib/apt, both with sharing=locked, and no longer deletes /var/lib/apt/lists,/etc/apt/apt.conf.d/docker-clean,COPY lines and CMD stay as they are.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.
Part of Docker Fundamentals. Next step: Publishing Ports
Teaching or writing about this? Embed this lab on your page
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.