Created
September 11, 2023 21:45
-
-
Save ravshansbox/2c74a11b808ab12471c789336b181851 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:18-alpine AS base | |
WORKDIR /app | |
COPY package.json package-lock.json ./ | |
FROM base AS dev | |
RUN npm ci | |
COPY . ./ | |
RUN npm run build | |
FROM base AS prod | |
RUN npm ci --omit=dev | |
FROM base | |
COPY --from=prod /app/node_modules ./node_modules | |
COPY --from=dev /app/dist ./src | |
CMD npm run start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment