Skip to content

Commit

Permalink
feat: use nodjs lts in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
GiyoMoon committed Aug 26, 2024
1 parent 4a90ab2 commit c79f8b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Install dependencies only when needed
FROM node:16.12.0-alpine3.14 AS deps
FROM node:lts-alpine3.14 AS deps
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:16.12.0-alpine3.14 AS builder
FROM node:lts-alpine3.14 AS builder
WORKDIR /app
COPY package.json yarn.lock tsconfig.json tsconfig.build.json nest-cli.json ./
COPY ./src ./src
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install

# Production image, copy all the files and run nest
FROM node:16.12.0-alpine3.14 AS runner
FROM node:lts-alpine3.14 AS runner
WORKDIR /app

ENV NODE_ENV production
Expand All @@ -29,4 +29,4 @@ USER nestjs

EXPOSE 3001

CMD ["yarn", "start:prod"]
CMD ["yarn", "start:prod"]

0 comments on commit c79f8b5

Please sign in to comment.