Skip to content

Commit

Permalink
copy yarn cache to production
Browse files Browse the repository at this point in the history
  • Loading branch information
guplersaxanoid committed Oct 31, 2023
1 parent f251e0b commit 5297d96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ ENV TZ utc
RUN apk add --no-cache tini git curl tar

COPY --from=builder /app/packages/node/app.tgz /app.tgz
COPY --from=builder /app/.yarn/cache .
RUN tar -xzvf /app.tgz --strip 1 && rm /app.tgz

RUN yarn install --production --non-interactive --pure-lockfile --prefer-offline

RUN YARN_CACHE_FOLDER=/.yarn/cache yarn install --production --non-interactive --pure-lockfile --prefer-offline
RUN yarn cache clean

ENTRYPOINT ["/sbin/tini", "--", "bin/run"]
CMD ["-f","/app"]

0 comments on commit 5297d96

Please sign in to comment.