The Database Is on the Internet
Labs have no container engine, so nothing is started: your files are checked with docker-compose config.
A scan of the reviews host found PostgreSQL, Redis and Adminer answering from the internet. Docker publishes ports on all interfaces by default, and it bypasses most host firewalls (UFW) to do so.
Change the ports in /home/student/projects/reviews/compose.yaml:
| Service | Should be reachable |
|---|---|
web | from anywhere, on ports 80 and 443 (as now) |
db | only from the host itself, at 127.0.0.1:5432 |
adminer | only from the host itself, at 127.0.0.1:8081 |
cache | not from the host at all: only the other containers use it |
The containers keep reaching each other through the Compose network. Keep the images.
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: Build Images From Compose
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.