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

Publish diagnostic if COPY instruction has an insufficient number of arguments #157

Closed
rcjsuen opened this issue Aug 22, 2017 · 0 comments
Closed
Assignees

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Aug 22, 2017

FROM alpine AS dev
COPY --from=dev
$ docker build .
Sending build context to Docker daemon  86.15MB
Step 1/2 : FROM alpine AS dev
 ---> 7328f6f8b418
Step 2/2 : COPY --from=dev
COPY requires at least two arguments

As can be seen above, a COPY instruction requires two arguments for it to be a valid. However, with the use of the --from flag, an error complaining about COPY requiring two arguments may appear even if you do indeed have two arguments.

FROM alpine AS dev
COPY --from=dev .
$ docker build .
Sending build context to Docker daemon  86.15MB
Step 1/2 : FROM alpine AS dev
 ---> 7328f6f8b418
Step 2/2 : COPY --from=dev .
COPY requires at least two arguments
@rcjsuen rcjsuen self-assigned this Aug 28, 2017
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

1 participant