Files
lmgcitfy/Dockerfile
The Shittinator e1a682566b Oops, wrong port
2026-02-22 20:07:56 -06:00

29 lines
675 B
Docker

#
# LMGCITFY Dockerfile
#
ARG nodever=22
# STAGE 1: Build the application
FROM docker.io/library/node:$nodever-alpine AS builder
WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1
COPY package*.json ./
RUN npm ci
COPY ./ ./
RUN npm run build
# STAGE 2: Prod build
FROM docker.io/library/node:$nodever-alpine AS prod
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
RUN addgroup -S nextjs && adduser -S nextjs -G nextjs
# Copy standalone server and assets
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
# Jump in
USER nextjs
EXPOSE 3000
ENTRYPOINT [ "node", "server.js" ]