Browse Source

Yarn cache cleanup right after install in Docker (#23557)

closed-social-glitch-2
Nick Schonning 1 year ago
committed by GitHub
parent
commit
a1c0573bc6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      Dockerfile

+ 3
- 3
Dockerfile View File

@ -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}
@ -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", "--"]

Loading…
Cancel
Save