From 03fecc261e6981cbbe6080ad19059aa9fdb04663 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 Date: Sat, 10 Feb 2024 17:45:28 +0800 Subject: [PATCH] chore: fix fly --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa75749..8b47b3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ # syntax = docker/dockerfile:1 -ARG BUN_VERSION=1.0.18 -FROM oven/bun:${BUN_VERSION} as base +# Adjust NODE_VERSION as desired +ARG NODE_VERSION=18.18.0 +FROM node:${NODE_VERSION}-slim as base -LABEL fly_launch_runtime="Bun" +LABEL fly_launch_runtime="Node.js" # Node.js app lives here WORKDIR /app @@ -12,6 +13,9 @@ WORKDIR /app ENV NODE_ENV="production" ENV NITRO_PRESET="bun" +# Install bun +RUN npm install -g bun@1.0.18 + # Throw-away build stage to reduce size of final image FROM base as build @@ -23,7 +27,7 @@ COPY . ./ # Install node modules COPY --link .npmrc package.json bun.lockb ./ -RUN bun install +RUN bun install --frozen-lockfile # Build application RUN bun run build