Skip to content

Commit

Permalink
Get rid of yarn 1.22.22 and install 4.6.0 with proper permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitytakei committed Feb 21, 2025
1 parent f49bd99 commit 8fe7565
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ RUN groupadd --system --gid 1000 rails && \
chmod -R 755 /rails && \
chown -R rails:rails db log storage tmp /usr/local/bundle

# Clean up any existing Yarn and set up 4.6.0
RUN apt-get remove -y yarn || true && \
rm -f /usr/local/bin/yarn /usr/local/bin/yarnpkg && \
corepack enable && \
corepack prepare yarn@4.6.0 --activate && \
# Make sure corepack directories are owned by rails user (will be created next)
chown -R rails:rails /usr/local/share/.corepack /usr/local/share/nvm

USER rails

# Entrypoint prepares the database.
Expand Down

0 comments on commit 8fe7565

Please sign in to comment.