Documentation
README
Bun Docker
Deploy Bun applications in Docker containers using official images.
Official Images
# Latest stable
docker pull oven/bun
# Specific version
docker pull oven/bun:1
# Variants
oven/bun:latest # Full image (~100MB)
oven/bun:slim # Minimal image (~80MB)
oven/bun:alpine # Alpine-based (~50MB)
oven/bun:distroless # Distroless (~60MB)
oven/bun:debian # Debian-based (~100MB)
Basic Dockerfile
FROM oven/bun:1 AS base
WORKDIR /app
# Install dependencies
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile
# Copy source
COPY . .
# Run
EXPOSE 3000
CMD ["bun", "run", "src/index.ts"]
Multi-Stage Build (Production)
This is the opening of the README. Read the full README on GitHub.