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

False positive caused by ARG that continues to nothing #44

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

False positive caused by ARG that continues to nothing #44

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

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented May 28, 2018

The following unrealistic Dockerfile builds just fine.

FROM scratch
ARG var=value \
# var2=value2
$ docker build .
Sending build context to Docker daemon  1.774MB
Step 1/2 : FROM scratch
 --->
Step 2/2 : ARG var=value
 ---> Running in 39d20b950664
Removing intermediate container 39d20b950664
 ---> 52bd1fd4e9ae
Successfully built 52bd1fd4e9ae

However, the validator will flag an error. Note also that the range of the highlighted content seems weird as it includes the whitespace between ARG and var=value as well as the whitespace after the var=value.

$ docker run -v `pwd`/Dockerfile:/Dockerfile rcjsuen/dockerfile-utils lint /Dockerfile
Line: 2
ARG var=value \
   ^^^^^^^^^^^
Error: ARG requires exactly one argument
@rcjsuen rcjsuen added the bug label May 28, 2018
@rcjsuen rcjsuen self-assigned this May 28, 2018
@rcjsuen
Copy link
Owner Author

rcjsuen commented May 28, 2018

This looks like a bug in dockerfile-ast and not the validator.

@rcjsuen
Copy link
Owner Author

rcjsuen commented May 28, 2018

This is caused by rcjsuen/dockerfile-ast#40.

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