Skip to content

Script + Dockerfile for building a Docker image based on node:20-alpine with Bun installed

Notifications You must be signed in to change notification settings

squishyu/bun-docker-alpine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bun-alpine

Script + Dockerfile for building a Docker image based on node:20-alpine with Bun installed

Docker Hub page


Description

The official over/bun image is based on Debian and doesn't come with nodejs which currently breaks compatibility with certain use cases.

This image is based on Linux Alpine (which is already being used with most Docker builds for NextJS, Vite, etc.),
comes with bun + node and npm installed (which is useful for maintaining compatibility in case of issues with Bun)

It also comes with glibc installed, which is currently a necessary fix to run Bun on Linux Alpine (oven-sh/bun#5545)

Usage

In a Dockerfile

# Pull the latest version
FROM squishyu/bun-alpine:latest

Or

# Pull a specific Bun version
FROM squishyu/bun-alpine:1.0.2

CLI

docker pull squishyu/bun-alpine

To enter interactive shell:

docker run --rm -it --entrypoint sh squishyu/bun-alpine

About

Script + Dockerfile for building a Docker image based on node:20-alpine with Bun installed

Topics

Resources

Stars

Watchers

Forks