Build Images From Compose
Labs have no container engine, so nothing is built: your files are checked with docker-compose config.
/home/student/projects/pricing/compose.yaml only pulls the api image from the registry. Developers want docker compose build to build it from api/Dockerfile, the same way CI does.
Give the api service a build section so that it:
./api as the build context (the Dockerfile there keeps its default name),runtime of that Dockerfile,VERSION, taken from the environment variable VERSION, defaulting to dev,and name the built image registry.example.com/pricing-api:<VERSION> with the same default. Keep the ports.
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: Stop Copy-Pasting Compose Settings
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.