Skip to content

Commit

Permalink
chore: 基础镜像更换为node:20.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Oct 12, 2024
1 parent a7265bd commit 9df2669
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=node:18.18.0-alpine
ARG BASE_IMAGE=node:20.18.0
FROM $BASE_IMAGE AS build

WORKDIR /app
Expand All @@ -7,7 +7,7 @@ COPY package.json package-lock.json ./
COPY packages/server/package.json packages/server ./packages/server/
COPY packages/home/package.json packages/home ./packages/home/
COPY packages/admin/package.json packages/admin ./packages/admin/
RUN npm ci
RUN --mount=type=cache,dst=/root/.npm npm ci

ENV NODE_ENV=production

Expand All @@ -23,11 +23,15 @@ COPY package.json package-lock.json ./
COPY packages/server/package.json packages/server ./packages/server/
COPY packages/home/package.json packages/home ./packages/home/
COPY packages/admin/package.json packages/admin ./packages/admin/
RUN npm ci --omit=dev
RUN --mount=type=cache,dst=/root/.npm npm ci --omit=dev

FROM $BASE_IMAGE AS release

RUN apk add --no-cache tini
RUN apt-get update && \
apt-get install -y \
tini && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app

Expand Down

0 comments on commit 9df2669

Please sign in to comment.