bun-docker
SolidUse for Docker with Bun, Dockerfiles, oven/bun image, containerization, and deployments.
DevOps & Infrastructure 168 stars
27 forks Updated 4 weeks ago MIT
Install
Quality Score: 89/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Bun Docker
Deploy Bun applications in Docker containers using official images.
## Official Images
```bash
# Latest stable
docker pull oven/bun
# Specific version
docker pull oven/bun:1.0.0
# 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
```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)
```dockerfile
# 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"]
```
## Alpine Image
```dockerfile
FROM oven/bun:1-alpine
WORKDIR /app
# Alpine uses apk for packages
RUN apk add --no-cache git
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile
COPY . .
CMD ["bun", "run", "src/index.ts"]
```
## Distroless Image
```dockerfile
# Build stage
FROM...
Details
- Author
- secondsky
- Repository
- secondsky/claude-skills
- Created
- 7 months ago
- Last Updated
- 4 weeks ago
- Language
- TypeScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
DevOps & Infrastructure Listed
bun-runtime
Bun runtime management, scripting, package management, and server deployment.
0 Updated 2 months ago
UltraXn AI & Automation Listed
aio-bun-fullstack-setup
Scaffold a Bun fullstack project — single-port server, Vite dev proxy, monorepo layout, and Docker config.
3 Updated 1 weeks ago
aiocean AI & Automation Listed
bun
Build fast applications with Bun JavaScript runtime. Use when creating Bun projects, using Bun APIs, bundling, testing, or optimizing Node.js alternatives. Triggers on Bun, Bun runtime, bun.sh, bunx, Bun serve, Bun test, JavaScript runtime.
2 Updated today
Makiya1202