chore: use oven/bun as base image for Dockerfile, copy bun.lock in image build step

This commit is contained in:
Jason Fraley 2026-05-18 00:03:47 -04:00
parent c341a2ae40
commit 7af4ba4bfb

View file

@ -1,7 +1,7 @@
# To use this Dockerfile, you have to set `output: 'standalone'` in your next.config.js file.
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
FROM node:22.17.0-alpine AS base
FROM oven/bun:1-alpine AS base
# Install dependencies only when needed
FROM base AS deps
@ -10,7 +10,7 @@ RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* bun.lock* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \