mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 03:08:29 +02:00
102 lines
2.6 KiB
Text
102 lines
2.6 KiB
Text
FROM ubuntu:24.04
|
|
LABEL maintainer="Penpot <docker@penpot.app>"
|
|
|
|
ENV LANG=en_US.UTF-8 \
|
|
LC_ALL=en_US.UTF-8 \
|
|
NODE_VERSION=v22.16.0 \
|
|
DEBIAN_FRONTEND=noninteractive \
|
|
PATH=/opt/node/bin:$PATH
|
|
|
|
RUN set -ex; \
|
|
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
|
|
mkdir -p /etc/resolvconf/resolv.conf.d; \
|
|
echo "nameserver 127.0.0.11" > /etc/resolvconf/resolv.conf.d/tail; \
|
|
apt-get -qq update; \
|
|
apt-get -qqy --no-install-recommends install \
|
|
curl \
|
|
tzdata \
|
|
locales \
|
|
ca-certificates \
|
|
; \
|
|
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 install \
|
|
\
|
|
xvfb \
|
|
fonts-noto-color-emoji \
|
|
fonts-unifont \
|
|
libfontconfig1 \
|
|
libfreetype6 \
|
|
xfonts-cyrillic \
|
|
xfonts-scalable \
|
|
fonts-liberation \
|
|
fonts-ipafont-gothic \
|
|
fonts-wqy-zenhei \
|
|
fonts-tlwg-loma-otf \
|
|
fonts-freefont-ttf \
|
|
\
|
|
libasound2t64 \
|
|
libatk-bridge2.0-0t64 \
|
|
libatk1.0-0t64 \
|
|
libatspi2.0-0t64 \
|
|
libcairo2 \
|
|
libcups2t64 \
|
|
libdbus-1-3 \
|
|
libdrm2 \
|
|
libgbm1 \
|
|
libglib2.0-0t64 \
|
|
libnspr4 \
|
|
libnss3 \
|
|
libpango-1.0-0 \
|
|
libx11-6 \
|
|
libxcb1 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxext6 \
|
|
libxfixes3 \
|
|
libxkbcommon0 \
|
|
libxrandr2 \
|
|
; \
|
|
rm -rf /var/lib/apt/lists/*;
|
|
|
|
RUN set -eux; \
|
|
ARCH="$(dpkg --print-architecture)"; \
|
|
case "${ARCH}" in \
|
|
aarch64|arm64) \
|
|
BINARY_URL="https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-arm64.tar.gz"; \
|
|
;; \
|
|
amd64|x86_64) \
|
|
BINARY_URL="https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64.tar.gz"; \
|
|
;; \
|
|
*) \
|
|
echo "Unsupported arch: ${ARCH}"; \
|
|
exit 1; \
|
|
;; \
|
|
esac; \
|
|
curl -LfsSo /tmp/nodejs.tar.gz ${BINARY_URL}; \
|
|
mkdir -p /opt/node; \
|
|
cd /opt/node; \
|
|
tar -xf /tmp/nodejs.tar.gz --strip-components=1; \
|
|
chown -R root /opt/node; \
|
|
rm -rf /tmp/nodejs.tar.gz; \
|
|
corepack enable; \
|
|
mkdir -p /opt/penpot; \
|
|
chown -R penpot:penpot /opt/penpot;
|
|
|
|
ADD --chown=penpot:penpot ./bundle-exporter/ /opt/penpot/exporter
|
|
|
|
WORKDIR /opt/penpot/exporter
|
|
USER penpot:penpot
|
|
|
|
RUN set -ex; \
|
|
corepack install; \
|
|
yarn install; \
|
|
yarn run playwright install chromium; \
|
|
rm -rf /opt/penpot/.yarn
|
|
|
|
CMD ["node", "app.js"]
|