1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-06-22 22:37:41 +02:00

Remove multi-arch hack for Go in Dockerfile; Add --load to buildx build

This commit is contained in:
DarthSim
2024-10-22 21:12:46 +03:00
parent 1f0811c018
commit c630ddd309
2 changed files with 2 additions and 7 deletions

View File

@ -1,7 +1,5 @@
ARG BASE_IMAGE_VERSION="v3.11.0"
FROM --platform=${BUILDPLATFORM} darthsim/imgproxy-base:${BASE_IMAGE_VERSION} as base-native
FROM darthsim/imgproxy-base:${BASE_IMAGE_VERSION} as build
ARG BUILDARCH
@ -11,11 +9,6 @@ RUN dpkg --add-architecture ${BUILDARCH} \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libstdc++6:${BUILDARCH}
# This is pretty dirty hack. Building imgproxy under Qemu is pretty slow.
# So we install Go binary native for the BUILDARCH.
RUN rm -rf /usr/local/go
COPY --from=base-native /usr/local/go /usr/local/go
ENV CGO_ENABLED=1
ENV GOOS=linux
ENV GOARCH=$TARGETARCH