From a623769a4810730d7871221fec0fb6ac60264e6c Mon Sep 17 00:00:00 2001 From: JuLi0n21 Date: Tue, 3 Mar 2026 20:26:37 +0100 Subject: [PATCH] split up dependencys into smaller chunks maybe this will be allow to be pushed... --- server/Dockerfile | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 4927b2c..8a2e008 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,26 +1,34 @@ -FROM golang:1.26.0 AS builder +FROM golang:1.24.2 AS builder -WORKDIR /build -COPY go.mod go.sum ./ - -RUN go mod download -COPY . . - -RUN go build -o /app/thumbnail-service - -FROM debian:bookworm-slim WORKDIR /app -RUN apt-get update -RUN apt-get install -y --no-install-recommends imagemagick -RUN apt-get install -y --no-install-recommends ffmpeg -RUN apt-get install -y --no-install-recommends poppler-utils -RUN apt-get install -y --no-install-recommends qpdf -RUN apt-get install -y --no-install-recommends ocrmypdf +COPY . . -RUN apt-get clean && rm -rf /var/lib/apt/lists/* +RUN go mod tidy && \ + CGO_ENABLED=0 GOOS=linux go build -o thumbnail-service + +FROM alpine:3.21 + +RUN apk add --no-cache python3 py3-pip + +RUN apk add --no-cache ghostscript + +RUN apk add --no-cache tesseract-ocr tesseract-ocr-data-eng tesseract-ocr-data-deu + +RUN apk add --no-cache x264-libs x265-libs libvpx dav1d aom-libs + +RUN apk add --no-cache ffmpeg + +RUN apk add --no-cache imagemagick poppler-utils qpdf + +RUN apk add --no-cache py3-pillow py3-reportlab py3-pikepdf py3-cryptography + +RUN apk add --no-cache ocrmypdf + +WORKDIR /app COPY --from=builder /app/thumbnail-service . EXPOSE 50051 + CMD ["./thumbnail-service"]