We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6f9d1f commit 4f14cc6Copy full SHA for 4f14cc6
buildx-dockerfile.sh
@@ -0,0 +1,15 @@
1
+#!/usr/bin/env bash
2
+
3
+# Create a Dockerfile suitable for a multi-platform build using buildx
4
+# See: https://docs.docker.com/buildx/working-with-buildx/
5
6
+set -o nounset
7
+set -o errexit
8
+set -o pipefail
9
10
+DOCKERFILE=Dockerfile
11
+DOCKERFILEX=Dockerfile-x
12
13
+# We don't want this expression to expand.
14
+# shellcheck disable=SC2016
15
+sed 's/^FROM /FROM --platform=$TARGETPLATFORM /g' < $DOCKERFILE > $DOCKERFILEX
0 commit comments