You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How are you deploying your application? (if relevant)
docker build . -t my-project:0.1.18 --no-cache
Describe the Bug
standalone nextjs after update to 13.4.16 from 13.4.0 no longer runs in container.
In version 13.4.0 ran fine.
My Dockerfile:
FROM node:18-alpine AS base
FROM base AS deps
RUN apk add --no-cache libc6-compat
RUN apk update && apk add git
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn build
# If using npm comment out above and use below instead
# RUN npm run build
# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app
ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs
COPY --from=builder /app/public ./public
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/.next/cache ./.next/cache
EXPOSE 3000
ENV PORT 3000
ENV HOSTNAME localhost
CMD ["node", "server.js"]
Expected Behavior
it must show index page in browser.
To Reproduce
it must show index page in browser.
The text was updated successfully, but these errors were encountered:
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Which example does this report relate to?
https://github.com/vercel/next.js/tree/canary/examples/api-routes-rest
What browser are you using? (if relevant)
chrome
How are you deploying your application? (if relevant)
docker build . -t my-project:0.1.18 --no-cache
Describe the Bug
standalone nextjs after update to 13.4.16 from 13.4.0 no longer runs in container.
In version 13.4.0 ran fine.
My Dockerfile:
Expected Behavior
it must show index page in browser.
To Reproduce
it must show index page in browser.
The text was updated successfully, but these errors were encountered: