Mohit
0
Q:

docker run port mapping

$ docker run -p 127.0.0.1:80:8080/tcp ubuntu bash
1
sudo docker exec -it <container name> <command>
2
docker run --network host
When running using --network host there is no need to map the ports.
All the docker container ports will be available since the network host mode 
makes the container use the host's network stack.
0
Use this command to see the port mapping:
docker ps
-1
-p 8080:80/tcp -p 8080:80/udp	Map TCP port 80 in the container to TCP port 8080 on the Docker host, and map UDP port 80 in the container to UDP port 8080 on the Docker host.
0

Tags

New to Communities?

Join the community