Skip to content

Commit

Permalink
Ensure all yarn libs are copied to final docker stage by disabling gl…
Browse files Browse the repository at this point in the history
…obal cache
  • Loading branch information
CarsonF committed Nov 2, 2023
1 parent ca4b858 commit 6192c67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ FROM node as builder
# Install dependencies (in separate docker layer from app code)
COPY .yarn .yarn
COPY package.json yarn.lock .yarnrc.yml ./
ENV VERBOSE_YARN_LOG=discard
ENV VERBOSE_YARN_LOG=discard \
# Use the local cache folder so libs are correctly copied in runtime stage
YARN_ENABLE_GLOBAL_CACHE=false
RUN yarn install --immutable

COPY . .
Expand Down

0 comments on commit 6192c67

Please sign in to comment.