Jim Brennan commented on YARN-7654:

{quote}But how do you differentiate between user-defined variables and 
NM-defined variables? Jim Brennan and Jason Lowe can correct me if I'm wrong on 
our current approach with YARN-7677, but I thought we were going with the 
following hierarchy: user-defined, image-defined, NM-defined. If something is 
NM-defined, but not user-defined, we want it to use the image-defined version. 
However, if it is user-defined, then we want the user-defined version. But, 
this is not possible by simply passing -e K=V on the docker run command line
YARN-7677 adds the ability for the docker image to override the whitelisted NM 
variables that are not set by the user, by using the V=${V:-default} syntax in 
the launch_container.sh script. This works because the script is evaluated in 
the context of the image, so if the image defines a different value, it will 
replace the default that was set by NM.  But more importantly, if the docker 
image does not define it, it will get the NM value.

If I understand this use-case correctly, there would be no launch_container.sh 
script that is evaluated in the image context, so things would be different.  
Do the environment variables passed on the docker run command line override 
those set in the image?  If they do, then they would eclipse any value set in 
the image.

> Support ENTRY_POINT for docker container
> ----------------------------------------
>                 Key: YARN-7654
>                 URL: https://issues.apache.org/jira/browse/YARN-7654
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>    Affects Versions: 3.1.0
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>            Priority: Blocker
> Docker image may have ENTRY_POINT predefined, but this is not supported in 
> the current implementation.  It would be nice if we can detect existence of 
> {{launch_command}} and base on this variable launch docker container in 
> different ways:
> h3. Launch command exists
> {code}
> docker run [image]:[version]
> docker exec [container_id] [launch_command]
> {code}
> {code}
> docker run [image]:[version]
> {code}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to