Skip to content

Commit

Permalink
Move TARGETARCH declaration to the top of the Dockerfile
Browse files Browse the repository at this point in the history
There is a bug in podman where this is only used correctly for the
multi-stage build if it is defined as the first line.
  • Loading branch information
samdoran committed Jun 28, 2024
1 parent 4baa511 commit efc7aaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG TARGETARCH

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest AS base

USER root
Expand Down Expand Up @@ -61,8 +63,6 @@ RUN ldconfig
# No intermetiate steps for x86_64, but declare it so it can be used for the final image
FROM --platform=amd64 base AS stage-amd64

ARG TARGETARCH

FROM stage-${TARGETARCH} AS final
# PIPENV_DEV is set to true in the docker-compose allowing
# local builds to install the dev dependencies
Expand Down

0 comments on commit efc7aaa

Please sign in to comment.