Docker container port mapping is used to expose container internal ports to the host. Use the -p or --publish parameter, format: host_port:container_port. For example: docker run -p 8080:80 nginx maps the container's port 80 to the host's port 8080. Multiple ports can be mapped: -p 8080:80 -p 8443:443. Use -P (uppercase) to automatically map all EXPOSE declared ports to random host ports. View port mappings: docker port container_name. Notes: host port already in use will cause an error; use 0.0.0.0:8080:80 to bind all network interfaces, 127.0.0.1:8080:80 to bind only locally.