Skip to content

Commit

Permalink
Add BOOTSNAP_READONLY to Dockerfile template for production
Browse files Browse the repository at this point in the history
This was added in back in bootsnap 1.15.0 (Shopify/bootsnap#428).
This can save extra work and IO when the cache won't be changed, like is the case for docker containers
  • Loading branch information
technicalpickles committed Nov 15, 2023
1 parent 67bc765 commit 1aa7602
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ COPY . .
# Precompile bootsnap code for faster boot times
RUN bundle exec bootsnap precompile app/ lib/

# Switch to read-only since any cache changes after this point won't persist between containers
ENV BOOTSNAP_READONLY="1"
<% end -%>
<% unless dockerfile_binfile_fixups.empty? -%>
# Adjust binfiles to be executable on Linux
Expand Down

0 comments on commit 1aa7602

Please sign in to comment.