Skip to content

Instantly share code, notes, and snippets.

@larsw
Created September 19, 2023 11:58
Show Gist options
  • Save larsw/dffd069e9e5a7d00cfab800752a3627b to your computer and use it in GitHub Desktop.
Save larsw/dffd069e9e5a7d00cfab800752a3627b to your computer and use it in GitHub Desktop.
bun:alpine Dockerfile
# based on https://github.com/oven-sh/bun/issues/5545
FROM alpine
RUN apk --no-cache add ca-certificates wget && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk && \
wget https://github.com/oven-sh/bun/releases/download/bun-v1.0.2/bun-linux-x64.zip && \
apk add --no-cache --force-overwrite glibc-2.28-r0.apk && \
apk del wget && \
unzip bun-linux-x64.zip && \
rm glibc-2.28-r0.apk && \
mv bun-linux-x64/bun /usr/local/bin && \
rm -rf bun-linux-x64*
ENTRYPOINT ["/usr/local/bin/bun"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment