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:
@ -18,6 +18,7 @@ steps:
|
|||||||
args:
|
args:
|
||||||
- 'buildx'
|
- 'buildx'
|
||||||
- 'build'
|
- 'build'
|
||||||
|
- '--load'
|
||||||
- '-t'
|
- '-t'
|
||||||
- 'darthsim/imgproxy:$TAG_NAME-amd64'
|
- 'darthsim/imgproxy:$TAG_NAME-amd64'
|
||||||
- '-f'
|
- '-f'
|
||||||
@ -33,6 +34,7 @@ steps:
|
|||||||
args:
|
args:
|
||||||
- 'buildx'
|
- 'buildx'
|
||||||
- 'build'
|
- 'build'
|
||||||
|
- '--load'
|
||||||
- '-t'
|
- '-t'
|
||||||
- 'darthsim/imgproxy:$TAG_NAME-amd64'
|
- 'darthsim/imgproxy:$TAG_NAME-amd64'
|
||||||
- '-f'
|
- '-f'
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
ARG BASE_IMAGE_VERSION="v3.11.0"
|
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
|
FROM darthsim/imgproxy-base:${BASE_IMAGE_VERSION} as build
|
||||||
|
|
||||||
ARG BUILDARCH
|
ARG BUILDARCH
|
||||||
@ -11,11 +9,6 @@ RUN dpkg --add-architecture ${BUILDARCH} \
|
|||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libstdc++6:${BUILDARCH}
|
&& 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 CGO_ENABLED=1
|
||||||
ENV GOOS=linux
|
ENV GOOS=linux
|
||||||
ENV GOARCH=$TARGETARCH
|
ENV GOARCH=$TARGETARCH
|
||||||
|
Reference in New Issue
Block a user