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

Linting error using docker/dockerfile:1.7-labs and COPY --exclude #4284

Closed
Tracked by #4394 ...
joaomorenorf opened this issue Apr 11, 2024 · 5 comments · Fixed by #4308
Closed
Tracked by #4394 ...

Linting error using docker/dockerfile:1.7-labs and COPY --exclude #4284

joaomorenorf opened this issue Apr 11, 2024 · 5 comments · Fixed by #4308

Comments

@joaomorenorf
Copy link

I'm using docker/dockerfile:1.7-labs syntax to be able to use COPY --exclude, but the linter doesn't recognize it.

image

image

I tried to restart the IDE, but didn't worked.

I'm using:
Visual Studio Code 1.88.0
Docker extension v1.29.0
Docker Desktop 4.28.0

@bwateratmsft
Copy link
Collaborator

@rcjsuen is this labs syntax stuff something we even want to support?

@joaomorenorf
Copy link
Author

joaomorenorf commented Apr 11, 2024

It's in the official documentation:
https://docs.docker.com/reference/dockerfile/#copy---exclude
The labs syntax add only two modifications
https://docs.docker.com/build/dockerfile/release-notes/#labs

@joaomorenorf
Copy link
Author

Is there a way of adding a custom rule to ignore this error?

@rcjsuen
Copy link
Contributor

rcjsuen commented Apr 11, 2024

@rcjsuen is this labs syntax stuff something we even want to support?

I added support for this last month (rcjsuen/dockerfile-utils#124) but I need to make a new release of the language server to include the update.

Is there a way of adding a custom rule to ignore this error?

You can try putting # dockerfile-utils: ignore before the error and it should ignore it.

@rcjsuen
Copy link
Contributor

rcjsuen commented May 23, 2024

I've published a new 0.12.0 to npm that should fix this issue.

@microsoft microsoft locked and limited conversation to collaborators Jul 9, 2024
@bwateratmsft bwateratmsft modified the milestones: 1.30.0, 1.29.3 Sep 11, 2024
@bwateratmsft bwateratmsft modified the milestones: 1.29.3, 1.29.2 Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants