From 6acdb3fed89359dd38a7fa7f9eb2646caf75f4b5 Mon Sep 17 00:00:00 2001 From: DefectingCat Date: Thu, 21 Jul 2022 18:02:01 +0800 Subject: [PATCH] Update Dockerfile --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1fedd97..d6026af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN yarn install --frozen-lockfile # RUN npm ci # Rebuild the source code only when needed -FROM node:16-alpine AS builder +FROM node:lts-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -33,7 +33,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories # RUN npm run build # Production image, copy all the files and run next -FROM node:16-alpine AS runner +FROM node:lts-alpine AS runner WORKDIR /app ENV NODE_ENV production @@ -46,8 +46,8 @@ RUN adduser --system --uid 1001 nextjs # You only need to copy next.config.js if you are NOT using the default configuration COPY --from=builder /app/.env ./ COPY --from=builder /app/next.config.mjs ./ -COPY --from=builder /app/public ./public -COPY --from=builder /app/package.json ./package.json +# COPY --from=builder /app/public ./public +# COPY --from=builder /app/package.json ./package.json # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing