▱HAMILTON TECH LAB
← Linux & Docker Lab
LINUX & DOCKER LAB · LESSON 2 OF 3

Docker ports and networking

Read the explanation, try the exercise, then answer the quiz.

Understand the concept

Docker bridge networks connect containers through virtual networking. Published ports map a host address and port to a container port. Binding to 127.0.0.1 limits access to the host loopback interface.

A container’s 127.0.0.1 refers to that container, not the host. Host networking changes this relationship, which matters for an outbound tunnel reaching a local Nginx server.

TRY IT YOURSELF

Practice task

Explain the mapping 127.0.0.1:8089 → container:80 from your website setup.

CHECK YOUR UNDERSTANDING

Quick quiz

What does host binding 127.0.0.1 typically restrict?