Skip to content

Commit c5fd961

Browse files
authored
Merge pull request kubernetes-csi#89 from pohly/cloud-build-binfmt
cloud build: initialize support for running commands in Dockerfile
2 parents be902f4 + db0c2a7 commit c5fd961

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

prow.sh

+6
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,12 @@ gcr_cloud_build () {
11981198
# Required for "docker buildx build --push".
11991199
gcloud auth configure-docker
12001200

1201+
if find . -name Dockerfile | grep -v ^./vendor | xargs --no-run-if-empty cat | grep -q ^RUN; then
1202+
# Needed for "RUN" steps on non-linux/amd64 platforms.
1203+
# See https://github.com/multiarch/qemu-user-static#getting-started
1204+
(set -x; docker run --rm --privileged multiarch/qemu-user-static --reset -p yes)
1205+
fi
1206+
12011207
# Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value.
12021208
REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v')
12031209

0 commit comments

Comments
 (0)