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

Using variables in FROM confuses the validator #43

Closed
rcjsuen opened this issue May 28, 2018 · 0 comments
Closed

Using variables in FROM confuses the validator #43

rcjsuen opened this issue May 28, 2018 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented May 28, 2018

Using variables is valid in the base image argument of a FROM but it seems to validator won't ignore it properly.

ARG image=scratch
FROM ${image:-alpine}
$ docker build .
Sending build context to Docker daemon  1.774MB
Step 1/2 : ARG image=scratch
Step 2/2 : FROM ${image:-alpine}
 --->
No image was generated. Is your Dockerfile empty?
$ dockerfile-utils lint Dockerfile
Line: 2
FROM ${image:-alpine}
             ^^^^^^^^
Error: invalid reference format
@rcjsuen rcjsuen added the bug label May 28, 2018
@rcjsuen rcjsuen self-assigned this May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant