Skip to content

Commit f53dbe3

Browse files
authored
build: update image(s) version (#41)
- bun: (canary) v1.2.22-canary.20250918.1, (latest) v1.2.22 - nodejs: current: v24.0.0 jod: v22.15.0 iron: v20.19.1 - removed deprecated nodejs version 23 - added support for nodejs version 24 - updated docker-entrypoint scripts for new node version - updated dockerfiles for alpine and debian-slim images Fixes #39
1 parent f89430a commit f53dbe3

File tree

14 files changed

+327
-39
lines changed

14 files changed

+327
-39
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626
env:
2727
REGISTRY: imbios
2828
PLATFORMS: linux/amd64,linux/arm64
29-
NODE_MAJOR_VERSIONS_TO_CHECK: 18,20,22,23
29+
NODE_MAJOR_VERSIONS_TO_CHECK: 20,22,24
3030
NODE_VERSIONS_TO_BUILD: ""
3131
BUN_TAGS_TO_CHECK: canary,latest
3232
BUN_VERSIONS_TO_BUILD: ""

src/base/23/debian-slim/docker-entrypoint.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/base/23/debian/docker-entrypoint.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/base/24/alpine/dockerfile

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
FROM alpine:3.20 AS build
2+
3+
# https://github.com/oven-sh/bun/releases
4+
ARG BUN_VERSION=latest
5+
6+
RUN apk --no-cache add ca-certificates curl dirmngr gpg gpg-agent unzip \
7+
&& arch="$(apk --print-arch)" \
8+
&& case "${arch##*-}" in \
9+
x86_64) build="x64-musl-baseline";; \
10+
aarch64) build="aarch64-musl";; \
11+
*) echo "error: unsupported architecture: $arch"; exit 1 ;; \
12+
esac \
13+
&& version="$BUN_VERSION" \
14+
&& case "$version" in \
15+
latest | canary | bun-v*) tag="$version"; ;; \
16+
v*) tag="bun-$version"; ;; \
17+
*) tag="bun-v$version"; ;; \
18+
esac \
19+
&& case "$tag" in \
20+
latest) release="latest/download"; ;; \
21+
*) release="download/$tag"; ;; \
22+
esac \
23+
&& curl "https://github.com/oven-sh/bun/releases/$release/bun-linux-$build.zip" \
24+
-fsSLO \
25+
--compressed \
26+
--retry 5 \
27+
|| (echo "error: failed to download: $tag" && exit 1) \
28+
&& for key in \
29+
"F3DCC08A8572C0749B3E18888EAB4D40A7B22B59" \
30+
; do \
31+
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" \
32+
|| gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
33+
done \
34+
&& curl "https://github.com/oven-sh/bun/releases/$release/SHASUMS256.txt.asc" \
35+
-fsSLO \
36+
--compressed \
37+
--retry 5 \
38+
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
39+
|| (echo "error: failed to verify: $tag" && exit 1) \
40+
&& grep " bun-linux-$build.zip\$" SHASUMS256.txt | sha256sum -c - \
41+
|| (echo "error: failed to verify: $tag" && exit 1) \
42+
&& unzip "bun-linux-$build.zip" \
43+
&& mv "bun-linux-$build/bun" /usr/local/bin/bun \
44+
&& rm -f "bun-linux-$build.zip" SHASUMS256.txt.asc SHASUMS256.txt \
45+
&& chmod +x /usr/local/bin/bun
46+
47+
FROM node:24-alpine3.20
48+
49+
# Disable the runtime transpiler cache by default inside Docker containers.
50+
# On ephemeral containers, the cache is not useful
51+
ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
52+
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}
53+
54+
# Ensure `bun install -g` works
55+
ARG BUN_INSTALL_BIN=/usr/local/bin
56+
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}
57+
58+
COPY --from=build /usr/local/bin/bun /usr/local/bin/
59+
COPY docker-entrypoint.sh /usr/local/bin/
60+
61+
# Temporarily use the `build`-stage /tmp folder to access the glibc APKs:
62+
RUN --mount=type=bind,from=build,source=/tmp,target=/tmp \
63+
addgroup -g 1001 bun \
64+
&& adduser -u 1001 -G bun -s /bin/sh -D bun \
65+
&& ln -s /usr/local/bin/bun /usr/local/bin/bunx \
66+
&& apk add libgcc libstdc++ \
67+
&& which bun \
68+
&& which bunx \
69+
&& bun --version
70+
71+
WORKDIR /home/bun/app
72+
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
73+
CMD ["/usr/local/bin/bun"]
File renamed without changes.

src/base/24/debian-slim/dockerfile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
FROM debian:bullseye-slim AS build
2+
3+
# https://github.com/oven-sh/bun/releases
4+
ARG BUN_VERSION=latest
5+
6+
RUN apt-get update -qq \
7+
&& apt-get install -qq --no-install-recommends \
8+
ca-certificates \
9+
curl \
10+
dirmngr \
11+
gpg \
12+
gpg-agent \
13+
unzip \
14+
&& apt-get clean \
15+
&& rm -rf /var/lib/apt/lists/* \
16+
&& arch="$(dpkg --print-architecture)" \
17+
&& case "${arch##*-}" in \
18+
amd64) build="x64-baseline";; \
19+
arm64) build="aarch64";; \
20+
*) echo "error: unsupported architecture: $arch"; exit 1 ;; \
21+
esac \
22+
&& version="$BUN_VERSION" \
23+
&& case "$version" in \
24+
latest | canary | bun-v*) tag="$version"; ;; \
25+
v*) tag="bun-$version"; ;; \
26+
*) tag="bun-v$version"; ;; \
27+
esac \
28+
&& case "$tag" in \
29+
latest) release="latest/download"; ;; \
30+
*) release="download/$tag"; ;; \
31+
esac \
32+
&& curl "https://github.com/oven-sh/bun/releases/$release/bun-linux-$build.zip" \
33+
-fsSLO \
34+
--compressed \
35+
--retry 5 \
36+
|| (echo "error: failed to download: $tag" && exit 1) \
37+
&& for key in \
38+
"F3DCC08A8572C0749B3E18888EAB4D40A7B22B59" \
39+
; do \
40+
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" \
41+
|| gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
42+
done \
43+
&& curl "https://github.com/oven-sh/bun/releases/$release/SHASUMS256.txt.asc" \
44+
-fsSLO \
45+
--compressed \
46+
--retry 5 \
47+
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
48+
|| (echo "error: failed to verify: $tag" && exit 1) \
49+
&& grep " bun-linux-$build.zip\$" SHASUMS256.txt | sha256sum -c - \
50+
|| (echo "error: failed to verify: $tag" && exit 1) \
51+
&& unzip "bun-linux-$build.zip" \
52+
&& mv "bun-linux-$build/bun" /usr/local/bin/bun \
53+
&& rm -f "bun-linux-$build.zip" SHASUMS256.txt.asc SHASUMS256.txt \
54+
&& chmod +x /usr/local/bin/bun \
55+
&& which bun \
56+
&& bun --version
57+
58+
FROM node:24-bullseye-slim
59+
60+
# Disable the runtime transpiler cache by default inside Docker containers.
61+
# On ephemeral containers, the cache is not useful
62+
ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
63+
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}
64+
65+
# Ensure `bun install -g` works
66+
ARG BUN_INSTALL_BIN=/usr/local/bin
67+
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}
68+
69+
COPY docker-entrypoint.sh /usr/local/bin
70+
COPY --from=build /usr/local/bin/bun /usr/local/bin/bun
71+
72+
RUN groupadd bun \
73+
--gid 1001 \
74+
&& useradd bun \
75+
--uid 1001 \
76+
--gid bun \
77+
--shell /bin/sh \
78+
--create-home \
79+
&& ln -s /usr/local/bin/bun /usr/local/bin/bunx \
80+
&& which bun \
81+
&& which bunx \
82+
&& bun --version
83+
84+
WORKDIR /home/bun/app
85+
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
86+
CMD ["/usr/local/bin/bun"]

src/base/24/debian/dockerfile

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
FROM debian:bullseye-slim AS build
2+
3+
# https://github.com/oven-sh/bun/releases
4+
ARG BUN_VERSION=latest
5+
6+
# Node.js includes python3 for node-gyp, see https://github.com/oven-sh/bun/issues/9807
7+
# Though, not on slim and alpine images.
8+
RUN apt-get update -qq \
9+
&& apt-get install -qq --no-install-recommends \
10+
ca-certificates \
11+
curl \
12+
dirmngr \
13+
gpg \
14+
gpg-agent \
15+
unzip \
16+
python3 \
17+
&& apt-get clean \
18+
&& rm -rf /var/lib/apt/lists/* \
19+
&& arch="$(dpkg --print-architecture)" \
20+
&& case "${arch##*-}" in \
21+
amd64) build="x64-baseline";; \
22+
arm64) build="aarch64";; \
23+
*) echo "error: unsupported architecture: $arch"; exit 1 ;; \
24+
esac \
25+
&& version="$BUN_VERSION" \
26+
&& case "$version" in \
27+
latest | canary | bun-v*) tag="$version"; ;; \
28+
v*) tag="bun-$version"; ;; \
29+
*) tag="bun-v$version"; ;; \
30+
esac \
31+
&& case "$tag" in \
32+
latest) release="latest/download"; ;; \
33+
*) release="download/$tag"; ;; \
34+
esac \
35+
&& curl "https://github.com/oven-sh/bun/releases/$release/bun-linux-$build.zip" \
36+
-fsSLO \
37+
--compressed \
38+
--retry 5 \
39+
|| (echo "error: failed to download: $tag" && exit 1) \
40+
&& for key in \
41+
"F3DCC08A8572C0749B3E18888EAB4D40A7B22B59" \
42+
; do \
43+
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" \
44+
|| gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
45+
done \
46+
&& curl "https://github.com/oven-sh/bun/releases/$release/SHASUMS256.txt.asc" \
47+
-fsSLO \
48+
--compressed \
49+
--retry 5 \
50+
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
51+
|| (echo "error: failed to verify: $tag" && exit 1) \
52+
&& grep " bun-linux-$build.zip\$" SHASUMS256.txt | sha256sum -c - \
53+
|| (echo "error: failed to verify: $tag" && exit 1) \
54+
&& unzip "bun-linux-$build.zip" \
55+
&& mv "bun-linux-$build/bun" /usr/local/bin/bun \
56+
&& rm -f "bun-linux-$build.zip" SHASUMS256.txt.asc SHASUMS256.txt \
57+
&& chmod +x /usr/local/bin/bun
58+
59+
FROM node:24-bullseye
60+
61+
COPY docker-entrypoint.sh /usr/local/bin
62+
COPY --from=build /usr/local/bin/bun /usr/local/bin/bun
63+
64+
# Disable the runtime transpiler cache by default inside Docker containers.
65+
# On ephemeral containers, the cache is not useful
66+
ARG BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
67+
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH}
68+
69+
# Ensure `bun install -g` works
70+
ARG BUN_INSTALL_BIN=/usr/local/bin
71+
ENV BUN_INSTALL_BIN=${BUN_INSTALL_BIN}
72+
73+
RUN groupadd bun \
74+
--gid 1001 \
75+
&& useradd bun \
76+
--uid 1001 \
77+
--gid bun \
78+
--shell /bin/sh \
79+
--create-home \
80+
&& ln -s /usr/local/bin/bun /usr/local/bin/bunx \
81+
&& which bun \
82+
&& which bunx \
83+
&& bun --version
84+
85+
WORKDIR /home/bun/app
86+
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
87+
CMD ["/usr/local/bin/bun"]

src/git/18/alpine/docker-entrypoint.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)