mirror of
https://github.com/MrUnknownDE/docker-nodejs.git
synced 2026-04-06 00:31:57 +02:00
35 lines
1.3 KiB
Docker
35 lines
1.3 KiB
Docker
# Electron Linux build image (Node 18) on Debian slim
|
|
FROM debian:bookworm-slim
|
|
|
|
LABEL org.opencontainers.image.title="electron-builder-linux (Node 18)"
|
|
LABEL org.opencontainers.image.description="Container for building Linux Electron apps (AppImage, deb, rpm) using electron-builder (Node 18)"
|
|
LABEL maintainer="me@johanneskr.de"
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
NPM_CONFIG_LOGLEVEL=warn
|
|
|
|
# 1) Basis & Node 18 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_18.x | bash - \
|
|
&& apt-get update && apt-get install -y --no-install-recommends nodejs \
|
|
&& corepack enable \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 2) Build- & Packaging-Deps (wie oben)
|
|
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 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN node -v && npm -v && npx --yes electron-builder --version || true
|
|
|
|
WORKDIR /workspace
|
|
CMD ["bash"]
|