mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-18 21:22:15 +01:00
Pin versions of dependencies
This commit is contained in:
9
.env
9
.env
@@ -1,13 +1,6 @@
|
|||||||
GOLANG_VERSION=1.24
|
GOTENBERG_VERSION=snapshot
|
||||||
DOCKER_REGISTRY=gotenberg
|
DOCKER_REGISTRY=gotenberg
|
||||||
DOCKER_REPOSITORY=gotenberg
|
DOCKER_REPOSITORY=gotenberg
|
||||||
GOTENBERG_VERSION=snapshot
|
|
||||||
GOTENBERG_USER_GID=1001
|
|
||||||
GOTENBERG_USER_UID=1001
|
|
||||||
NOTO_COLOR_EMOJI_VERSION=v2.047 # See https://github.com/googlefonts/noto-emoji/releases.
|
|
||||||
PDFTK_VERSION=v3.3.3 # See https://gitlab.com/pdftk-java/pdftk/-/releases - Binary package.
|
|
||||||
PDFCPU_VERSION=v0.8.1 # See https://github.com/pdfcpu/pdfcpu/releases.
|
|
||||||
GOTENBERG_VERSION=snapshot
|
|
||||||
DOCKERFILE=build/Dockerfile
|
DOCKERFILE=build/Dockerfile
|
||||||
DOCKERFILE_CLOUDRUN=build/Dockerfile.cloudrun
|
DOCKERFILE_CLOUDRUN=build/Dockerfile.cloudrun
|
||||||
DOCKER_BUILD_CONTEXT='.'
|
DOCKER_BUILD_CONTEXT='.'
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -7,13 +7,6 @@ help: ## Show the help
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: ## Build the Gotenberg's Docker image
|
build: ## Build the Gotenberg's Docker image
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
|
|
||||||
--build-arg GOTENBERG_VERSION=$(GOTENBERG_VERSION) \
|
|
||||||
--build-arg GOTENBERG_USER_GID=$(GOTENBERG_USER_GID) \
|
|
||||||
--build-arg GOTENBERG_USER_UID=$(GOTENBERG_USER_UID) \
|
|
||||||
--build-arg NOTO_COLOR_EMOJI_VERSION=$(NOTO_COLOR_EMOJI_VERSION) \
|
|
||||||
--build-arg PDFTK_VERSION=$(PDFTK_VERSION) \
|
|
||||||
--build-arg PDFCPU_VERSION=$(PDFCPU_VERSION) \
|
|
||||||
-t $(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION) \
|
-t $(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION) \
|
||||||
-f $(DOCKERFILE) $(DOCKER_BUILD_CONTEXT)
|
-f $(DOCKERFILE) $(DOCKER_BUILD_CONTEXT)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# ARG instructions do not create additional layers. Instead, next layers will
|
# ARG instructions do not create additional layers. Instead, next layers will
|
||||||
# concatenate them. Also, we have to repeat ARG instructions in each build
|
# concatenate them. Also, we have to repeat ARG instructions in each build
|
||||||
# stage that uses them.
|
# stage that uses them.
|
||||||
ARG GOLANG_VERSION
|
ARG GOLANG_VERSION=1.24
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# pdfcpu binary build stage
|
# pdfcpu binary build stage
|
||||||
@@ -11,7 +11,8 @@ ARG GOLANG_VERSION
|
|||||||
|
|
||||||
FROM golang:$GOLANG_VERSION AS pdfcpu-binary-stage
|
FROM golang:$GOLANG_VERSION AS pdfcpu-binary-stage
|
||||||
|
|
||||||
ARG PDFCPU_VERSION
|
# See https://github.com/pdfcpu/pdfcpu/releases.
|
||||||
|
ARG PDFCPU_VERSION=v0.8.1
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
|
|
||||||
# Define the working directory outside of $GOPATH (we're using go modules).
|
# Define the working directory outside of $GOPATH (we're using go modules).
|
||||||
@@ -33,7 +34,7 @@ RUN go build -o pdfcpu -ldflags "-s -w -X 'main.version=$PDFCPU_VERSION' -X 'git
|
|||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
FROM golang:$GOLANG_VERSION AS gotenberg-binary-stage
|
FROM golang:$GOLANG_VERSION AS gotenberg-binary-stage
|
||||||
|
|
||||||
ARG GOTENBERG_VERSION
|
ARG GOTENBERG_VERSION=snapshot
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
|
|
||||||
# Define the working directory outside of $GOPATH (we're using go modules).
|
# Define the working directory outside of $GOPATH (we're using go modules).
|
||||||
@@ -56,11 +57,15 @@ RUN go build -o gotenberg -ldflags "-X 'github.com/gotenberg/gotenberg/v8/cmd.Ve
|
|||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
FROM debian:12-slim
|
FROM debian:12-slim
|
||||||
|
|
||||||
ARG GOTENBERG_VERSION
|
ARG GOTENBERG_VERSION=snapshot
|
||||||
ARG GOTENBERG_USER_GID
|
ARG GOTENBERG_USER_GID=1001
|
||||||
ARG GOTENBERG_USER_UID
|
ARG GOTENBERG_USER_UID=1001
|
||||||
ARG NOTO_COLOR_EMOJI_VERSION
|
|
||||||
ARG PDFTK_VERSION
|
# See https://github.com/googlefonts/noto-emoji/releases.
|
||||||
|
ARG NOTO_COLOR_EMOJI_VERSION=v2.047
|
||||||
|
|
||||||
|
# See https://gitlab.com/pdftk-java/pdftk/-/releases - Binary package.
|
||||||
|
ARG PDFTK_VERSION=v3.3.3
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Gotenberg" \
|
LABEL org.opencontainers.image.title="Gotenberg" \
|
||||||
org.opencontainers.image.description="A containerized API for seamless PDF conversion." \
|
org.opencontainers.image.description="A containerized API for seamless PDF conversion." \
|
||||||
@@ -82,7 +87,7 @@ RUN \
|
|||||||
# Note: tini is a helper for reaping zombie processes.
|
# Note: tini is a helper for reaping zombie processes.
|
||||||
apt-get update -qq &&\
|
apt-get update -qq &&\
|
||||||
apt-get upgrade -yqq &&\
|
apt-get upgrade -yqq &&\
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends curl gnupg tini python3 default-jre-headless &&\
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends curl gnupg=2.2.40-1.1 tini=0.19.0-1 python3=3.11.2-1+b1 default-jre-headless=2:1.17-74 &&\
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
# Note: the Debian image does automatically a clean after each install thanks to a hook.
|
# Note: the Debian image does automatically a clean after each install thanks to a hook.
|
||||||
# Therefore, there is no need for apt-get clean.
|
# Therefore, there is no need for apt-get clean.
|
||||||
@@ -99,40 +104,40 @@ RUN \
|
|||||||
apt-get upgrade -yqq &&\
|
apt-get upgrade -yqq &&\
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
||||||
./ttf-mscorefonts-installer_3.8.1_all.deb \
|
./ttf-mscorefonts-installer_3.8.1_all.deb \
|
||||||
culmus \
|
culmus=0.133-1 \
|
||||||
fonts-beng \
|
fonts-beng=2:1.3 \
|
||||||
fonts-hosny-amiri \
|
fonts-hosny-amiri=0.113-1 \
|
||||||
fonts-lklug-sinhala \
|
fonts-lklug-sinhala=0.6-4 \
|
||||||
fonts-lohit-guru \
|
fonts-lohit-guru=2.91.2-3 \
|
||||||
fonts-lohit-knda \
|
fonts-lohit-knda=2.5.4-3 \
|
||||||
fonts-samyak-gujr \
|
fonts-samyak-gujr=1.2.2-6 \
|
||||||
fonts-samyak-mlym \
|
fonts-samyak-mlym=1.2.2-6 \
|
||||||
fonts-samyak-taml \
|
fonts-samyak-taml=1.2.2-6 \
|
||||||
fonts-sarai \
|
fonts-sarai=1.0-3 \
|
||||||
fonts-sil-abyssinica \
|
fonts-sil-abyssinica=2.100-3 \
|
||||||
fonts-sil-padauk \
|
fonts-sil-padauk=5.000-3 \
|
||||||
fonts-telu \
|
fonts-telu=2:1.3 \
|
||||||
fonts-thai-tlwg \
|
fonts-thai-tlwg=1:0.7.3-1 \
|
||||||
ttf-wqy-zenhei \
|
ttf-wqy-zenhei \
|
||||||
fonts-arphic-ukai \
|
fonts-arphic-ukai=0.2.20080216.2-5 \
|
||||||
fonts-arphic-uming \
|
fonts-arphic-uming=0.2.20080216.2-11 \
|
||||||
fonts-ipafont-mincho \
|
fonts-ipafont-mincho=00303-23 \
|
||||||
fonts-ipafont-gothic \
|
fonts-ipafont-gothic=00303-23 \
|
||||||
fonts-unfonts-core \
|
fonts-unfonts-core=1:1.0.2-080608-18 \
|
||||||
# LibreOffice recommends.
|
# LibreOffice recommends.
|
||||||
fonts-crosextra-caladea \
|
fonts-crosextra-caladea=20200211-1 \
|
||||||
fonts-crosextra-carlito \
|
fonts-crosextra-carlito=20220224-1 \
|
||||||
fonts-dejavu \
|
fonts-dejavu=2.37-6 \
|
||||||
fonts-dejavu-extra \
|
fonts-dejavu-extra=2.37-6 \
|
||||||
fonts-liberation \
|
fonts-liberation=1:1.07.4-11 \
|
||||||
fonts-liberation2 \
|
fonts-liberation2=2.1.5-1 \
|
||||||
fonts-linuxlibertine \
|
fonts-linuxlibertine=5.3.0-6 \
|
||||||
fonts-noto-cjk \
|
fonts-noto-cjk=1:20220127+repack1-1 \
|
||||||
fonts-noto-core \
|
fonts-noto-core=20201225-1 \
|
||||||
fonts-noto-mono \
|
fonts-noto-mono=20201225-1 \
|
||||||
fonts-noto-ui-core \
|
fonts-noto-ui-core=20201225-1 \
|
||||||
fonts-sil-gentium \
|
fonts-sil-gentium=20081126:1.03-4 \
|
||||||
fonts-sil-gentium-basic &&\
|
fonts-sil-gentium-basic=1.102-1.1 &&\
|
||||||
rm -f ./ttf-mscorefonts-installer_3.8.1_all.deb &&\
|
rm -f ./ttf-mscorefonts-installer_3.8.1_all.deb &&\
|
||||||
# Add Color and Black-and-White Noto emoji font.
|
# Add Color and Black-and-White Noto emoji font.
|
||||||
# Credits:
|
# Credits:
|
||||||
@@ -170,7 +175,7 @@ RUN \
|
|||||||
echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list &&\
|
echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list &&\
|
||||||
apt-get update -qq &&\
|
apt-get update -qq &&\
|
||||||
apt-get upgrade -yqq &&\
|
apt-get upgrade -yqq &&\
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -t bookworm-backports libreoffice &&\
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -t bookworm-backports libreoffice=4:25.2.2-1~bpo12+1 &&\
|
||||||
curl -Ls https://raw.githubusercontent.com/gotenberg/unoconverter/v0.1.1/unoconv -o /usr/bin/unoconverter &&\
|
curl -Ls https://raw.githubusercontent.com/gotenberg/unoconverter/v0.1.1/unoconv -o /usr/bin/unoconverter &&\
|
||||||
chmod +x /usr/bin/unoconverter &&\
|
chmod +x /usr/bin/unoconverter &&\
|
||||||
# unoconverter will look for the Python binary, which has to be at version 3.
|
# unoconverter will look for the Python binary, which has to be at version 3.
|
||||||
@@ -186,11 +191,11 @@ RUN \
|
|||||||
# See https://github.com/gotenberg/gotenberg/pull/273.
|
# See https://github.com/gotenberg/gotenberg/pull/273.
|
||||||
curl -o /usr/bin/pdftk-all.jar "https://gitlab.com/api/v4/projects/5024297/packages/generic/pdftk-java/$PDFTK_VERSION/pdftk-all.jar" &&\
|
curl -o /usr/bin/pdftk-all.jar "https://gitlab.com/api/v4/projects/5024297/packages/generic/pdftk-java/$PDFTK_VERSION/pdftk-all.jar" &&\
|
||||||
chmod a+x /usr/bin/pdftk-all.jar &&\
|
chmod a+x /usr/bin/pdftk-all.jar &&\
|
||||||
echo '#!/bin/bash\n\nexec java -jar /usr/bin/pdftk-all.jar "$@"' > /usr/bin/pdftk && \
|
printf '#!/bin/bash\n\nexec java -jar /usr/bin/pdftk-all.jar "$@"' > /usr/bin/pdftk && \
|
||||||
chmod +x /usr/bin/pdftk &&\
|
chmod +x /usr/bin/pdftk &&\
|
||||||
apt-get update -qq &&\
|
apt-get update -qq &&\
|
||||||
apt-get upgrade -yqq &&\
|
apt-get upgrade -yqq &&\
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends qpdf exiftool &&\
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends qpdf=11.3.0-1+deb12u1 exiftool &&\
|
||||||
# See https://github.com/nextcloud/docker/issues/380.
|
# See https://github.com/nextcloud/docker/issues/380.
|
||||||
mkdir -p /usr/share/man/man1 &&\
|
mkdir -p /usr/share/man/man1 &&\
|
||||||
# Verify installations.
|
# Verify installations.
|
||||||
|
|||||||
Reference in New Issue
Block a user