Docker - Port

Card Puncher Data Processing


Port Management in docker.



docker port list port mappings or a specific mapping for the container


docker port containerName


Look up what port is mapped externally to port 5000 inside the container.

docker port nostalgic_morse 5000


Redirecting the port 80 from the host to the port 80 of the container


-p host_port:container_port 
-p IP::port
docker run -d -p 80:80 user/image


In a dockerfile, you can open a port (expose it) with the expose command



  • Find out what host port the container’s containerName port 22 is mapped to
docker port containerName 22

Discover More
Card Puncher Data Processing
Docker - Host Network

An host net is a docker network. host machine The container’s network stack is not isolated from the Docker host. All containers in the host network are able to communicate with each other on the...
Card Puncher Data Processing
Docker - docker client

The CLI uses the Docker REST API to control or interact with the Docker daemon where subcommand is: attach - Attach to a running container build - Build an image from a Dockerfile commit -...
Card Puncher Data Processing
Docker - docker run (Creating a container)

The run command creates a container from an image on the virtual host and call the entrypoint script. start To generate this message, Docker took the following steps: The Docker client contacted...
Card Puncher Data Processing
Docker - docker-compose.yml

where: web define the name of the service as web image: defines the image to pull replicas defines the number of instances to run limits limits each replica to use, at most, 10% of the CPU (across...

Share this page:
Follow us:
Task Runner