Skaffold: Feature Request: Allow docker build arg to pick values up from the environment values also

Created on 7 Feb 2019  路  4Comments  路  Source: GoogleContainerTools/skaffold

arebuild good first issue help wanted

Most helpful comment

I'm currently using envsubst as a workaround.

envsubst '\$ENV1 \$ENV2' < skaffold.yaml | skaffold run -f -

All 4 comments

I'm currently using envsubst as a workaround.

envsubst '\$ENV1 \$ENV2' < skaffold.yaml | skaffold run -f -

Hi @rahulwa can you provide more information about your use case?

I want to use the same Dockerfile for different environments (staging, production) [this case is easily handled through skaffold profiles] and some variables are even different in same environment(like some base links in reacts assets, even though react supports these variables through environment, I cannot pass it through Dockerfile because skaffold doesn鈥檛 handle it). Hope it makes sense.
Something like this

Anyway, if we are allowing environment variables for others configs, why not for this also?
It will provide consistency and intuitiveness.

@rahulwa that sounds reasonable, it shouldn't be too difficult to plumb env vars through to the docker build args. would you be interested in sending a PR?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

strikeout picture strikeout  路  4Comments

heroic picture heroic  路  4Comments

ahmad-musleh picture ahmad-musleh  路  3Comments

abatilo picture abatilo  路  4Comments

garvincasimir picture garvincasimir  路  4Comments