dockerfilelint icon indicating copy to clipboard operation
dockerfilelint copied to clipboard

FROM scratch is a special case and shouldn't cause an error

Open iggy opened this issue 5 years ago • 3 comments

FROM scratch is a special case in docker. It doesn't have any tags and in the build tooling it's a special case to not use an underlying image layer. This tool shouldn't error on a FROM line with scratch.

iggy avatar Jun 20 '20 06:06 iggy

@iggy thanks for the report. I’ve added an integration test and am not able to reproduce this. Are you able to provide a Dockerfile that has this error?

marccampbell avatar Aug 12 '20 04:08 marccampbell

I'm using dockerfilelint as part of GitHub's super-linter. Here is a link to it failing as part of that:

https://github.com/iggy/scurvy/runs/940683789?check_suite_focus=true#step:4:194

The line it's referencing:

https://github.com/iggy/scurvy/blob/master/Dockerfile#L74

iggy avatar Aug 12 '20 04:08 iggy

Thanks @iggy

I added PR #154 which does address and make these pass. I’ll get it reviewed in tomorrow and a new version released.

marccampbell avatar Aug 12 '20 05:08 marccampbell