From 394c43509ba38db60a6254155d8589656ec3eeec Mon Sep 17 00:00:00 2001 From: bangbang93 Date: Sun, 4 Feb 2024 15:16:29 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=9F=E4=B8=80=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 00a8f03..0ec285e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,15 @@ -FROM node:20-alpine AS install +ARG BASE_IMAGE=node:20-bullseye-slim +FROM $BASE_IMAGE AS install WORKDIR /opt/openbmclapi -RUN apk add build-base +RUN apt update && \ + apt install -y build-essential python3 COPY package-lock.json package.json tsconfig.json ./ RUN npm ci COPY src ./src RUN npm run build -FROM node:20-bullseye-slim AS build +FROM $BASE_IMAGE AS build RUN apt-get update && \ apt-get install -y nginx tini