🚑 Hotfix Docker image with new NextJS version

This commit is contained in:
ajnart
2022-07-22 19:46:18 +02:00
parent 702428d24f
commit a8c5f07fb2
15 changed files with 327 additions and 9862 deletions

View File

@@ -1,14 +1,28 @@
FROM node:16-alpine
WORKDIR /app
ENV NODE_ENV production
COPY /next.config.js ./
COPY /public ./public
COPY /package.json ./package.json
# Automatically leverage output traces to reduce image size. https://nextjs.org/docs/advanced-features/output-file-tracing
COPY /.next/standalone ./
COPY /.next/static ./.next/static
EXPOSE 7575
ENV PORT 7575
RUN apk add tzdata
VOLUME /app/data/configs
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY next.config.js ./
COPY public ./public
COPY package.json ./package.json
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --chown=nextjs:nodejs .next/standalone ./
COPY --chown=nextjs:nodejs .next/static ./.next/static
USER nextjs
EXPOSE 7575
ENV PORT 7575
CMD ["node", "server.js"]