I need to map the ports on the host to the ports on the container. I can achieve this by running the \"docker run\" command with the -p option. How do
\"docker run\"
-p
EXPOSE a list of ports on your Dockerfile.
EXPOSE
Run docker run -d -P --name app_name app_image_name.
docker run -d -P --name app_name app_image_name
After the previous steps succeed,
run docker port app_name which will display you an output like below:
docker port app_name
80/tcp -> 0.0.0.0:32769 443/tcp -> 0.0.0.0:32768
80/tcp -> 0.0.0.0:32769
443/tcp -> 0.0.0.0:32768