mirror of
https://github.com/MrUnknownDE/docker-nodejs.git
synced 2026-04-06 00:31:57 +02:00
add nodejs 22
This commit is contained in:
9
.github/workflows/build-push-linux.yml
vendored
9
.github/workflows/build-push-linux.yml
vendored
@@ -17,10 +17,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: Dockerfile.node20-linux
|
||||
short_tag: node20
|
||||
- dockerfile: Dockerfile.node22
|
||||
short_tag: node22
|
||||
latest: "true"
|
||||
- dockerfile: Dockerfile.node18-linux
|
||||
- dockerfile: Dockerfile.node20
|
||||
short_tag: node20
|
||||
latest: "false"
|
||||
- dockerfile: Dockerfile.node18
|
||||
short_tag: node18
|
||||
latest: "false"
|
||||
|
||||
|
||||
5
.github/workflows/build-push.yml
vendored
5
.github/workflows/build-push.yml
vendored
@@ -18,9 +18,12 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: Dockerfile.node22
|
||||
short_tag: node22
|
||||
latest: "true"
|
||||
- dockerfile: Dockerfile.node20
|
||||
short_tag: node20
|
||||
latest: "true"
|
||||
latest: "false"
|
||||
- dockerfile: Dockerfile.node18
|
||||
short_tag: node18
|
||||
latest: "false"
|
||||
|
||||
34
Dockerfile.node22
Normal file
34
Dockerfile.node22
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates curl gnupg \
|
||||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
||||
&& NODE_MAJOR=22 \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y nodejs \
|
||||
# Wine & Mono
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
wine wine32 wine64 mono-complete winbind cabextract \
|
||||
# AWS CLI
|
||||
awscli \
|
||||
# Other build essentials
|
||||
build-essential python3 git file xz-utils zip p7zip-full fakeroot \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set up a working directory
|
||||
WORKDIR /project
|
||||
|
||||
# (Optional) Install electron-builder globally in the image
|
||||
# This can sometimes help with pathing issues, but isn't strictly necessary
|
||||
# if it's in the project's devDependencies.
|
||||
RUN npm install -g electron-builder
|
||||
|
||||
# Set the entrypoint to bash
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
40
Dockerfile.node22-linux
Normal file
40
Dockerfile.node22-linux
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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 20)"
|
||||
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/*
|
||||
|
||||
# 2) Build- & Packaging-Deps (für electron-builder Linux Targets)
|
||||
# - AppImage benötigt FUSE -> libfuse2
|
||||
# - deb: dpkg, fakeroot
|
||||
# - rpm: rpm
|
||||
# - native modules: build-essential, python3, pkg-config, libudev-dev, libusb-1.0-0-dev, libsecret-1-dev
|
||||
# - optional runtime libs für Tests/Headless-Runs
|
||||
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/*
|
||||
|
||||
# (Optional) Sanity-Check
|
||||
RUN node -v && npm -v && npx --yes electron-builder --version || true
|
||||
|
||||
WORKDIR /workspace
|
||||
CMD ["bash"]
|
||||
Reference in New Issue
Block a user