Unverified Commit c5fd9610 by Kubernetes Prow Robot Committed by GitHub

Merge pull request #89 from pohly/cloud-build-binfmt

cloud build: initialize support for running commands in Dockerfile
parents be902f40 db0c2a7d
...@@ -1198,6 +1198,12 @@ gcr_cloud_build () { ...@@ -1198,6 +1198,12 @@ gcr_cloud_build () {
# Required for "docker buildx build --push". # Required for "docker buildx build --push".
gcloud auth configure-docker gcloud auth configure-docker
if find . -name Dockerfile | grep -v ^./vendor | xargs --no-run-if-empty cat | grep -q ^RUN; then
# Needed for "RUN" steps on non-linux/amd64 platforms.
# See https://github.com/multiarch/qemu-user-static#getting-started
(set -x; docker run --rm --privileged multiarch/qemu-user-static --reset -p yes)
fi
# Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value. # Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value.
REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v') REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment