Take Secrets out of a Compose File
Labs have no container engine, so nothing is built or started: your files are checked by reading them, the way a reviewer or a CI linter would. docker-compose config (to validate Compose files) and hadolint (a Dockerfile linter) are installed.
/home/student/projects/scheduler-ui/compose.yaml is in Git with the database password typed into it, the database loses its data when the container is recreated, and the admin port is open to the whole network.
compose.yaml. Read it from a variable POSTGRES_PASSWORD defined in a .env file next to it (same password as today). Both services must still receive it.pgdata, mounted at /var/lib/postgresql/data.admin's port 8081 on the host only on 127.0.0.1 (same host port 8081).docker-compose config must accept the file.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.
Your machine is ready to start
Create a free account to open a machine and get graded.