Skip to content

Commit

Permalink
Add dependencies download step to result image
Browse files Browse the repository at this point in the history
  • Loading branch information
alagishev committed Jan 19, 2025
1 parent c211463 commit f5f3714
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ FROM docker.io/node:20

WORKDIR /usr/src/app

COPY package*.json ./
COPY tsconfig*.json ./

# for local machine build
#COPY .npmrc .npmrc

# for build via GitHub actions
RUN --mount=type=secret,id=npmrc,target=.npmrc npm ci && npm run build --if-present

RUN npm ci
RUN rm .npmrc

COPY --from=builder /workspace/dist dist

USER 10001
Expand Down

0 comments on commit f5f3714

Please sign in to comment.