diff --git a/docker/prod/Dockerfile b/docker/prod/Dockerfile index ce438623..34b851b6 100644 --- a/docker/prod/Dockerfile +++ b/docker/prod/Dockerfile @@ -1,5 +1,5 @@ -# Set also `ARCH` ARG here so we can use it on all the `FROM`s. -ARG ARCH +# Set also `ALPINE_ARCH` ARG here so we can use it on all the `FROM`s. +ARG ALPINE_ARCH FROM golang:1.23.0-alpine as build-stage @@ -15,8 +15,6 @@ ENV VERSION=${VERSION} ARG ARCH ENV GOARCH=${ARCH} -ARG ALPINE_ARCH - # Compile. WORKDIR /src COPY . . diff --git a/scripts/build/docker/build-image.sh b/scripts/build/docker/build-image.sh index 2eb7a6ba..5f1909a5 100755 --- a/scripts/build/docker/build-image.sh +++ b/scripts/build/docker/build-image.sh @@ -13,6 +13,8 @@ ARCH=${ARCH:-$DEF_ARCH} IMAGE_TAG_ARCH="${IMAGE}:${VERSION}-${ARCH}" # Guess Alpine image arch. Take the same as $ARCH by default. +ALPINE_ARCH="${ARCH}" + case $ARCH in arm64) ALPINE_ARCH="arm64v8" @@ -21,10 +23,6 @@ case $ARCH in arm) ALPINE_ARCH="arm32v7" ;; - - *) - ALPINE_ARCH="${ARCH}" - ;; esac # Build image.