[ 
https://issues.apache.org/jira/browse/YARN-8986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687652#comment-16687652
 ] 

Charo Zhang commented on YARN-8986:
-----------------------------------

[~eyang]Thanks  for your interpretation, and i rewrote the patches in 
container-executor.
1, support -p by YARN_CONTAINER_RUNTIME_DOCKER_PORTS_MAPPING for ports mapping, 
for example:
-shell_env 
YARN_CONTAINER_RUNTIME_DOCKER_PORTS_MAPPING=127.0.0.1:8080:80,1234:1234,8888:88,:2222
it's same to "docker run -p 127.0.0.1:8080:80 -p 1234:1234 -p 8888:88 -p :2222"

2, if command has not YARN_CONTAINER_RUNTIME_DOCKER_PORTS_MAPPING environment, 
it will add -P default.

> publish all exposed ports to random ports when using bridge network
> -------------------------------------------------------------------
>
>                 Key: YARN-8986
>                 URL: https://issues.apache.org/jira/browse/YARN-8986
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>    Affects Versions: 3.1.1
>            Reporter: Charo Zhang
>            Assignee: Charo Zhang
>            Priority: Minor
>              Labels: Docker
>             Fix For: 3.1.2
>
>         Attachments: 20181108155450.png, YARN-8986.001.patch, 
> YARN-8986.002.patch, YARN-8986.003.patch, YARN-8986.004.patch
>
>
> it's better to publish all exposed ports to random ports(-P) or support port 
> mapping(-p) for bridge network when using bridge network for docker container.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to