[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: CMD with env vars





On Thu, Feb 25, 2016 at 1:43 PM, Philippe Lafoucrière <philippe lafoucriere tech-angels com> wrote:
Hi,

Sorry it's not the right place to post that, but I can't manage to get a container running when env var are present in the command:

 spec:
   containers:
   - command:
     - /nsqd
     - --worker-id=${WORKER_ID:-0}
     env:
     - name: WORKER_ID
       value: "1"

I have tried with /bin/sh -c, with or without quotes, etc., and nothing is working.

Thanks,
Philippe

​Try this syntax:

-w​orker-id=$(WORKER_ID)

Notice the parens rather than braces. I don't know that defaulting is supported.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]