Skip to content

Commit 9bc051a

Browse files
Remove outdated DOCKER_BUILDKIT workarounds (#133)
BuildKit is the default since Docker 23. The explicit `export DOCKER_BUILDKIT=1` and related comments are no longer needed and can interfere with attestation on push. Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent 278e9dc commit 9bc051a

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

build-bin/docker/docker_build

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,5 @@ docker_tag=${1?full docker_tag is required. Ex openzipkin/zipkin:test}
1010
version=${2:-}
1111
docker_args=$($(dirname "$0")/docker_args ${version})
1212

13-
# We don't need build kit, but Docker 20.10 no longer accepts --platform
14-
# without it. It is simpler to always enable it vs require maintainers to use
15-
# alternate OCI tools. See https://github.com/moby/moby/issues/41552
16-
export DOCKER_BUILDKIT=1
17-
1813
echo "Building image ${docker_tag}"
1914
docker build --network=host --pull ${docker_args} --tag ${docker_tag} .

build-bin/docker/docker_push

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@
1010
#
1111
# Note: In CI, `configure_docker_push` must be called before invoking this.
1212
#
13-
# Avoid buildx on push for reasons including:
14-
# * Caching is more complex as builder instances must be considered
15-
# * Platform builds run in parallel, leading to port conflict failures (ex in cassandra)
16-
# * 0.4.2 multi-platform builds have failed due to picking the wrong image for a FROM instruction
1713
set -ue
1814

1915
docker_image=${1?docker_image is required, notably without a tag. Ex openzipkin/zipkin}
2016
version=${2:-master}
2117

22-
# We don't need build kit, but Docker 20.10 no longer accepts --platform
23-
# without it. It is simpler to always enable it vs require maintainers to use
24-
# alternate OCI tools. See https://github.com/moby/moby/issues/41552
25-
export DOCKER_BUILDKIT=1
26-
2718
case ${version} in
2819
master )
2920
is_release=false
@@ -99,14 +90,7 @@ else
9990
manifest_tags="${manifest_tags} ${manifest_tag}"
10091
done
10192

102-
docker manifest create ${tag} ${manifest_tags}
103-
104-
for manifest_tag in ${manifest_tags}; do
105-
docker_arch=$(echo ${manifest_tag} | sed 's/.*-//g')
106-
docker manifest annotate ${tag} ${manifest_tag} --os linux --arch ${docker_arch}
107-
done
108-
109-
echo "Pushing manifest ${manifest_tag}..."
110-
docker manifest push -p ${tag}
93+
echo "Pushing manifest ${tag}..."
94+
docker buildx imagetools create --tag ${tag} ${manifest_tags}
11195
done
11296
fi

0 commit comments

Comments
 (0)