QuestionQ40Verified/DeploymentCopy linkReport a problemAsk AstroTutorSave questionWhich of the following container commands performs network port mapping?A$docker run –it myimage –e /bin/port 8080B$docker run myimage:portC$docker run –it –p 1-65535 myimage –e netstat 8080D$docker run –it –p 80:8080 myimageShow AnswerAnswerExplanationDocker’s -p/--publish option maps a host port to a container port using the HOST_PORT:CONTAINER_PORT format. Thus, -p 80:8080 publishes host port 80 and directs it to port 8080 in the container.Learn morePort publishing and mapping | Docker DocsShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion