Skip to content
Discussion options

You must be logged in to vote

Hello, I was able to resolve the issue by updating my Dockerfile. Since I am self-hosting (not using Vercel) and using the standalone output, I cannot use the next start command.

Here is my complete working Dockerfile:

FROM node:22-alpine AS deps
WORKDIR /app

RUN apk add --no-cache libc6-compat

COPY package.json package-lock.json ./

RUN npm ci

FROM node:22-alpine AS builder
WORKDIR /app

COPY --from=deps /app/node_modules ./node_modules
COPY . .

RUN npm run build

FROM node:22-alpine AS runner
WORKDIR /app

ENV PORT=3000
ENV HOSTNAME="0.0.0.0"

RUN apk add --no-cache libc6-compat openssl

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=buil…

Replies: 8 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@renato-viasoft
Comment options

Comment options

You must be logged in to vote
2 replies
@renato-viasoft
Comment options

@Shlok-Zanwar
Comment options

Comment options

You must be logged in to vote
1 reply
@tedsecretsource
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@euntak
Comment options

@yei-cap3
Comment options

Comment options

You must be logged in to vote
1 reply
@BBocho8
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@renato-viasoft
Comment options

Answer selected by renato-viasoft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet