
Bun Docker
Covers Docker containerization for Bun applications with the official oven/bun images and their variants (slim, alpine, distroless). You get production-ready multi-stage builds, hot reload configs for development, and examples for compiled binaries that skip the Bun runtime entirely. The security section is practical: it emphasizes that Bun blocks post-install scripts by default and points you to the dependency-upgrade skill for supply chain hardening with Socket CLI. Includes docker-compose setups, health checks, and a solid .dockerignore. Use this when you're deploying Bun apps and want to avoid reinventing Dockerfile patterns. The image size comparison table is helpful for picking the right base image for your constraints.
- skills.sh installs
- 343
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill bun-docker --agent claude-codeInstalls into .claude/skills of the current project.
Files
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)
# Build stage
FROM oven/bun:1 AS builder
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
# Production stage
FROM oven/bun:1-slim AS production
WORKDIR /app
# Copy only production dependencies
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile --production
# Copy built assets
COPY --from=builder /app/dist ./dist
# Run as non-root
USER bun
EXPOSE 3000
CMD ["bun", "run", "dist/index.js"]
Sponsors
Details
- Repository
- github.com/secondsky/claude-skills
- Category
- DevOps & CI/CD
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Bun Runtime342
- Cloudflare Workers Testing340
- Bun Cloudflare Workers338
- Bun Test Coverage337
- Bun Http Server336
- Bun Test Mocking335
- Nuxt Seo335
- Bun Bundler334
- Bun Workers333
- Bun Shell331
- Bun React Ssr330
- Bun Tanstack Start329
- Cloudflare Workers Performance329
- Bun Hot Reloading328
- Bun Redis328
- Bun Ffi326
- Bun Jest Migration326
- Bun Websocket Server326
- Cloudflare Workers Runtime Apis326
- Swift Best Practices326
- Bun Nuxt323
- Bun Macros322
- Cloudflare Workers Frameworks321
- Supabase Postgres Best Practices319