From ed5d1fa8914121029f934b2a4472032a02d05900 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Fri, 19 Sep 2025 06:49:34 +0000 Subject: [PATCH] fix(Dockerfile): remove upx stage --- build/Dockerfile | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index e1e0f849..77cb8215 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -51,23 +51,6 @@ COPY pkg ./pkg RUN go build -o gotenberg -ldflags "-s -w -X 'github.com/gotenberg/gotenberg/v8/cmd.Version=$GOTENBERG_VERSION'" cmd/gotenberg/main.go -# ---------------------------------------------- -# Compress Golang binaries stage -# ---------------------------------------------- -FROM debian:13-slim AS compress-go-binaries-stage - -RUN \ - apt-get update -qq &&\ - apt-get upgrade -yqq &&\ - DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends upx-ucl - -COPY --from=pdfcpu-binary-stage /home/pdfcpu /home/pdfcpu -COPY --from=gotenberg-binary-stage /home/gotenberg /home/gotenberg - -RUN \ - upx-ucl --best /home/pdfcpu &&\ - upx-ucl --best /home/gotenberg - # ---------------------------------------------- # Custom JRE stage # Credits: https://github.com/jodconverter/docker-image-jodconverter-runtime @@ -264,8 +247,8 @@ COPY build/fonts.conf /etc/fonts/conf.d/100-gotenberg.conf COPY --chown=gotenberg:gotenberg build/chromium-hyphen-data /opt/gotenberg/chromium-hyphen-data # Copy the Golang binaries. -COPY --from=compress-go-binaries-stage /home/pdfcpu /usr/bin/ -COPY --from=compress-go-binaries-stage /home/gotenberg /usr/bin/ +COPY --from=pdfcpu-binary-stage /home/pdfcpu /usr/bin/ +COPY --from=gotenberg-binary-stage /home/gotenberg /usr/bin/ # Environment variables required by modules or else. ENV CHROMIUM_BIN_PATH=/usr/bin/chromium