Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to expand environmental variables defaults to actual values of those defaults #156

Open
uzakoff opened this issue Oct 18, 2018 · 1 comment

Comments

@uzakoff
Copy link

uzakoff commented Oct 18, 2018

In the documentation: https://dnephin.github.io/dobi/variables.html it says that variables can have default values. When I am building an image I would like dobi to resolve those defaults to their actual value. For example if I run b=1 dobi image/test I would like RUN echo ${evaluate} to print 1 instead of env.b, which is what happens now.

Dockerfile

FROM   alpine:3.4
ARG evaluate
RUN echo ${evaluate}  

dobi.yaml

image=image/test:
  image: myproject
  dockerfile: Dockerfile
  args:
     evaluate: "{env.a:env.b}"
@Enteee
Copy link

Enteee commented Oct 18, 2018

it would be nice if a default for a variable would be handled the same as a string with config variables.

Which means, for {env.a:{env.b}}
with a=1; b=2: 1
with a=UNDEFINED; b=2: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants