[
https://issues.apache.org/jira/browse/YARN-5168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687527#comment-16687527
]
Xun Liu edited comment on YARN-5168 at 11/15/18 6:11 AM:
---------------------------------------------------------
[~eyang]
Thank you for your reply, remove the support of "-p port1:port2", I think so.
{quote}1. Add "-P" to map docker container's exposed ports to automatically.
{quote}
When the yarn starts docker, will this "-P" parameter be added? This way we can
expose the services inside the container, for example:
So we can add it inside the Dockerfile
{code:java}
EXPOSE 1000
EXPOSE 2000
EXPOSE 3000
{code}
After launching docker via YARN, We can get the external port automatically
assigned by the host.
{code:java}
$ docker run d -P -name exposed-ports-in-dockerfile exposed-ports
63264dae9db85c5d667a37dac77e0da7c8d2d699f49b69ba992485242160ad3a
$ docker port exposed-ports-in-dockerfile
1000/tcp -> 0.0.0.0:49156
2000/tcp -> 0.0.0.0:49157
3000/tcp -> 0.0.0.0:49158
{code}
{quote}1. Add "-P" to map docker container's exposed ports to automatically.
{quote}
When will this feature be added? I feel that waiting for hadoop3.3 to release
is a bit late, Can you assign this JIRA to me and let me contribute the patch?
thank you!
was (Author: liuxun323):
[~eyang]
Thank you for your reply, remove the support of "-p port1:port2", I think so.
{quote}1. Add "-P" to map docker container's exposed ports to automatically.
{quote}
When the yarn starts docker, will this "-P" parameter be added? This way we can
expose the services inside the container, for example:
So we can add it inside the Dockerfile
EXPOSE 1000
EXPOSE 2000
EXPOSE 3000
After launching docker via YARN, We can get the external port automatically
assigned by the host.
$ docker run -d -P --name exposed-ports-in-dockerfile exposed-ports
63264dae9db85c5d667a37dac77e0da7c8d2d699f49b69ba992485242160ad3a
$ docker port exposed-ports-in-dockerfile
1000/tcp -> 0.0.0.0:49156
2000/tcp -> 0.0.0.0:49157
3000/tcp -> 0.0.0.0:49158
{quote}1. Add "-P" to map docker container's exposed ports to automatically.
{quote}
When will this feature be added? I feel that waiting for hadoop3.3 to release
is a bit late, Can you assign this JIRA to me and let me contribute the patch?
thank you!
> 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: [email protected]
For additional commands, e-mail: [email protected]