Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
always execute unit tests when building image
Browse files Browse the repository at this point in the history
keydon committed Jan 4, 2025
1 parent 401ef08 commit 7159796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### Step 1 ####
FROM node:18-alpine as linter
FROM node:18-alpine as test

WORKDIR /home/node/app
COPY package*.json ./
@@ -12,8 +12,8 @@ RUN npm run lint
FROM node:18-alpine as production-builder

WORKDIR /home/node/app
COPY package*.json ./
RUN npm install --production
COPY --from=test /home/node/app/package.json /home/node/app/package-lock.json ./
RUN npm install --omit=dev

#### Step 3 ####
FROM node:18-alpine as app

0 comments on commit 7159796

Please sign in to comment.