Removed the --link flag

This commit is contained in:
Tiago Ribeiro
2023-07-21 10:30:14 +01:00
parent f01794fed8
commit 86c69e5993

View File

@@ -15,8 +15,8 @@ RUN yarn --frozen-lockfile
# Rebuild the source code only when needed # Rebuild the source code only when needed
FROM base AS builder FROM base AS builder
WORKDIR /app WORKDIR /app
COPY --from=deps --link /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY --link . . COPY . .
# Next.js collects completely anonymous telemetry data about general usage. # Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry # Learn more here: https://nextjs.org/telemetry
@@ -40,12 +40,12 @@ RUN \
addgroup --system --gid 1001 nodejs; \ addgroup --system --gid 1001 nodejs; \
adduser --system --uid 1001 nextjs adduser --system --uid 1001 nextjs
COPY --from=builder --link /app/public ./public COPY --from=builder /app/public ./public
# Automatically leverage output traces to reduce image size # Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing # https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --link --chown=1001:1001 /app/.next/standalone ./ COPY --from=builder --chown=1001:1001 /app/.next/standalone ./
COPY --from=builder --link --chown=1001:1001 /app/.next/static ./.next/static COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static
USER nextjs USER nextjs