Files
docker-nodejs/Dockerfile.node22-linux
2025-11-15 20:41:55 +01:00

38 lines
1.5 KiB
Docker

# Electron Linux build image (Node 20) on Debian slim
FROM debian:bookworm-slim
LABEL org.opencontainers.image.title="electron-builder-linux (Node 22)"
LABEL org.opencontainers.image.description="Container for building Linux Electron apps (AppImage, deb, rpm) using electron-builder (Node 22)"
LABEL maintainer="me@johanneskr.de"
ENV DEBIAN_FRONTEND=noninteractive \
NPM_CONFIG_LOGLEVEL=warn
# 1) Basis & Node 20 via NodeSource
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl gnupg2 dirmngr \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get update && apt-get install -y --no-install-recommends nodejs \
&& corepack enable \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential python3 git file xz-utils zip p7zip-full fakeroot \
dpkg rpm libarchive-tools \
libfuse2 \
pkg-config libudev-dev libusb-1.0-0-dev libsecret-1-dev \
xvfb fontconfig \
libx11-xcb1 libxss1 libasound2 libnss3 libgtk-3-0 libatk-bridge2.0-0 libgbm1 libxkbcommon0 libdrm2 \
make gcc g++ build-essential clang libdbus-1-dev libgtk-3-dev \
libnotify-dev libasound2-dev libcap-dev libcups2-dev libxtst-dev \
libxss1 libnss3-dev gcc-multilib g++-multilib curl gperf bison python3-dbusmock \
&& rm -rf /var/lib/apt/lists/*
# (Optional) Sanity-Check
RUN node -v && npm -v && npx --yes electron-builder --version || true
WORKDIR /workspace
CMD ["bash"]