Skip to content

Commit

Permalink
ci(dockerfile): update dockerfile to use yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
Gijsdeman committed Nov 2, 2024
1 parent 72c5621 commit 1ceb436
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
FROM node:20 as build
ENV NODE_ENV development
WORKDIR /app
COPY ./package.json ./package-lock.json ./
RUN npm install
COPY ./package.json ./yarn.lock ./
RUN yarn
COPY ./ ./
RUN npm run build
RUN yarn build

# Target image that will be run
FROM node:20-alpine as target
ENV NODE_ENV production

WORKDIR /app
COPY ./package.json ./package-lock.json ./
COPY ./package.json ./yarn.lock ./
RUN apk add --no-cache git
RUN npm ci
RUN yarn install --production
COPY --from=build --chown=node /app/dist /app
COPY ./public ./public

Expand Down

0 comments on commit 1ceb436

Please sign in to comment.