Docker 101: Publish a PostgreSQL Container Port on Localhost Only
Learn how to keep a database available to an app running on your workstation without exposing its port to other machines on the network.
Focused, hands-on problems for sharpening your DevOps and server-side skills. Some teach specific concepts while others mirror real-world scenarios. Every challenge includes hints, feedback, and automated solution checks.
Learn how to keep a database available to an app running on your workstation without exposing its port to other machines on the network.
A web app is listening inside a container, but the browser can't reach its IP address. Recreate the container so the app is available on port 80 of the Docker host.
A Deployment running a distroless Chainguard nginx image (cgr.dev/chainguard/nginx) is deployed in the namespace webapps, fronted by a ClusterIP Service. Port-forward that Service to localhost port 3333 on cplane-01, use curl to save the response body to /home/laborant/index.html, and verify the file is accessible and contains the expected content.
A remote VM serves an app on port 80 and keeps an internal debugging port bound to 127.0.0.1. Reach the debugging port from your workstation using an SSH tunnel, without exposing it on the VM's external interface.
Prove your networking skills by mapping one network address to another using socat.