github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/docker/custom-scripts/setup-docker-multiarch.sh (about) 1 #!/usr/bin/env bash 2 # 3 # Copyright 2021 The Dapr Authors 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # Unless required by applicable law or agreed to in writing, software 9 # distributed under the License is distributed on an "AS IS" BASIS, 10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 # See the License for the specific language governing permissions and 12 # limitations under the License. 13 14 # This script sets up the current environment to be able to build multi-arch Docker images, installing QEMU 15 16 set -e 17 18 # Set up QEMU 19 docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64,arm 20 21 # Create a buildx builder with support for multi-arch 22 docker buildx create --use --name mybuilder