Unverified Commit afa9bab1 authored by Vinci Rufus's avatar Vinci Rufus Committed by GitHub

fixing the docker multi-stage build failures (#14513)

It looks like the docker multi-stage file wasn't building, so fixed that and also cleaned up some of the steps
parent a9bfe13a
# Do the npm install or yarn install in the full image
FROM mhart/alpine-node AS builder
WORKDIR /app
COPY package.json .
RUN yarn install
COPY . .
RUN yarn build && yarn --production
RUN yarn --production
RUN yarn build
# And then copy over node_modules, etc from that stage to the smaller base image
FROM mhart/alpine-node:base
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/next.config.js ./next.config.js
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node_modules/.bin/next", "start"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment