Skip to content

Commit

Permalink
⬆️ Update docker image version
Browse files Browse the repository at this point in the history
  • Loading branch information
evans-g-crsj committed Jan 9, 2024
1 parent fd33782 commit f1b4fe8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
ARG image=node:21-alpine3.18
# First image to compile typescript to javascript
FROM node:20-alpine3.18 AS build-image
FROM ${image} AS build-image
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run clean
RUN npm run build

# Second image, that creates an image for production
FROM node:20-alpine3.18 AS prod-image
FROM ${image} AS prod-image
WORKDIR /app
COPY --from=build-image ./app/dist ./dist
COPY package* ./
RUN npm ci --production
CMD [ "node", "./dist/src/index.js" ]
CMD [ "node", "./dist/src/index.js" ]

0 comments on commit f1b4fe8

Please sign in to comment.