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

Validator incorrectly ignores content after a non-leading comment marker #75

Closed
rcjsuen opened this issue Mar 8, 2020 · 0 comments
Closed
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Mar 8, 2020

FROM alpine
COPY 1.txt 2.txt \
 3.txt #4.txt /dir/
$ docker build .
Sending build context to Docker daemon  38.15MB
Step 1/2 : FROM alpine
 ---> e7d92cdc71fe
Step 2/2 : COPY 1.txt 2.txt  3.txt #4.txt /dir/
 ---> 7c0a78559869
Successfully built 7c0a78559869
$ docker run -v `pwd`/Dockerfile:/Dockerfile rcjsuen/dockerfile-utils lint /Dockerfile
Line: 3
 3.txt #4.txt /dir/
 ^^^^^
Error: When using COPY with more than one source file, the destination must be a directory and end with a / or a \

The #4.txt argument ends up causing it and all subsequent arguments to be ignored. The validator is then unable to find the /dir/ argument and flags a false warning.

@rcjsuen rcjsuen added the bug label Mar 8, 2020
@rcjsuen rcjsuen self-assigned this Mar 8, 2020
@rcjsuen rcjsuen closed this as completed in 754e10d Mar 8, 2020
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