fix dockerfile
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 2m55s
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 2m55s
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -7,18 +7,14 @@ COPY package.json yarn.lock ./
|
||||
RUN corepack enable yarn && yarn install --immutable
|
||||
|
||||
# Stage 2: Build the application
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN corepack enable yarn && yarn build
|
||||
|
||||
# Stage 3: Production server
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY /app/.next/standalone ./
|
||||
COPY /app/.next/static ./.next/static
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["yarn", "start"]
|
||||
Reference in New Issue
Block a user