From b105c40807b3b01ce4ea8fd06d65278415d9499f Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 24 Apr 2024 21:25:54 -1000 Subject: [PATCH] refactor(build): :bug: Switch final docker image to Node (use Bun for everything else except final Docker) Solves issues with Bun's missing Brotli implementation --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc7f862..e96d3c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM oven/bun:1.1.4-alpine AS base +FROM imbios/bun-node:21-alpine AS base # Install dependencies into temp directory # This will cache them and speed up future builds @@ -11,9 +11,9 @@ FROM base AS builder COPY . /app COPY --from=install /temp/dev/node_modules /app/node_modules -RUN cd /app && bun run build +RUN cd /app && bun run build --preset node-server -FROM base as final +FROM node:21-alpine as final COPY --from=builder /app/.output/ /app @@ -25,4 +25,4 @@ LABEL org.opencontainers.image.title "Lysand-FE" LABEL org.opencontainers.image.description "Frontend for the Lysand Project" WORKDIR /app -CMD ["bun", "run", "server/index.mjs"] \ No newline at end of file +CMD ["node", "server/index.mjs"] \ No newline at end of file