From 3a03e53fd85879c516f9b698e021115f375c3f99 Mon Sep 17 00:00:00 2001 From: Tim Brust Date: Fri, 25 Oct 2024 14:30:23 +0200 Subject: [PATCH] feat: adds Node.js 22 support (#720) --- .github/workflows/buildx.yml | 60 +++++++++++++++++++++++++------ .github/workflows/dockerimage.yml | 28 +++++++++++++++ 3.1/20/alpine/Dockerfile | 8 ++--- 3.1/22/Dockerfile | 19 ++++++++++ 3.1/22/alpine/Dockerfile | 13 +++++++ 3.1/22/slim/Dockerfile | 25 +++++++++++++ 3.2/20/alpine/Dockerfile | 8 ++--- 3.2/22/Dockerfile | 19 ++++++++++ 3.2/22/alpine/Dockerfile | 13 +++++++ 3.2/22/slim/Dockerfile | 25 +++++++++++++ 3.3/20/alpine/Dockerfile | 8 ++--- 3.3/22/Dockerfile | 19 ++++++++++ 3.3/22/alpine/Dockerfile | 13 +++++++ 3.3/22/slim/Dockerfile | 25 +++++++++++++ 3.4/20/alpine/Dockerfile | 8 ++--- 3.4/22/Dockerfile | 19 ++++++++++ 3.4/22/alpine/Dockerfile | 14 ++++++++ 3.4/22/slim/Dockerfile | 25 +++++++++++++ README.md | 6 ++-- 19 files changed, 322 insertions(+), 33 deletions(-) create mode 100644 3.1/22/Dockerfile create mode 100644 3.1/22/alpine/Dockerfile create mode 100644 3.1/22/slim/Dockerfile create mode 100644 3.2/22/Dockerfile create mode 100644 3.2/22/alpine/Dockerfile create mode 100644 3.2/22/slim/Dockerfile create mode 100644 3.3/22/Dockerfile create mode 100644 3.3/22/alpine/Dockerfile create mode 100644 3.3/22/slim/Dockerfile create mode 100644 3.4/22/Dockerfile create mode 100644 3.4/22/alpine/Dockerfile create mode 100644 3.4/22/slim/Dockerfile diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx.yml index 101faa3..16098e4 100644 --- a/.github/workflows/buildx.yml +++ b/.github/workflows/buildx.yml @@ -26,13 +26,13 @@ jobs: platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 - path: 3.2/18 - tags: "3.2 3.2-18 3.2-hydrogen" + tags: "3.2-18 3.2-hydrogen" platforms: linux/amd64,linux/arm64,linux/arm/v7 - path: 3.2/18/slim - tags: "3.2-slim 3.2-slim-18 3.2-slim-hydrogen" + tags: "3.2-slim-18 3.2-slim-hydrogen" platforms: linux/amd64,linux/arm64,linux/arm/v7 - path: 3.2/18/alpine - tags: "3.2-alpine 3.2-alpine-18 3.2-alpine-hydrogen" + tags: "3.2-alpine-18 3.2-alpine-hydrogen" platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 - path: 3.3/18 @@ -56,23 +56,23 @@ jobs: platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 - path: 3.1/20 - tags: "3.1-20 3.1-iron" + tags: "3.1-20 3.1-iron 3.1" platforms: linux/amd64,linux/arm64,linux/arm/v7 - path: 3.1/20/slim - tags: "3.1-slim-20 3.1-slim-iron" + tags: "3.1-slim-20 3.1-slim-iron 3.1-slim" platforms: linux/amd64,linux/arm64,linux/arm/v7 - path: 3.1/20/alpine - tags: "3.1-alpine-20 3.1-alpine-iron" + tags: "3.1-alpine-20 3.1-alpine-iron 3.1-alpine" platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 - path: 3.2/20 - tags: "3.2 3.2-20 3.2-iron" + tags: "3.2-20 3.2-iron 3.2" platforms: linux/amd64,linux/arm64,linux/arm/v7 - path: 3.2/20/slim - tags: "3.2-slim 3.2-slim-20 3.2-slim-iron" + tags: "3.2-slim-20 3.2-slim-iron 3.2-slim" platforms: linux/amd64,linux/arm64,linux/arm/v7 - path: 3.2/20/alpine - tags: "3.2-alpine 3.2-alpine-20 3.2-alpine-iron" + tags: "3.2-alpine-20 3.2-alpine-iron 3.2-alpine" platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 - path: 3.3/20 @@ -82,7 +82,7 @@ jobs: tags: " 3.3-slim-20 3.3-slim-iron 3.3-slim 3-slim slim" platforms: linux/amd64,linux/arm64,linux/arm/v7 - path: 3.3/20/alpine - tags: "3.3-alpine-20 3.3-alpine-iron 3.3-alpine 3-alpine alpine" + tags: "3.3-alpine-20 3.3-alpine-iron 3.3-alpine 3-alpine alpine" platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 - path: 3.4/20 @@ -94,6 +94,46 @@ jobs: - path: 3.4/20/alpine tags: "3.4-alpine-20 3.4-alpine-iron 3.4-alpine" platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + + - path: 3.1/22 + tags: "3.1-22 3.1-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.1/22/slim + tags: "3.1-slim-22 3.1-slim-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.1/22/alpine + tags: "3.1-alpine-22 3.1-alpine-jod" + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + + - path: 3.2/22 + tags: "3.2-22 3.2-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.2/22/slim + tags: "3.2-slim-22 3.2-slim-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.2/22/alpine + tags: "3.2-alpine-22 3.2-alpine-jod" + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + + - path: 3.3/22 + tags: "3.3-22 3.3-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.3/22/slim + tags: "3.3-slim-22 3.3-slim-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.3/22/alpine + tags: "3.3-alpine-22 3.3-alpine-jod" + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + + - path: 3.4/22 + tags: "3.4-22 3.4-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.4/22/slim + tags: "3.4-slim-22 3.4-slim-jod" + platforms: linux/amd64,linux/arm64,linux/arm/v7 + - path: 3.4/22/alpine + tags: "3.4-alpine-22 3.4-alpine-jod" + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 steps: - name: Checkout uses: actions/checkout@v4.2.2 diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index c1e3ea5..e5b5d42 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -70,6 +70,34 @@ jobs: docker run -i $(docker build -q 3.4/20/slim) /bin/sh -c "ruby --version && node --version && npm --version" echo "3.4 alpine with Node.js 20" docker run -i $(docker build -q 3.4/20/alpine) /bin/sh -c "ruby --version && node --version && npm --version" + + echo "3.1 with Node.js 22" + docker run -i $(docker build -q 3.1/22) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.1 slim with Node.js 22" + docker run -i $(docker build -q 3.1/22/slim) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.1 alpine with Node.js 22" + docker run -i $(docker build -q 3.1/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version" + + echo "3.2 with Node.js 22" + docker run -i $(docker build -q 3.2/22) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.2 slim with Node.js 22" + docker run -i $(docker build -q 3.2/22/slim) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.2 alpine with Node.js 22" + docker run -i $(docker build -q 3.2/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version" + + echo "3.3 with Node.js 22" + docker run -i $(docker build -q 3.3/22) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.3 slim with Node.js 22" + docker run -i $(docker build -q 3.3/22/slim) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.3 alpine with Node.js 22" + docker run -i $(docker build -q 3.3/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version" + + echo "3.4 with Node.js 22" + docker run -i $(docker build -q 3.4/22) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.4 slim with Node.js 22" + docker run -i $(docker build -q 3.4/22/slim) /bin/sh -c "ruby --version && node --version && npm --version" + echo "3.4 alpine with Node.js 22" + docker run -i $(docker build -q 3.4/22/alpine) /bin/sh -c "ruby --version && node --version && npm --version" auto-merge: runs-on: ubuntu-latest needs: build diff --git a/3.1/20/alpine/Dockerfile b/3.1/20/alpine/Dockerfile index ed91f50..44cfb56 100644 --- a/3.1/20/alpine/Dockerfile +++ b/3.1/20/alpine/Dockerfile @@ -4,10 +4,8 @@ LABEL maintainer "Tim Brust " ARG REFRESHED_AT ENV REFRESHED_AT $REFRESHED_AT -RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ - && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ - && apk -U upgrade \ +RUN apk -U upgrade \ && apk add --no-cache \ - nodejs@edge \ - npm@edge \ + nodejs \ + npm \ yarn diff --git a/3.1/22/Dockerfile b/3.1/22/Dockerfile new file mode 100644 index 0000000..3ec3373 --- /dev/null +++ b/3.1/22/Dockerfile @@ -0,0 +1,19 @@ +FROM ruby:3.1 +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/3.1/22/alpine/Dockerfile b/3.1/22/alpine/Dockerfile new file mode 100644 index 0000000..10ef13d --- /dev/null +++ b/3.1/22/alpine/Dockerfile @@ -0,0 +1,13 @@ +FROM ruby:3.1-alpine +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT + +RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ + && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ + && apk -U upgrade \ + && apk add --no-cache \ + nodejs-current@edge \ + npm@edge \ + yarn diff --git a/3.1/22/slim/Dockerfile b/3.1/22/slim/Dockerfile new file mode 100644 index 0000000..9e5574d --- /dev/null +++ b/3.1/22/slim/Dockerfile @@ -0,0 +1,25 @@ +FROM ruby:3.1-slim +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +# hadolint ignore=DL3009 +RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ + curl \ + gnupg2 \ + libatomic1 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/3.2/20/alpine/Dockerfile b/3.2/20/alpine/Dockerfile index af18c9f..ccad4d1 100644 --- a/3.2/20/alpine/Dockerfile +++ b/3.2/20/alpine/Dockerfile @@ -4,10 +4,8 @@ LABEL maintainer "Tim Brust " ARG REFRESHED_AT ENV REFRESHED_AT $REFRESHED_AT -RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ - && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ - && apk -U upgrade \ +RUN apk -U upgrade \ && apk add --no-cache \ - nodejs@edge \ - npm@edge \ + nodejs \ + npm \ yarn diff --git a/3.2/22/Dockerfile b/3.2/22/Dockerfile new file mode 100644 index 0000000..b938319 --- /dev/null +++ b/3.2/22/Dockerfile @@ -0,0 +1,19 @@ +FROM ruby:3.2 +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/3.2/22/alpine/Dockerfile b/3.2/22/alpine/Dockerfile new file mode 100644 index 0000000..7f3c624 --- /dev/null +++ b/3.2/22/alpine/Dockerfile @@ -0,0 +1,13 @@ +FROM ruby:3.2-alpine +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT + +RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ + && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ + && apk -U upgrade \ + && apk add --no-cache \ + nodejs-current@edge \ + npm@edge \ + yarn diff --git a/3.2/22/slim/Dockerfile b/3.2/22/slim/Dockerfile new file mode 100644 index 0000000..12f08d3 --- /dev/null +++ b/3.2/22/slim/Dockerfile @@ -0,0 +1,25 @@ +FROM ruby:3.2-slim +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +# hadolint ignore=DL3009 +RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ + curl \ + gnupg2 \ + libatomic1 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/3.3/20/alpine/Dockerfile b/3.3/20/alpine/Dockerfile index 5a40fca..c5b356e 100644 --- a/3.3/20/alpine/Dockerfile +++ b/3.3/20/alpine/Dockerfile @@ -4,10 +4,8 @@ LABEL maintainer "Tim Brust " ARG REFRESHED_AT ENV REFRESHED_AT $REFRESHED_AT -RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ - && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ - && apk -U upgrade \ +RUN apk -U upgrade \ && apk add --no-cache \ - nodejs@edge \ - npm@edge \ + nodejs \ + npm \ yarn diff --git a/3.3/22/Dockerfile b/3.3/22/Dockerfile new file mode 100644 index 0000000..bb4984b --- /dev/null +++ b/3.3/22/Dockerfile @@ -0,0 +1,19 @@ +FROM ruby:3.3 +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/3.3/22/alpine/Dockerfile b/3.3/22/alpine/Dockerfile new file mode 100644 index 0000000..3e2b2b1 --- /dev/null +++ b/3.3/22/alpine/Dockerfile @@ -0,0 +1,13 @@ +FROM ruby:3.3-alpine +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT + +RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ + && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ + && apk -U upgrade \ + && apk add --no-cache \ + nodejs-current@edge \ + npm@edge \ + yarn diff --git a/3.3/22/slim/Dockerfile b/3.3/22/slim/Dockerfile new file mode 100644 index 0000000..25162f4 --- /dev/null +++ b/3.3/22/slim/Dockerfile @@ -0,0 +1,25 @@ +FROM ruby:3.3-slim +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +# hadolint ignore=DL3009 +RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ + curl \ + gnupg2 \ + libatomic1 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/3.4/20/alpine/Dockerfile b/3.4/20/alpine/Dockerfile index 9784ea1..47c8b8f 100644 --- a/3.4/20/alpine/Dockerfile +++ b/3.4/20/alpine/Dockerfile @@ -4,10 +4,8 @@ LABEL maintainer "Tim Brust " ARG REFRESHED_AT ENV REFRESHED_AT $REFRESHED_AT -RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ - && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ - && apk -U upgrade \ +RUN apk -U upgrade \ && apk add --no-cache \ - nodejs@edge \ - npm@edge \ + nodejs \ + npm \ yarn diff --git a/3.4/22/Dockerfile b/3.4/22/Dockerfile new file mode 100644 index 0000000..4161a06 --- /dev/null +++ b/3.4/22/Dockerfile @@ -0,0 +1,19 @@ +FROM ruby:3.4-rc +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/3.4/22/alpine/Dockerfile b/3.4/22/alpine/Dockerfile new file mode 100644 index 0000000..0a32717 --- /dev/null +++ b/3.4/22/alpine/Dockerfile @@ -0,0 +1,14 @@ +FROM ruby:3.4-rc-alpine +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT + +RUN echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ + && echo @edge https://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ + && apk -U upgrade \ + && apk add --no-cache \ + nodejs-current@edge \ + npm@edge \ + yarn + diff --git a/3.4/22/slim/Dockerfile b/3.4/22/slim/Dockerfile new file mode 100644 index 0000000..90ff7a0 --- /dev/null +++ b/3.4/22/slim/Dockerfile @@ -0,0 +1,25 @@ +FROM ruby:3.4-rc-slim +LABEL maintainer "Tim Brust " + +ARG REFRESHED_AT +ENV REFRESHED_AT $REFRESHED_AT +ARG NODE_MAJOR=22 + +# hadolint ignore=DL3009 +RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ + curl \ + gnupg2 \ + libatomic1 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN printf 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 1001' > /etc/apt/preferences.d/nodesource \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && 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 -qq && apt-get install -qq --no-install-recommends \ + nodejs \ + && apt-get upgrade -qq \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/*\ + && npm install -g yarn@1 diff --git a/README.md b/README.md index a570f4d..26efa22 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Ruby 3.1, 3.2, 3.3 or 3.4 (RC) with Node.js 18 LTS or Node.js 20 LTS Dockerfile +# Ruby 3.1, 3.2, 3.3 or 3.4 (RC) with Node.js 18 LTS, Node.js 20 LTS or Node.js 22 Dockerfile [![Docker Automated build](https://img.shields.io/docker/automated/timbru31/ruby-node.svg)](https://hub.docker.com/r/timbru31/ruby-node/) [![buildx Status](https://github.com/timbru31/docker-ruby-node/workflows/buildx/badge.svg)](https://github.com/timbru31/docker-ruby-node/actions?query=workflow%3Abuildx) [![Lint Dockerfiles](https://github.com/timbru31/docker-ruby-node/workflows/Lint%20Dockerfiles/badge.svg)](https://github.com/timbru31/docker-ruby-node/actions?query=workflow%3A%22Lint+Dockerfiles%22) -A minimal Dockerfile based on Ruby (3.1, 3.2, 3.3 or 3.4 (RC)) Dockerfile (regular, slim or alpine) with Node.js 18 LTS (Hydrogen) or Node.js 20 LTS (Iron) installed. +A minimal Dockerfile based on Ruby (3.1, 3.2, 3.3 or 3.4 (RC)) Dockerfile (regular, slim or alpine) with Node.js 18 LTS (Hydrogen), Node.js 20 LTS (Iron) or Node.js 22 installed. ## What's included - Ruby 3.1, 3.2, 3.3, 3.4 (RC) -- Node.js 18 LTS (Hydrogen) or Node.js 20 LTS (Iron) +- Node.js 18 LTS (Hydrogen), Node.js 20 LTS (Iron) or Node.js 22 - bundled npm that comes with the respective Node.js version (latest for Node.js LTS on alpine, see [why](https://gitlab.alpinelinux.org/alpine/aports/-/commit/25b10bd1a93e12a7e49fee38b0a229281ae49fb7)) - yarn