Skip to content

Containerization guide for running Bun applications with official oven/bun images and multi-stage builds.

CCM score
51 of 100
skills.sh installs
434
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Docker image variants, Dockerfile patterns, Docker Compose setups, and hot reload for development
  • Includes examples for Alpine, distroless, compiled binary, and SQLite builds, plus health checks and .dockerignore rules
  • Enforces non-root execution with USER bun and blocks post-install scripts by default via trustedDependencies
  • Designed for teams deploying Bun services to containers, with references for image optimization and Kubernetes

Install

$ npx -y skills add secondsky/claude-skills --skill bun-docker -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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"]

Details

Repository
github.com/secondsky/claude-skills
Category
DevOps & Cloud
First seen
Jun 3, 2026

Questions

What does the bun-docker skill help with?

The bun-docker skill helps you deploy Bun applications in Docker containers using the official oven/bun images. It covers Dockerfiles, multi-stage builds, Docker Compose, hot reload in development, and compiled binaries.

How do I install the bun-docker skill?

Run npx -y skills add secondsky/claude-skills --skill bun-docker -y in a project. Once installed, the agent can write Dockerfiles and container setups for your Bun app.

Which Docker image variants does the bun-docker skill cover?

The skill covers oven/bun variants including latest, slim, alpine, distroless and debian. It shows which base image to pick for a full, minimal or small-footprint Bun container.

Where does bun-docker stand in the DevOps & Cloud category?

The skill sits in the DevOps & Cloud category on Claude Marketplaces, alongside Azure skills such as azure-deploy and azure-prepare. Its focus is narrower, on containerizing Bun applications rather than cloud platform deployment.

More from secondsky/claude-skills

All 116

Similar to Bun Docker

More DevOps & Cloud