-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New image: bun #14272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
New image: bun #14272
Conversation
f32736d
to
34ee52b
Compare
This comment has been minimized.
This comment has been minimized.
32684cd
to
2c542cf
Compare
This comment has been minimized.
This comment has been minimized.
Diff for 2c542cf:diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
-
+amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..4b6d303 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,12 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Jarred Sumner <[email protected]> (@Jarred-Sumner), Ashcon Partovi <[email protected]> (@Electroid)
+GitRepo: https://github.com/oven-sh/bun.git
+
+Tags: debian-slim, 0.5.7-debian-slim, 0.5-debian-slim
+Architectures: amd64, arm64v8
+GitCommit: 37293cb26a8239d4f387218a1fdadc522787835f
+Directory: dockerhub/debian-slim
+
+Tags: latest, debian, 0.5.7, 0.5.7-debian, 0.5, 0.5-debian
+Architectures: amd64, arm64v8
+GitCommit: 37293cb26a8239d4f387218a1fdadc522787835f
+Directory: dockerhub/debian
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..0526046 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,9 @@
+bun:0.5
+bun:0.5-debian
+bun:0.5-debian-slim
+bun:0.5.7
+bun:0.5.7-debian
+bun:0.5.7-debian-slim
+bun:debian
+bun:debian-slim
+bun:latest
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index e69de29..a98a35f 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -0,0 +1,2 @@
+bun:0.5-debian-slim
+bun:0.5-debian
diff --git a/bun_0.5-debian-slim/Dockerfile b/bun_0.5-debian-slim/Dockerfile
new file mode 100644
index 0000000..954c48d
--- /dev/null
+++ b/bun_0.5-debian-slim/Dockerfile
@@ -0,0 +1,77 @@
+FROM debian:bullseye-slim AS build
+
+# https://github.com/oven-sh/bun/releases
+ARG BUN_VERSION=0.5.7
+
+RUN apt-get update -qq \
+ && apt-get install -qq --no-install-recommends \
+ ca-certificates \
+ curl \
+ dirmngr \
+ gpg \
+ gpg-agent \
+ unzip \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/* \
+ && arch="$(dpkg --print-architecture)" \
+ && case "${arch##*-}" in \
+ amd64) build="x64-baseline";; \
+ arm64) build="aarch64";; \
+ *) echo "error: unsupported architecture: ($arch)"; exit 1 ;; \
+ esac \
+ && version="$BUN_VERSION" \
+ && case "$version" in \
+ latest | canary | bun-v*) tag="$version"; ;; \
+ v*) tag="bun-$version"; ;; \
+ *) tag="bun-v$version"; ;; \
+ esac \
+ && case "$tag" in \
+ latest) release="latest/download"; ;; \
+ *) release="download/$tag"; ;; \
+ esac \
+ && curl "https://github.com/oven-sh/bun/releases/$release/bun-linux-$build.zip" \
+ -fsSLO \
+ --compressed \
+ --retry 5 \
+ || (echo "error: unknown release: ($tag)" && exit 1) \
+ && for key in \
+ "F3DCC08A8572C0749B3E18888EAB4D40A7B22B59" \
+ ; do \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" \
+ || gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
+ done \
+ && gpg --update-trustdb \
+ && curl "https://github.com/oven-sh/bun/releases/$release/SHASUMS256.txt.asc" \
+ -fsSLO \
+ --compressed \
+ --retry 5 \
+ && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
+ || (echo "error: failed to verify release: ($tag)" && exit 1) \
+ && grep " bun-linux-$build.zip\$" SHASUMS256.txt | sha256sum -c - \
+ || (echo "error: failed to verify release: ($tag)" && exit 1) \
+ && unzip "bun-linux-$build.zip" \
+ && mv "bun-linux-$build/bun" /usr/local/bin/bun \
+ && rm -f "bun-linux-$build.zip" SHASUMS256.txt.asc SHASUMS256.txt \
+ && chmod +x /usr/local/bin/bun \
+ && ln -s /usr/local/bin/bun /usr/local/bin/bunx \
+ && which bun \
+ && which bunx \
+ && bun --version
+
+FROM debian:bullseye-slim
+
+RUN groupadd bun \
+ --gid 1000 \
+ && useradd bun \
+ --uid 1000 \
+ --gid bun \
+ --shell /bin/sh \
+ --create-home
+
+COPY docker-entrypoint.sh /usr/local/bin
+COPY --from=build /usr/local/bin/bun /usr/local/bin
+COPY --from=build /usr/local/bin/bunx /usr/local/bin
+
+WORKDIR /home/bun/app
+ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
+CMD ["/usr/local/bin/bun"]
diff --git a/bun_0.5-debian-slim/docker-entrypoint.sh b/bun_0.5-debian-slim/docker-entrypoint.sh
new file mode 100755
index 0000000..a0e45cb
--- /dev/null
+++ b/bun_0.5-debian-slim/docker-entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then
+ set -- /usr/local/bin/bun "$@"
+fi
+
+exec "$@"
diff --git a/bun_0.5-debian/Dockerfile b/bun_0.5-debian/Dockerfile
new file mode 100644
index 0000000..a16befb
--- /dev/null
+++ b/bun_0.5-debian/Dockerfile
@@ -0,0 +1,77 @@
+FROM debian:bullseye-slim AS build
+
+# https://github.com/oven-sh/bun/releases
+ARG BUN_VERSION=0.5.7
+
+RUN apt-get update -qq \
+ && apt-get install -qq --no-install-recommends \
+ ca-certificates \
+ curl \
+ dirmngr \
+ gpg \
+ gpg-agent \
+ unzip \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/* \
+ && arch="$(dpkg --print-architecture)" \
+ && case "${arch##*-}" in \
+ amd64) build="x64-baseline";; \
+ arm64) build="aarch64";; \
+ *) echo "error: unsupported architecture: ($arch)"; exit 1 ;; \
+ esac \
+ && version="$BUN_VERSION" \
+ && case "$version" in \
+ latest | canary | bun-v*) tag="$version"; ;; \
+ v*) tag="bun-$version"; ;; \
+ *) tag="bun-v$version"; ;; \
+ esac \
+ && case "$tag" in \
+ latest) release="latest/download"; ;; \
+ *) release="download/$tag"; ;; \
+ esac \
+ && curl "https://github.com/oven-sh/bun/releases/$release/bun-linux-$build.zip" \
+ -fsSLO \
+ --compressed \
+ --retry 5 \
+ || (echo "error: unknown release: ($tag)" && exit 1) \
+ && for key in \
+ "F3DCC08A8572C0749B3E18888EAB4D40A7B22B59" \
+ ; do \
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" \
+ || gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
+ done \
+ && gpg --update-trustdb \
+ && curl "https://github.com/oven-sh/bun/releases/$release/SHASUMS256.txt.asc" \
+ -fsSLO \
+ --compressed \
+ --retry 5 \
+ && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
+ || (echo "error: failed to verify release: ($tag)" && exit 1) \
+ && grep " bun-linux-$build.zip\$" SHASUMS256.txt | sha256sum -c - \
+ || (echo "error: failed to verify release: ($tag)" && exit 1) \
+ && unzip "bun-linux-$build.zip" \
+ && mv "bun-linux-$build/bun" /usr/local/bin/bun \
+ && rm -f "bun-linux-$build.zip" SHASUMS256.txt.asc SHASUMS256.txt \
+ && chmod +x /usr/local/bin/bun \
+ && ln -s /usr/local/bin/bun /usr/local/bin/bunx \
+ && which bun \
+ && which bunx \
+ && bun --version
+
+FROM debian:bullseye
+
+RUN groupadd bun \
+ --gid 1000 \
+ && useradd bun \
+ --uid 1000 \
+ --gid bun \
+ --shell /bin/sh \
+ --create-home
+
+COPY docker-entrypoint.sh /usr/local/bin
+COPY --from=build /usr/local/bin/bun /usr/local/bin
+COPY --from=build /usr/local/bin/bunx /usr/local/bin
+
+WORKDIR /home/bun/app
+ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
+CMD ["/usr/local/bin/bun"]
diff --git a/bun_0.5-debian/docker-entrypoint.sh b/bun_0.5-debian/docker-entrypoint.sh
new file mode 100755
index 0000000..a0e45cb
--- /dev/null
+++ b/bun_0.5-debian/docker-entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then
+ set -- /usr/local/bin/bun "$@"
+fi
+
+exec "$@" |
Thanks for the gentle ping (and the patience, it's really appreciated ❤️) 🙇 Here's some high-level review of what's here to get things started (I imagine there's probably some updates/changes that have already happened that we'll review in the delta): Tags might want to be more explicit about which debian instead of just debian/debian-slim (ie bookworm vs the near-release trixie or debian 12 vs 13 if you prefer) -- even if you provide generic "latest" aliases like this, it helps users during the transition period (when the "square wheel" rolls from one release to another and inevitably causes some breakage). Is I'm not sure a multi-stage build is really warranted here -- if the goal is just to remove the packages used for building, that's pretty easy to do reasonably cleanly (and I'm happy to help with that, if necessary).
What's
Although alternatively, it could be removed completely, as |
Bun
Bun is a new JavaScript and TypeScript runtime.
Checklist for Review
foobar
needs Node.js, hasFROM node:...
instead of grabbingnode
via other means been considered?)FROM scratch
, tarballs only exist in a single commit within the associated history?