diff --git a/Makefile b/Makefile index 3ac3302a..72c361ae 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ DOCKER_REPOSITORY=gotenberg GOTENBERG_VERSION=snapshot GOTENBERG_USER_GID=1001 GOTENBERG_USER_UID=1001 +NOTO_COLOR_EMOJI_VERSION=v2.028 # See https://github.com/googlefonts/noto-emoji/releases. PDFTK_VERSION=1353200058 # See https://gitlab.com/pdftk-java/pdftk/-/releases - Binary package. GOLANGCI_LINT_VERSION=v1.42.0 # See https://github.com/golangci/golangci-lint/releases. @@ -20,6 +21,7 @@ build: ## Build the Gotenberg's Docker image --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) \ -t $(DOCKER_REPOSITORY)/gotenberg:$(GOTENBERG_VERSION) \ -f build/Dockerfile . diff --git a/build/Dockerfile b/build/Dockerfile index e067d3a7..7377c889 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -48,6 +48,7 @@ COPY build/pdftk.sh /usr/bin/pdftk # Setup the Docker image. ARG GOTENBERG_USER_GID ARG GOTENBERG_USER_UID +ARG NOTO_COLOR_EMOJI_VERSION ARG PDFTK_VERSION # Script for installing either Google Chrome stable on amd64 architecture or @@ -108,6 +109,11 @@ RUN \ fonts-sil-gentium \ fonts-sil-gentium-basic &&\ rm -f ./ttf-mscorefonts-installer_3.8_all.deb &&\ + # Add Color and Black-and-White Noto emoji font. + # Credits: + # https://github.com/gotenberg/gotenberg/pull/325. + # https://github.com/googlefonts/noto-emoji. + curl -Ls "https://github.com/googlefonts/noto-emoji/raw/$NOTO_COLOR_EMOJI_VERSION/fonts/NotoColorEmoji.ttf" -o /usr/local/share/fonts/NotoColorEmoji.ttf &&\ # Install Google Chrome / Chromium. /tmp/install-chromium.sh &&\ # Install LibreOffice.