use Docker cache mount for Ruby bundler
This commit is contained in:
		@@ -30,10 +30,9 @@ EOT
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
COPY Gemfile Gemfile.lock ./
 | 
					COPY Gemfile Gemfile.lock ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN <<EOT
 | 
					RUN \
 | 
				
			||||||
 | 
					  --mount=type=cache,id=usr-local-bundle-ruby-cache,target=${BUNDLE_PATH}/ruby/3.4.0/cache,sharing=locked \
 | 
				
			||||||
  bundle install
 | 
					  bundle install
 | 
				
			||||||
  rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
 | 
					 | 
				
			||||||
EOT
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY . .
 | 
					COPY . .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,10 +38,9 @@ RUN \
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
COPY Gemfile Gemfile.lock ./
 | 
					COPY Gemfile Gemfile.lock ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN <<EOT
 | 
					RUN \
 | 
				
			||||||
 | 
					  --mount=type=cache,id=usr-local-bundle-ruby-cache,target=${BUNDLE_PATH}/ruby/3.4.0/cache,sharing=locked \
 | 
				
			||||||
  bundle install
 | 
					  bundle install
 | 
				
			||||||
  rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
 | 
					 | 
				
			||||||
EOT
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY . .
 | 
					COPY . .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user