Skip to content

Commit

Permalink
fix: Dockerfile cache-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
albttx committed Oct 18, 2024
1 parent 5fbedad commit 4bdbeda
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ FROM node:23-alpine AS build
WORKDIR /app

# Set environment variables for non-interactive npm installs
ENV NPM_CONFIG_LOGLEVEL=warn
ENV YARN_CACHE_FOLDER=/root/.yarn
ENV YARN_CACHE_FOLDER=/root/.yarn/cache
RUN mkdir -p $YARN_CACHE_FOLDER

RUN corepack enable
RUN yarn set version stable

COPY --chown=node . /app

RUN --mount=type=cache,mode=0777,target=/root/.yarn yarn install
RUN --mount=type=cache,mode=0777,target=/root/.yarn yarn install --cache-folder ${YARN_CACHE_FOLDER} --frozen-lockfile
RUN --mount=type=cache,mode=0777,target=/root/.yarn yarn build

## Final image
Expand Down

0 comments on commit 4bdbeda

Please sign in to comment.