mirror of
https://github.com/penpot/penpot.git
synced 2026-09-23 20:36:15 +00:00
🐛 Create /usr/local/bin before extracting pnpm in DHI images
dhi.io/node:24.20.0-debian13-dev does not pre-create /usr/local/bin the way a regular Debian image does, so tar -xzf ... -C /usr/local/bin failed with "Cannot open: No such file or directory" right after the checksum check passed. Introduced in #11790 when pnpm moved from Corepack to a downloaded standalone binary. Dockerfile.media-processor and docker/devenv/Dockerfile are unaffected: both extract into /opt/node/bin, which already exists from the prior Node.js install step. Signed-off-by: David Barragán Merino <david.barragan@kaleidos.net>
This commit is contained in:
parent
efb10c82a8
commit
0d2632fc8c
@ -1,127 +1 @@
|
|||||||
FROM dhi.io/node:24.20.0-debian13-dev
|
mkdir -p /usr/local/bin; \
|
||||||
LABEL maintainer="Penpot <docker@penpot.app>"
|
|
||||||
|
|
||||||
ENV LANG=en_US.UTF-8 \
|
|
||||||
LC_ALL=en_US.UTF-8 \
|
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
|
||||||
PATH=/opt/imagick/bin:$PATH \
|
|
||||||
PLAYWRIGHT_BROWSERS_PATH=/opt/penpot/browsers
|
|
||||||
|
|
||||||
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 -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade; \
|
|
||||||
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 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 \
|
|
||||||
poppler-utils \
|
|
||||||
\
|
|
||||||
libasound2 \
|
|
||||||
libatk-bridge2.0-0 \
|
|
||||||
libatk1.0-0 \
|
|
||||||
libatspi2.0-0 \
|
|
||||||
libcairo2 \
|
|
||||||
libcups2 \
|
|
||||||
libdbus-1-3 \
|
|
||||||
libdrm2 \
|
|
||||||
libgbm1 \
|
|
||||||
libglib2.0-0 \
|
|
||||||
libnspr4 \
|
|
||||||
libnss3 \
|
|
||||||
libpango-1.0-0 \
|
|
||||||
libx11-6 \
|
|
||||||
libxcb1 \
|
|
||||||
libxcomposite1 \
|
|
||||||
libxdamage1 \
|
|
||||||
libxext6 \
|
|
||||||
libxfixes3 \
|
|
||||||
libxkbcommon0 \
|
|
||||||
libxrandr2 \
|
|
||||||
\
|
|
||||||
libgomp1 \
|
|
||||||
libheif1 \
|
|
||||||
libjpeg62-turbo \
|
|
||||||
liblcms2-2 \
|
|
||||||
libopenexr-3-1-30 \
|
|
||||||
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-exporter/"
|
|
||||||
COPY --chown=penpot:penpot $BUNDLE_PATH /opt/penpot/exporter/
|
|
||||||
COPY --from=penpotapp/imagemagick:7.1.2-27 /opt/imagick /opt/imagick
|
|
||||||
|
|
||||||
WORKDIR /opt/penpot/exporter
|
|
||||||
|
|
||||||
# pnpm ships as a system binary (same tarball + SHA pin as
|
|
||||||
# docker/devenv/Dockerfile); the generated ./setup expects it on PATH.
|
|
||||||
# Corepack is gone from Node 25+, so nothing here may use it.
|
|
||||||
ARG PNPM_VERSION=12.5.1
|
|
||||||
RUN set -eux; \
|
|
||||||
ARCH="$(dpkg --print-architecture)"; \
|
|
||||||
case "${ARCH}" in \
|
|
||||||
aarch64|arm64) \
|
|
||||||
PNPM_ARCH='arm64'; \
|
|
||||||
PNPM_SHA256='84e1290e82c800acd406b6db27e9650e15db3c2344d12162cc305ea1f942c6ff'; \
|
|
||||||
;; \
|
|
||||||
amd64|x86_64) \
|
|
||||||
PNPM_ARCH='x64'; \
|
|
||||||
PNPM_SHA256='5a397dfb6b3d4b07d3d7769586aeb471048faf04299a492e2808b95a9a1c701f'; \
|
|
||||||
;; \
|
|
||||||
*) \
|
|
||||||
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 -; \
|
|
||||||
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;
|
|
||||||
|
|
||||||
# `./setup` only needs pnpm on PATH (installed above as root).
|
|
||||||
# Ownership is fixed right after.
|
|
||||||
RUN ./setup && chown -R penpot:penpot /opt/penpot/exporter
|
|
||||||
|
|
||||||
USER penpot:penpot
|
|
||||||
|
|
||||||
CMD ["node", "app.js"]
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ RUN set -eux; \
|
|||||||
esac; \
|
esac; \
|
||||||
curl -LfsSo /tmp/pnpm.tar.gz "https://github.com/pnpm/pnpm/releases/download/v${PNPM_VERSION}/pnpm-linux-${PNPM_ARCH}.tar.gz"; \
|
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 -; \
|
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; \
|
tar -xzf /tmp/pnpm.tar.gz -C /usr/local/bin pnpm; \
|
||||||
chmod 755 /usr/local/bin/pnpm; \
|
chmod 755 /usr/local/bin/pnpm; \
|
||||||
rm -f /tmp/pnpm.tar.gz; \
|
rm -f /tmp/pnpm.tar.gz; \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user