Skip to content

Commit

Permalink
Switch BUILDKIT_SYNTAX from to tianon/buildkit
Browse files Browse the repository at this point in the history
Support for this was implemented in my images back in tianon/dockerfiles@8c85466 as a PoC (and support for it was kept in tianon/dockerfiles@2b78191 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
  • Loading branch information
tianon committed Sep 26, 2024
1 parent df2b853 commit 8bbdde0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion .bin/bashbrew-buildkit-env-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")"

Expand Down
1 change: 0 additions & 1 deletion .external-pins/docker/dockerfile___1

This file was deleted.

0 comments on commit 8bbdde0

Please sign in to comment.