penpot/docker/images/Dockerfile.media-processor
Andrey Antukh aa12e52081
⬆️ Update the system dependencies of the devenv and the images (#13144)
* ⬆️ Bump the JDK to 27.0.1.1 on devenv and the backend image

The devenv image compiled the backend bundle with JDK 27 while the
production image ran JDK 26. The runtime starts with --enable-preview,
so a runtime line behind the compiler line is a silent trap rather than
a working setup.

Both pins now use Zulu 27.0.1.1 (zulu27.30.201-ca), the current GA of
the line, with the same sums on both architectures. The jlink module
list in the backend image still resolves on 27, so it does not change.

Sums checked by downloading both tarballs; the jlink JRE built from
them starts and reports 27.0.1.1.

AI-assisted-by: deepseek-v4.1-flash

* 🔥 Remove the unused gitpod setup

No workflow built docker/gitpod and its AdoptOpenJDK 16 install no
longer matches the devenv. The README badge linked to a setup that no
longer exists, so it goes with it.

The historical changelog entry stays: CHANGES.md is generated from the
milestones.

AI-assisted-by: deepseek-v4.1-flash

* ⬆️ Bring the docker/ updates from develop

Move the devenv and the production images to what develop already
carries:

- Base images to the current dhi.io digests.
- Node 24.22.3 and pnpm 12.21.0 in the devenv image and in every
  production Dockerfile that ships pnpm.
- Rust 1.99.0 and Serena 2.1.0, with SERENA_UPDATE_VERSION raised to
  match and a note that it must never be lower than the image pin.
- tini as the exporter ENTRYPOINT.

Devenv additions: PENPOT_DEVENV=true so the frontend compiles with the
admin console disabled by default, xauth and libvulkan1 plus the GPU
compose overlay, the MCP OAuth metadata route in nginx, and clipboard
support in tmux.

The JDK stays at 27.0.1.1 on both pins.

AI-assisted-by: deepseek-v4.1-flash

* ⬆️ Finish the Node 24.22.3 bump outside docker/

The docker/ import brought Node 24.22.3 into the devenv and the image
tags while .nvmrc and the two plugins-deploy workflows stayed on
24.22.2.

Node stays on the 24.x line on every site: the plugins-deploy runtime
pins follow .nvmrc, even though develop moved them to node@26.13.1 in
99db795966.

AI-assisted-by: deepseek-v4.1-flash
2026-11-18 12:51:30 +01:00

96 lines
2.9 KiB
Docker

# syntax=docker/dockerfile:1
FROM dhi.io/node:24.22.3-debian13-dev@sha256:dee4bb11f4cb32ad31000287af8795f772ac801338a166a0e9fbbadd9674a2f8
LABEL maintainer="Penpot <docker@penpot.app>"
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
DEBIAN_FRONTEND=noninteractive
# passwd provides useradd, not preinstalled on the DHI base image.
RUN set -ex; \
apt-get -qq update; \
apt-get -qqy --no-install-recommends install passwd; \
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
apt-get -qqy --no-install-recommends install \
curl \
tzdata \
locales \
ca-certificates \
; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
locale-gen; \
find /usr/share/i18n/locales/ -type f ! -name "en_US" ! -name "POSIX" ! -name "C" -delete;
RUN set -ex; \
apt-get -qq update; \
apt-get -qqy --no-install-recommends install \
fontforge \
woff-tools \
woff2 \
\
libgomp1 \
libheif1 \
libjpeg62-turbo \
liblcms2-2 \
libopenjp2-7 \
libpng16-16 \
librsvg2-2 \
libtiff6 \
libwebp7 \
libwebpdemux2 \
libwebpmux3 \
libxml2 \
libzip5 \
libzstd1 \
; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
mkdir -p /opt/penpot; \
chown -R penpot:penpot /opt/penpot;
ARG BUNDLE_PATH="./bundle-media-processor/"
COPY --chown=penpot:penpot $BUNDLE_PATH /opt/penpot/media-processor/
WORKDIR /opt/penpot/media-processor
# pnpm ships as a system binary (same tarball + SHA pin as
# docker/devenv/Dockerfile); ./setup expects it on PATH.
# Corepack is gone from Node 25+, so nothing here may use it.
ARG PNPM_VERSION=12.21.0
RUN set -eux; \
apt-get -qq update; \
apt-get -qqy --no-install-recommends install gzip; \
rm -rf /var/lib/apt/lists/*; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
PNPM_ARCH='arm64'; \
PNPM_SHA256='6c5913a48c93b3a556b71c3bd9bf12c6bf9fbfbbbd2dcbd1d52a85c539751b9e'; \
;; \
amd64|x86_64) \
PNPM_ARCH='x64'; \
PNPM_SHA256='84c4773bcf4a217f4083cd7b2a91e4cee6103cf42426c1282ef37d308f55a410'; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
curl -LfsSo /tmp/pnpm.tar.gz "https://github.com/pnpm/pnpm/releases/download/v${PNPM_VERSION}/pnpm-linux-${PNPM_ARCH}.tar.gz"; \
echo "${PNPM_SHA256} */tmp/pnpm.tar.gz" | sha256sum -c -; \
mkdir -p /usr/local/bin; \
tar -xzf /tmp/pnpm.tar.gz -C /usr/local/bin pnpm; \
chmod 755 /usr/local/bin/pnpm; \
rm -f /tmp/pnpm.tar.gz; \
pnpm --version;
# Runs as root: this base image installs Node system-wide (symlinked into
# /usr/bin), so ./setup needs write access there.
RUN ./setup && chown -R penpot:penpot /opt/penpot/media-processor
USER penpot:penpot
CMD ["node", "dist/index.js"]