Skip to content

Instantly share code, notes, and snippets.

@LowByteFox
Created April 3, 2023 15:41
Show Gist options
  • Save LowByteFox/75f8ceca6dc6bc34bb9febbb7d5faaa2 to your computer and use it in GitHub Desktop.
Save LowByteFox/75f8ceca6dc6bc34bb9febbb7d5faaa2 to your computer and use it in GitHub Desktop.
Docker image with alpine and bun
# Bun docker container running on alpine linux
# Dockerfile based on https://github.com/oven-sh/bun/blob/main/dockerhub/Dockerfile-alpine
FROM frolvlad/alpine-glibc AS build
WORKDIR /tmp/
RUN apk update && apk upgrade && apk add unzip
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 frolvlad/alpine-glibc
COPY --from=build /tmp/bun-linux-x64/bun /bin/
# Put your project stuff here
# Change it to way how you want to run bun
CMD ["bun", "--version"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment