EasyEnv
Engineering/Courses/Catalog/Docker/Container Networking
Docker
IntermediateLesson 5 of 1330 min · hands-on

Container Networking

Part of the Docker course

You have run a web server in a container, watched it report that it is listening on port 80, and then opened http://localhost:80 in a browser and got nothing at all. The container is fine. The server is fine. Nothing is broken, and the reason is worth understanding properly rather than memorising a flag for.

A container gets its own network. Not a share of yours: its own, with its own IP address, its own set of ports, and its own view of what "localhost" means. Port 80 inside the container and port 80 on your machine are two different port 80s, in the same way that flat 3 in one building and flat 3 in another are two different flat 3s. ...

Want to learn Docker Container Networking in a real environment?

Click below, get a fresh Linux box with Docker ready to go, and work through Container Networking hands-on with an AI tutor that knows your code.

Start this lessonContainer Networking

What you'll learn

  • Published ports
  • -p host:container
  • User-defined networks
  • Container DNS
  • Docker network

Read this lesson in your language

All lessons in this course

13 lessons
  1. 1What Is Docker20 min
  2. 2Your First Container25 min
  3. 3Images and the Dockerfile30 min
  4. 4Building Custom Images35 min
  5. 5Container Networking30 min
  6. 6Volumes and Persistence30 min
  7. 7Docker Compose35 min
  8. 8Multi-Stage Builds35 min
  9. 9Environment Variables and Secrets25 min
  10. 10Healthchecks and Restart Policies25 min
  11. 11Image Optimization and Security30 min
  12. 12Registries and Publishing25 min
  13. 13Capstone: Shipping a Stack50 min

Explore other courses

Container Networking - Docker (English) | Engineering Courses