File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,18 @@ set -o nounset
2323
2424root_dir=$( git rev-parse --show-toplevel)
2525
26+ # Platform to use for building and running containers
27+ # Use linux/amd64 for compatibility with base images that may not have ARM64 variants
28+ PLATFORM=" linux/amd64"
29+
2630latest_release=$( gh api ' /repos/konflux-ci/rpm-lockfile-prototype/tags?per_page=1' --jq ' .[0].name' )
2731
2832# build the image for running the RPM lock tool
2933echo Building RPM lock tooling image...
30- image=$( podman build --quiet --file <( cat << DOCKERFILE
34+ dockerfile=$( mktemp " ${TMPDIR:-/ tmp} /rpm-lock-dockerfile.XXXXXX" )
35+ trap " rm -f ${dockerfile} " EXIT
36+
37+ cat > " ${dockerfile} " << DOCKERFILE
3138FROM quay.io/openshift/origin-cli:latest as oc-cli
3239
3340# Python version needs to match whatever version of Python dnf itself depends on
@@ -46,7 +53,8 @@ COPY --from=oc-cli /usr/bin/oc /usr/bin
4653
4754ENV PYTHONPATH=/usr/lib64/python3.9/site-packages:/usr/lib/python3.9/site-packages
4855DOCKERFILE
49- ) )
56+
57+ image=$( podman build --platform " ${PLATFORM} " --quiet --file " ${dockerfile} " .)
5058
5159echo " Built: ${image} "
5260
97105
98106echo Running RPM lock tooling...
99107podman run \
108+ --platform " ${PLATFORM} " \
100109 --rm \
101110 --volume " ${root_dir} /Dockerfile.dist:/opt/app-root/src/Dockerfile:Z" \
102111 --volume " ${root_dir} /rpms.in.yaml:/opt/app-root/src/rpms.in.yaml:Z" \
You can’t perform that action at this time.
0 commit comments