You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dockerfile:2
--------------------
1 | FROM alpine
2 | >>> COPY --nosuchflag . .
3 |
--------------------
ERROR: failed to solve: dockerfile parse error on line 2: unknown flag: nosuchflag
Example 2: flag with missing value;
Dockerfile:4
--------------------
2 | FROM alpine
3 | WORKDIR /test
4 | >>> COPY --exclude /.git . .
5 |
--------------------
ERROR: failed to solve: dockerfile parse error on line 4: missing a value on flag: exclude
I wonder if we could improve that error;
refer to the flag as --exclude instead of exclude
perhaps print the expected format (--exclude=<path>)
suggest a possible fix, e.g. for this example, did you mean --exclude=/.git ?
Last one is always tricky, because COPY allows more than 2 arguments, so COPY /.git . . is technically correct (although /.git overlaps with ., so could be some warning on its own)
The text was updated successfully, but these errors were encountered:
Noticed these errors while writing an example;
Example 1: invalid option / flag;
Example 2: flag with missing value;
I wonder if we could improve that error;
--exclude
instead ofexclude
--exclude=<path>
)did you mean --exclude=/.git ?
Last one is always tricky, because
COPY
allows more than 2 arguments, soCOPY /.git . .
is technically correct (although/.git
overlaps with.
, so could be some warning on its own)The text was updated successfully, but these errors were encountered: