Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 2m55s
20 lines
453 B
Docker
20 lines
453 B
Docker
FROM node:lts-alpine AS base
|
|
|
|
# Stage 1: Install dependencies
|
|
FROM base AS deps
|
|
WORKDIR /app
|
|
COPY package.json yarn.lock ./
|
|
RUN corepack enable yarn && yarn install --immutable
|
|
|
|
# Stage 2: Build the application
|
|
COPY /app/node_modules ./node_modules
|
|
COPY . .
|
|
RUN corepack enable yarn && yarn build
|
|
|
|
# Stage 3: Production server
|
|
ENV NODE_ENV=production
|
|
COPY /app/.next/standalone ./
|
|
COPY /app/.next/static ./.next/static
|
|
|
|
EXPOSE 3000
|
|
CMD ["yarn", "start"] |