You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aurora.apache.org by Mauricio Garavaglia <ma...@gmail.com> on 2015/04/26 01:49:35 UTC

docker parameters

Hi,

I'm writting a small patch to allow to set arbitrary parameters to a docker
job by setting Protos.Parameter to DockerInfo while the task is created.

This works fine so far, but if I try to set an environment variable (using
docker's --environment) of course the executor gets this variable and I
can't make it pass through the Process that runs in the container.

Is there a straight forward way to do that or do I need to modify the
executor?

Re: docker parameters

Posted by Kevin Sweeney <ke...@apache.org>.
The executor completely scrubs the environment [1], so you'd have to
prevent it from doing that. I'd suggest adding a flag to the executor to
take a list of other environment variables to whitelist.

https://github.com/apache/aurora/blob/aad9a5a182b9fbf82ad6048bae0373014f4f10b4/src/main/python/apache/thermos/core/process.py#L341-L356

On Sat, Apr 25, 2015 at 4:49 PM, Mauricio Garavaglia <
mauriciogaravaglia@gmail.com> wrote:

> Hi,
>
> I'm writting a small patch to allow to set arbitrary parameters to a docker
> job by setting Protos.Parameter to DockerInfo while the task is created.
>
> This works fine so far, but if I try to set an environment variable (using
> docker's --environment) of course the executor gets this variable and I
> can't make it pass through the Process that runs in the container.
>
> Is there a straight forward way to do that or do I need to modify the
> executor?
>