From 30c6d0bedf5262ba3acd1cdd360f1c855de168e3 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 26 Sep 2024 16:16:51 -0700 Subject: [PATCH] Switch `BUILDKIT_SYNTAX` to `tianon/buildkit` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support for this was implemented in my images back in https://github.com/tianon/dockerfiles/commit/8c854664edda5c5ce3140981da969277de8e9075 as a PoC (and support for it was kept in https://github.com/tianon/dockerfiles/commit/2b781912dbaa9f18f5f1f6e92eca5138fc731039 when the explicit 0.13 builds were added), and I've actually been using it pretty heavily since without issue, both locally *and* for all of my `tianon/xxx` personal image builds (including building of `tianon/buildkit` itself, for maximum meta 😂). The primary benefit is that we get the exact same architecture support matrix as our BuildKit images (and the same set of applied patches, if they happen to impact the frontend code as well). $ docker buildx build --pull --no-cache --build-arg BUILDKIT_SYNTAX=tianon/buildkit:0.13 - <<<$'FROM bash\nRUN echo see, it works!' #0 building with "default" instance using docker driver #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 71B done #1 DONE 0.0s #2 [internal] load .dockerignore #2 transferring context: 2B done #2 DONE 0.0s #3 resolve image config for docker.io/tianon/buildkit:0.13 #3 DONE 0.2s #4 docker-image://docker.io/tianon/buildkit:0.13@sha256:95db7c7b47f142af3fe0cae7de217996dadde8c44ef9e331ddd564857ca277ab #4 resolve docker.io/tianon/buildkit:0.13@sha256:95db7c7b47f142af3fe0cae7de217996dadde8c44ef9e331ddd564857ca277ab 0.0s done #4 CACHED #5 [internal] load metadata for docker.io/library/bash:latest #5 DONE 0.2s #6 [1/2] FROM docker.io/library/bash:latest@sha256:ce062497c248eb1cf4d32927f8c1780cce158d3ed0658c586a5be7308d583cbb #6 CACHED #7 [2/2] RUN echo see, it works! see, it works! #7 DONE 0.3s #8 exporting to image #8 exporting layers 0.0s done #8 writing image sha256:ceb5fb7b6904a68eeedd25c253e54e9ae1160c404c7e9fbb26c142d8a8143ef8 done #8 DONE 0.0s --- .bin/bashbrew-buildkit-env-setup.sh | 2 +- .external-pins/docker/dockerfile___1 | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .external-pins/docker/dockerfile___1 diff --git a/.bin/bashbrew-buildkit-env-setup.sh b/.bin/bashbrew-buildkit-env-setup.sh index 3ed5205c09fde..74e7797cb6c05 100755 --- a/.bin/bashbrew-buildkit-env-setup.sh +++ b/.bin/bashbrew-buildkit-env-setup.sh @@ -47,7 +47,7 @@ _bashbrew_buildkit_env_setup() { local vars='{}' local dockerfileTag - dockerfileTag="$(grep <<<"$externalPins" -m1 '^docker/dockerfile:')" + dockerfileTag="$(grep <<<"$externalPins" -m1 '^tianon/buildkit:')" dockerfileTag="$(_resolve_external_pins "$dockerfileTag")" vars="$(_jq_setenv <<<"$vars" BASHBREW_BUILDKIT_SYNTAX "$dockerfileTag")" diff --git a/.external-pins/docker/dockerfile___1 b/.external-pins/docker/dockerfile___1 deleted file mode 100644 index ce469ee3096fa..0000000000000 --- a/.external-pins/docker/dockerfile___1 +++ /dev/null @@ -1 +0,0 @@ -sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28