Skip to content

Commit 39f78db

Browse files
Add Node debian core variant
1 parent b016843 commit 39f78db

File tree

16 files changed

+224
-6
lines changed

16 files changed

+224
-6
lines changed

.github/workflows/build-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ jobs:
6868
- name: Checkout
6969
uses: actions/checkout@v4
7070

71+
- name: Build core base image
72+
if: ${{ endsWith(matrix.variant, '-core') }}
73+
uses: docker/build-push-action@v5
74+
with:
75+
push: false
76+
load: true
77+
context: .
78+
file: ./${{ steps.short-version.outputs.result }}/${{ matrix.base }}/Dockerfile
79+
tags: node:${{ matrix.version }}-${{ matrix.base }}
80+
7181
- name: Build image
7282
uses: docker/build-push-action@v5
7383
with:
@@ -91,7 +101,9 @@ jobs:
91101
[ "${output}" = 'success' ]
92102
93103
- name: Test for npm
104+
if: ${{ ! endsWith(matrix.variant, '-core') }}
94105
run: docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} npm --version
95106

96107
- name: Test for yarn
108+
if: ${{ ! endsWith(matrix.variant, '-core') }}
97109
run: docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} yarn --version

18/bookworm-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:bookworm-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 18.20.1
7+
8+
COPY --from=node:18.20.1-bookworm-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:18.20.1-bookworm-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

18/bullseye-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:bullseye-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 18.20.1
7+
8+
COPY --from=node:18.20.1-bullseye-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:18.20.1-bullseye-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

18/buster-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:buster-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 18.20.1
7+
8+
COPY --from=node:18.20.1-buster-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:18.20.1-buster-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

20/bookworm-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:bookworm-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 20.12.1
7+
8+
COPY --from=node:20.12.1-bookworm-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:20.12.1-bookworm-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

20/bullseye-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:bullseye-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 20.12.1
7+
8+
COPY --from=node:20.12.1-bullseye-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:20.12.1-bullseye-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

20/buster-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:buster-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 20.12.1
7+
8+
COPY --from=node:20.12.1-buster-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:20.12.1-buster-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

21/bookworm-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:bookworm-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 21.7.2
7+
8+
COPY --from=node:21.7.2-bookworm-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:21.7.2-bookworm-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

21/bullseye-core/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:bullseye-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 21.7.2
7+
8+
COPY --from=node:21.7.2-bullseye-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:21.7.2-bullseye-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

Dockerfile-debian-core.template

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM debian:name-slim
2+
3+
RUN groupadd --gid 1000 node \
4+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
5+
6+
ENV NODE_VERSION 0.0.0
7+
8+
COPY --from=node:0.0.0-slim --link /usr/local/bin/ /usr/local/bin/
9+
COPY --from=node:0.0.0-slim --link /usr/local/include/node/ /usr/local/include/node/
10+
11+
ENTRYPOINT ["docker-entrypoint.sh"]
12+
13+
CMD [ "node" ]

0 commit comments

Comments
 (0)