moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
8.09k stars 1.14k forks source link

New linting features not clearly documented #5021

Open rittneje opened 3 months ago

rittneje commented 3 months ago

The dockerfile/1.8.0 release notes mention two things:

Many new validation rules have been added to verify that your Dockerfile is using best practices. These rules are validated during build and new "lint" subrequest can be used to only trigger validation without completing the whole build.

New directive #check and build-arg BUILDKIT_DOCKERFILE_CHECK can be set to control the behavior or best practices validation checks

In the first case, it is not clear what "lint" is a subrequest of. buildctl? docker? Something else?

In the second case, it is not clear how specifically to use these directives, or where the checks that get applied are documented.

I did finally stumble across this. If that's the documentation for this feature, it should be clearly linked from the release notes and the main README file.

thompson-shaun commented 1 month ago

I believe that information should be on docs.docker.com. Does this cover the topics you require?

We can get the new directives in there..

thompson-shaun commented 1 month ago

/cc @dvdksn