summaryrefslogtreecommitdiff
path: root/openjdk-runtime/build
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-07-04 05:32:59 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-07-04 05:32:59 +0200
commitd6350b3841ff03e2d47365d2cacf06adc3245359 (patch)
treecc766c08feff8bda0ce2de4f2e59b23669754dfb /openjdk-runtime/build
parent07a9e5d588692195c659cd5fc5c5fd0b948ff299 (diff)
Fix platform to linux/amd64.
Change-Id: Ia6601b4cb63b0fc6f9137d0947a6681f1d9a803a
Diffstat (limited to 'openjdk-runtime/build')
-rwxr-xr-xopenjdk-runtime/build7
1 files changed, 5 insertions, 2 deletions
diff --git a/openjdk-runtime/build b/openjdk-runtime/build
index 629823b..5b94efc 100755
--- a/openjdk-runtime/build
+++ b/openjdk-runtime/build
@@ -9,6 +9,7 @@ cd "$(dirname $(readlink -e "$0"))"
image=docker.benkard.de/mulk/openjdk-runtime:latest
dependencies=(registry.access.redhat.com/ubi9/ubi-micro:latest registry.access.redhat.com/ubi9/ubi-minimal:latest)
+platform=linux/amd64
use_kaniko=no
./prepare
@@ -16,6 +17,7 @@ use_kaniko=no
if [[ "${use_kaniko}" == yes ]]; then
docker run \
--mount type=bind,src="$PWD",target=/workspace \
+ --platform "${platform}" \
gcr.io/kaniko-project/warmer:latest \
--cache-dir=/workspace/cache \
--image=registry.access.redhat.com/ubi9/ubi-micro:latest \
@@ -24,6 +26,7 @@ if [[ "${use_kaniko}" == yes ]]; then
docker run \
--mount type=bind,src="$PWD",target=/workspace \
--mount type=bind,src="$HOME/.docker",target=/root/.docker,ro=true \
+ --platform "${platform}" \
gcr.io/kaniko-project/executor:latest \
--dockerfile Dockerfile \
--destination "${image}" \
@@ -33,8 +36,8 @@ if [[ "${use_kaniko}" == yes ]]; then
--reproducible=true
else
for x in "${dependencies[@]}"; do
- docker pull "$x"
+ docker pull --platform "${platform}" "$x"
done
- docker build -t "${image}" .
+ docker build --platform "${platform}" -t "${image}" .
docker push "${image}"
fi