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

emichaf picture emichaf  路  4Comments

ianlewis picture ianlewis  路  4Comments

Morriz picture Morriz  路  3Comments

kdevu picture kdevu  路  3Comments

strikeout picture strikeout  路  4Comments