Repository navigation
Jenkinsfile: build with BuildKit - #6
Merged
Merged
Conversation
The Dockerfile now has an upstream image check that uses RUN --mount, which needs BuildKit. The Jenkins Docker 20.10 agents ship BuildKit but keep it off by default, so main build flant#9 failed with 'the --mount option requires BuildKit'. Set DOCKER_BUILDKIT=1 for the build step and keep the Dockerfile identical to upstream. PTEUDO-4980 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Build the image with BuildKit in the Jenkinsfile.
What this PR does / why we need it
After #5 the Dockerfile contains the upstream image check
RUN --mount=type=bind,... verify-image.sh.--mountneeds BuildKit, and the Jenkins agents (Docker 20.10) use the legacy builder by default, so themainbuild failed withthe --mount option requires BuildKit.This sets
DOCKER_BUILDKIT=1for thedocker buildstep. The Dockerfile stays identical to upstream, so future upstream syncs do not conflict.How tested
DOCKER_BUILDKIT=1 docker build .locally: OK (same build that was scanned and tested for Sync with flant/shell-operator (alpine 3.23 base) and drop perl-utils #5).Special notes for your reviewer