- Notifications
You must be signed in to change notification settings - Fork692
Isdocker build --check used to validate Dockerfiles and check for warnings?#1359
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I'd like to ensure that my Dockerfile does not have any warnings and that it's validated in CI. If I use a simple job such as: container:runs-on:ubuntu-24.04steps: -name:Build Container Imageuses:docker/build-push-action@v6with:push:false Will this fail if If theyaren't checked, I'd propose a new with:checked:true flag so that users can lint their Dockerfiles using this action in CI. References |
BetaWas this translation helpful?Give feedback.
All reactions
We have docs for using Build checks in GHA:https://docs.docker.com/build/ci/github-actions/checks/
Replies: 2 comments 3 replies
-
You can use the input https://github.com/docker/build-push-action?tab=readme-ov-file#inputs |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
@mschoettle So would this look like: container:runs-on:ubuntu-24.04steps: -name:Lint Dockerfileuses:docker/build-push-action@v6with:call:check If I want to check and then actually build the container, would the most concise way of expressing this be the following? (i.e., I need to duplicate and have two separate container:runs-on:ubuntu-24.04steps: -name:Lint Dockerfileuses:docker/build-push-action@v6with:call:checksteps: -name:Build Container Imageuses:docker/build-push-action@v6with:push:false |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
We have docs for using Build checks in GHA:https://docs.docker.com/build/ci/github-actions/checks/ |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
I created#1361 to add this to the README in the examples section. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
Perfect, yes I was going to recommend adding it to the README for greater visibility. Thanks. |
BetaWas this translation helpful?Give feedback.
All reactions
🎉 1