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
Multiple ENTRYPOINT/CMD/HEALTHCHECK warnings invalid in the context of a multi-stage Dockerfile #22
Comments
Thank you very much for your bug report, @hairyhenderson. We should fix this for FROM alpine
CMD ls
FROM alpine
CMD pwd
FROM alpine
ENTRYPOINT ls
FROM alpine
ENTRYPOINT pwd
FROM alpine
HEALTHCHECK CMD ls
FROM alpine
HEALTHCHECK CMD pwd
|
Fixed by 06de6f9 but I wrote the wrong issue number in the commit message. :( |
Thanks @rcjsuen! That was fast 😂 |
@hairyhenderson No problem, thank you for opening the bug report! Would you like me to publish a new version to npm? |
@rcjsuen yes please - I mainly use this through VSCode, so maybe more downstream things need to be updated as well... No huge rush though :) |
@hairyhenderson Ah. Yeah, then it'll take a while. :P I'd have to trickle this change to my own downstream projects in addition to getting the dependency updated in the vscode-docker extension. And then the Microsoft guys would have to also agree to publish a new version to the Visual Studio Marketplace. :O You must have done quite some detective work to get this far down the dependency chain though. Most people just open a bug in the vscode-docker extension and call it a day. ;) If you are using VS Code though, you can disable the validation by modifying your settings. Naturally, this has the side effect of disabling the correct validation warning where multiples of these instructions appear in the same build stage... {
"docker.languageserver.diagnostics.instructionCmdMultiple": "ignore",
"docker.languageserver.diagnostics.instructionEntrypointMultiple": "ignore",
"docker.languageserver.diagnostics.instructionHealthcheckMultiple": "ignore"
} |
@hairyhenderson This should now be fixed with the latest 0.0.27 release of the Docker extension. |
woot! Thanks @rcjsuen 😀 |
dockerfile-utils/src/dockerValidator.ts
Line 153 in 88d1abe
When using a multi-stage Dockerfile, these warnings trigger, but shouldn't. I suppose a possible way to fix this would be to reset the counts when a
FROM
instruction is encountered...The text was updated successfully, but these errors were encountered: