[ https://issues.apache.org/jira/browse/YARN-5168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16685660#comment-16685660 ]
Shane Kumpf commented on YARN-5168: ----------------------------------- I believe supporting -P will lead to port conflicts. What if two containers running on the same NM both expose 8080? An alternative might be to support the "-p 8080" syntax (NOT "-p 8080:8080", only the single port). With this syntax, docker will allocate an ephemeral port on the NM and forward traffic to that port to 8080 in the container (0.0.0.0:32768 -> container_ip:8080). The user would need to supply the list of ports they want to expose at job submission time, likely via an env variable like we do with networks. > Add port mapping handling when docker container use bridge network > ------------------------------------------------------------------ > > Key: YARN-5168 > URL: https://issues.apache.org/jira/browse/YARN-5168 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Jun Gong > Assignee: Eric Yang > Priority: Major > Labels: Docker > > YARN-4007 addresses different network setups when launching the docker > container. We need support port mapping when docker container uses bridge > network. > The following problems are what we faced: > 1. Add "-P" to map docker container's exposed ports to automatically. > 2. Add "-p" to let user specify specific ports to map. > 3. Add service registry support for bridge network case, then app could find > each other. It could be done out of YARN, however it might be more convenient > to support it natively in YARN. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org