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 - Create...
Card Puncher Data Processing
Docker - docker-compose.yml

A docker-compose.yml is a configuration file that permits: to set docker option command in a yaml file and to define in one file multiple docker command (called services) where: web define...
Card Puncher Data Processing
How to run a docker image with example to create a container?

The run command creates: a container from an image running the docker host and calls the entrypoint script with the cmd values as arguments start To generate this message, Docker took...

Share this page:
Follow us:
Task Runner