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

Eric Yang commented on YARN-7654:
---------------------------------

In the current implementation, high level operation performed to launch a 
docker container through container-executor:

1.  launch_docker_container_as_user
2.  create_local_dirs
3.  construct_docker_command
4.  change effective user
5.  launch docker run command
6.  docker inspect
7.  write pid to pidfile

The change will happen to construct_docker_command.  The current implementation 
will generate a localized launch_container.sh in yarn local dir for the 
container, and bind mount the launch_container.sh to identical path inside 
container.  Docker run command is constructed as:

{code}
docker run ... launch_container.sh
{code}

The new proposal is to change construct_docker_command as:

exporting all environment and command line arguments to a template that looks 
like:

{code}
#!/bin/bash
{ { docker run ... -e K=V -e K-V [image-name] } > >(tee stdout.txt ); } \
  2> >(tee stderr.txt >&2 )
{code}

In step 5, run the generated template script from container local dir.

[[email protected]] [~ebadger] Do you see any problem with this approach?

> 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: Major
>
> 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}
> h3. Use ENTRY_POINT
> {code}
> docker run [image]:[version]
> {code}



--
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