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
|
RUN corepack enable yarn && yarn install --immutable
|
||||||
|
|
||||||
# Stage 2: Build the application
|
# Stage 2: Build the application
|
||||||
FROM base AS builder
|
COPY /app/node_modules ./node_modules
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN corepack enable yarn && yarn build
|
RUN corepack enable yarn && yarn build
|
||||||
|
|
||||||
# Stage 3: Production server
|
# Stage 3: Production server
|
||||||
FROM base AS runner
|
|
||||||
WORKDIR /app
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
COPY --from=builder /app/.next/standalone ./
|
COPY /app/.next/standalone ./
|
||||||
COPY --from=builder /app/.next/static ./.next/static
|
COPY /app/.next/static ./.next/static
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "server.js"]
|
CMD ["yarn", "start"]
|
||||||
Reference in New Issue
Block a user