diff --git a/hack/init-buildx.sh b/hack/init-buildx.sh index 23b79af91..87fa0251a 100755 --- a/hack/init-buildx.sh +++ b/hack/init-buildx.sh @@ -24,6 +24,11 @@ set -o pipefail export DOCKER_CLI_EXPERIMENTAL=enabled +if ! docker buildx 2>&1 >/dev/null; then + echo "buildx not available. Docker 19.03 or higher is required with experimental features enabled" + exit 1 +fi + # We can skip setup if the current builder already has multi-arch # AND if it isn't the docker driver, which doesn't work current_builder="$(docker buildx inspect)" diff --git a/images/nginx/cloudbuild.yaml b/images/nginx/cloudbuild.yaml index 45667219d..261147885 100644 --- a/images/nginx/cloudbuild.yaml +++ b/images/nginx/cloudbuild.yaml @@ -4,13 +4,16 @@ options: # job builds a multi-arch docker image for amd64,arm,arm64 and s390x. machineType: N1_HIGHCPU_32 steps: - - name: gcr.io/k8s-testimages/gcb-docker-gcloud:v20200422-b25d964 + - name: gcr.io/k8s-testimages/gcb-docker-gcloud:v20200619-68869a4 entrypoint: bash env: - DOCKER_CLI_EXPERIMENTAL=enabled - TAG=$_GIT_TAG - BASE_REF=$_PULL_BASE_REF - REGISTRY=gcr.io/k8s-staging-ingress-nginx + # default cloudbuild has HOME=/builder/home and docker buildx is in /root/.docker/cli-plugins/docker-buildx + # set the home to /root explicitly to if using docker buildx + - HOME=/root args: - -c - |