Skip to content

Commit

Permalink
Yarn cache cleanup right after install in Docker (mastodon#23557)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni authored Feb 13, 2023
1 parent 0c9d455 commit a1c0573
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
Expand Up @@ -37,7 +37,8 @@ RUN apt-get update && \
bundle config set --local without 'development test' && \
bundle config set silence_root_warning true && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile --network-timeout 600000
yarn install --pure-lockfile --network-timeout 600000 && \
yarn cache clean

FROM node:${NODE_VERSION}

Expand Down Expand Up @@ -91,8 +92,7 @@ USER mastodon
WORKDIR /opt/mastodon

# Precompile assets
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile

# Set the work dir and the container entry point
ENTRYPOINT ["/usr/bin/tini", "--"]
Expand Down

0 comments on commit a1c0573

Please sign in to comment.