Port Mapping and Container Linking in Docker
Port Mapping
When running containers that need to be accessed from outside the host machine—such as a private Docker registry—it's common to use the -p flag. For example:
docker run -d -p 5000:5000 -v /opt/data/registry:/tmp/registry registry
This maps port 5000 on the host to port 5000 inside the container. Without such a mapping, external sy ...
Posted on Sat, 25 Jul 2026 16:09:36 +0000 by luanne