mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
refactor(docker): update Dockerfile to use lts-alpine and streamline build process
- Changed base image for both builder and runner stages to node:lts-alpine for improved performance and reduced image size. - Removed hardcoded NODE_VERSION argument to simplify the Dockerfile. - Updated package installation command to use 'apk add' for consistency. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
|
||||
ARG NODE_VERSION=22.11.0
|
||||
|
||||
FROM node:${NODE_VERSION}-slim AS builder
|
||||
FROM node:lts-alpine AS builder
|
||||
ENV PNPM_HOME=/pnpm
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable && corepack prepare pnpm@10.19.0 --activate
|
||||
@@ -27,11 +25,11 @@ RUN pnpm --filter core build
|
||||
RUN mkdir -p be/apps/core/dist/static/web && cp -r apps/web/dist/. be/apps/core/dist/static/web/
|
||||
RUN mkdir -p be/apps/core/dist/static/dashboard && cp -r be/apps/dashboard/dist/. be/apps/core/dist/static/dashboard/
|
||||
|
||||
FROM node:${NODE_VERSION}-slim AS runner
|
||||
FROM node:lts-alpine AS runner
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk install --no-cache perl
|
||||
RUN apk add --no-cache perl
|
||||
COPY --from=builder /workspace/be/apps/core/dist ./dist
|
||||
COPY --from=builder /workspace/be/apps/core/drizzle ./drizzle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user