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

Re: CMD with env vars



If you're doing anything that would be "shell expansion" you have to
use a shell in the command.

"$(FOO)" is a kubernetes expansion.
"${FOO}" is a shell expansion (you must use /bin/sh -c)
"$$(hostname -i)" is a shell expansion (you must use /bin/sh -c)

On Thu, Feb 25, 2016 at 2:28 PM, Philippe Lafoucrière
<philippe lafoucriere tech-angels com> wrote:
> On Thu, Feb 25, 2016 at 2:24 PM, Clayton Coleman <ccoleman redhat com>
> wrote:
>>
>> You have to double escape shell inclusions - "$$(hostname -i)"
>
>
> Also tried that, but still not expending:
>
> PID   USER     TIME   COMMAND
>     1 root       0:00 /nsqd --broadcast-address=$(hostname -i)
> --lookupd-tcp-address=172.30.82.189:4160 --worker-id=1 --data-path=/data
>
>
>     spec:
>       containers:
>       - command:
>         - /nsqd
>         - --broadcast-address=$$(hostname -i)
>         -
> --lookupd-tcp-address=$(NSLOOKUPD_SERVICE_HOST):$(NSLOOKUPD_PORT_4160_TCP_PORT)
>         - --worker-id=$(WORKER_ID)
>         - --data-path=/data
>
>
>         - --broadcast-address="$$(hostname -i)"
>
> doesn't work either :(


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