pcp
[Top] [All Lists]

Re: PATCH RFC use environment to signify container name for rc scripts

To: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Subject: Re: PATCH RFC use environment to signify container name for rc scripts
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon, 16 Mar 2015 18:26:32 -0400 (EDT)
Cc: pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <55067A95.4080705@xxxxxxxxxx>
References: <55067A95.4080705@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: dOBSNHDsX/i0SXqn2SoFqou8z9zyPw==
Thread-topic: PATCH RFC use environment to signify container name for rc scripts

----- Original Message -----
> Nathan, dockerfiles have an ENV feature, which can pass an environment
> variable to all future "docker run" invocations. It can also be overridden
> with "docker run --env whatever=something".  So we could use this instead
> of $PCP_SYSCONF_DIR/pcp.pause. An errant or stale pcp.pause file could
> cause havoc (especially with QA),

Good idea.

> Something like $PCP_CONTAINER_NAME might prove very useful in contexts
> other than rc scripts too. Thoughts?

Yep - I'd already switched from rc.pause to rc.container, but I agree
passing more detailed information would be good.  Your patch actually
passes the container tag rather than the container name (which is not
available at build time)... maybe that should be $PCP_CONTAINER_TAG?

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>