Skip to content

Commit

Permalink
Possible fix for multi-arch build failures (#15)
Browse files Browse the repository at this point in the history
Enables buildx in an attempt to resolve issue #14
Also removes ryuk overrides as the issue has since been resolved
  • Loading branch information
llinder authored Sep 7, 2021
1 parent 6a2e102 commit ec1bf9e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions build-bin/docker/configure_docker
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,8 @@ set -ue
# * See https://www.testcontainers.org/supported_docker_environment/image_registry_rate_limiting/
# * checks.disable=true - saves time and a docker.io pull of alpine
echo checks.disable=true >> ~/.testcontainers.properties
# * change ryuk to ghcr.io until: https://github.com/testcontainers/moby-ryuk/issues/15 and 16
echo ryuk.container.image=ghcr.io/openzipkin/testcontainers-ryuk:latest >> ~/.testcontainers.properties

# We don't use any docker.io images, but add a Google's mirror in case something implicitly does
# * See https://cloud.google.com/container-registry/docs/pulling-cached-images
echo '{ "registry-mirrors": ["https://mirror.gcr.io"] }' | sudo tee /etc/docker/daemon.json
sudo service docker restart

# * Ensure buildx and related features are disabled
mkdir -p ${HOME}/.docker && echo '{"experimental":"disabled"}' > ${HOME}/.docker/config.json
6 changes: 1 addition & 5 deletions build-bin/docker/docker_build
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@ docker_tag=${1?full docker_tag is required. Ex openzipkin/zipkin:test}
version=${2:-}
docker_args=$($(dirname "$0")/docker_args ${version})

# Avoid buildx on load for reasons including:
# * Caching is more complex as builder instances must be considered
# * It only supports one platform/arch on load https://github.com/docker/buildx/issues/59
# * It would pull Docker Hub for moby/buildkit or multiarch/qemu-user-static images, using up quota
echo "Building image ${docker_tag}"
DOCKER_BUILDKIT=0 docker build --pull ${docker_args} --tag ${docker_tag} .
DOCKER_BUILDKIT=1 docker build --pull ${docker_args} --tag ${docker_tag} .
2 changes: 1 addition & 1 deletion build-bin/docker/docker_push
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set -ue

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

case ${version} in
master )
Expand Down

0 comments on commit ec1bf9e

Please sign in to comment.