2022-02-05 19:17:00 +00:00
|
|
|
FROM node:16 as build
|
2021-10-10 18:11:03 +00:00
|
|
|
WORKDIR /build/
|
2022-07-09 05:18:03 +00:00
|
|
|
COPY package.json yarn.lock .yarnrc.yml ./
|
|
|
|
COPY .yarn ./.yarn
|
|
|
|
RUN yarn install --immutable
|
2021-10-10 18:11:03 +00:00
|
|
|
COPY . .
|
|
|
|
RUN yarn build
|
|
|
|
|
2021-12-09 22:01:36 +00:00
|
|
|
FROM node:16 as prod
|
2021-10-10 18:11:03 +00:00
|
|
|
WORKDIR /app/
|
2022-07-09 05:18:03 +00:00
|
|
|
COPY --from=build /build/package.json /build/yarn.lock /build/.yarnrc.yml ./
|
|
|
|
COPY --from=build /build/.yarn ./.yarn
|
2021-10-10 18:11:03 +00:00
|
|
|
COPY --from=build /build/dist ./dist
|
2022-07-09 05:18:03 +00:00
|
|
|
RUN yarn install --immutable
|
2021-10-10 18:11:03 +00:00
|
|
|
CMD ["yarn", "start"]
|