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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is my Dockerfile below :
`# Dockerfile
ARG NODE=node:20-alpine
Stage 1: Install dependencies
FROM ${NODE} AS deps
RUN apk update
&& apk add --no-cache openssl libc6-compat
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/cache/apk/*
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
Stage 2: Build the app
FROM ${NODE} AS builder
ARG DATABASE_URL
ENV DATABASE_URL=$DATABASE_URL
ARG NEXT_PUBLIC_APP_URL
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL
RUN apk update
&& apk add --no-cache openssl libc6-compat
&& rm -rf /var/cache/apk/*
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npx prisma generate
RUN npm run build
Stage 3: Run the production
FROM ${NODE} AS runner
RUN apk update
&& apk add --no-cache openssl libc6-compat
&& rm -rf /var/cache/apk/*
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
copy assets and the generated standalone server
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma
USER nextjs
EXPOSE 3000
Serve the app
CMD ["node", "server.js"]
`
But When Using Nixpacks is working normally.
Is Anyone can help with this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions