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

COPY incorrectly flags JSON's closing bracket as an invalid argument #29

Closed
rcjsuen opened this issue Mar 31, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Mar 31, 2018

Docker will happily build the following Dockerfile but the validator incorrectly flags the closing bracket as an error. Caused by implementing #14.

FROM alpine
COPY [ "t1.txt", "t2.txt", "./" ]
$ docker build .
Sending build context to Docker daemon  1.696MB
Step 1/2 : FROM alpine
latest: Pulling from library/alpine
ff3a5c916c92: Pull complete
Digest: sha256:7df6db5aa61ae9480f52f0b3a06a140ab98d427f86d8d5de0bedab9b8df6b1c0
Status: Downloaded newer image for alpine:latest
 ---> 3fd9065eaf02
Step 2/2 : COPY [ "t1.txt", "t2.txt", "./" ]
 ---> 5c017e611051
Successfully built 5c017e611051
$ dockerfile-utils lint .\Dockerfile.1
Line: 2
COPY [ "t1.txt", "t2.txt", "./" ]
                                ^
Error: When using COPY with more than one source file, the destination must be a directory and end with a / or a \
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