From bad7d43b1ea19317444d6ac74d0be8ee9341dab9 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 19 Jun 2024 16:31:09 -1000 Subject: [PATCH] refactor(build): :building_construction: Simplify Dockerfile, only use Bun --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e96d3c9..64e82c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,20 @@ -FROM imbios/bun-node:21-alpine AS base +FROM oven/bun:1.1.14-alpine AS base # Install dependencies into temp directory # This will cache them and speed up future builds FROM base AS install + RUN mkdir -p /temp/dev COPY package.json bun.lockb /temp/dev/ RUN cd /temp/dev && bun install --frozen-lockfile FROM base AS builder + COPY . /app - COPY --from=install /temp/dev/node_modules /app/node_modules -RUN cd /app && bun run build --preset node-server +RUN cd /app && bun run build -FROM node:21-alpine as final +FROM oven/bun:1.1.14-alpine as final COPY --from=builder /app/.output/ /app