mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
30 lines
841 B
Plaintext
30 lines
841 B
Plaintext
# bun:alpine
|
|
# Not officially supported (yet)
|
|
|
|
ARG GLIBC_RELEASE=2.35-r0
|
|
|
|
FROM alpine:latest AS build
|
|
|
|
WORKDIR /tmp
|
|
RUN apk --no-cache add unzip
|
|
|
|
ARG GLIBC_RELEASE
|
|
RUN wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
|
|
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_RELEASE}/glibc-${GLIBC_RELEASE}.apk
|
|
|
|
ADD https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64.zip bun-linux-x64.zip
|
|
RUN unzip bun-linux-x64.zip
|
|
|
|
FROM alpine:latest
|
|
|
|
ARG GLIBC_RELEASE
|
|
COPY --from=build /tmp/sgerrand.rsa.pub /etc/apk/keys
|
|
COPY --from=build /tmp/glibc-${GLIBC_RELEASE}.apk /tmp
|
|
COPY --from=build /tmp/bun-linux-x64/bun /usr/local/bin
|
|
|
|
RUN apk --no-cache --force-overwrite add /tmp/glibc-${GLIBC_RELEASE}.apk \
|
|
&& rm /etc/apk/keys/sgerrand.rsa.pub \
|
|
&& rm /tmp/glibc-${GLIBC_RELEASE}.apk
|
|
|
|
RUN bun --version
|