Browse Source

[ruby] Copy Gemfile.lock in docker (#10132)

This makes sure the gem versions in the lock file are used, resulting in
more predictable runs.
Petrik de Heus 2 months ago
parent
commit
3d025b68b6

+ 1 - 1
frameworks/Ruby/agoo/agoo.dockerfile

@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 
 WORKDIR /rack
 
-COPY Gemfile app.rb ./
+COPY Gemfile* app.rb ./
 
 RUN bundle install --jobs=4
 

+ 1 - 0
frameworks/Ruby/padrino/padrino-unicorn.dockerfile

@@ -7,6 +7,7 @@ COPY models models
 COPY .components .components
 COPY config.ru config.ru
 COPY Gemfile Gemfile
+COPY Gemfile.lock Gemfile.lock
 COPY Rakefile Rakefile
 
 RUN bundle config set with 'unicorn'

+ 1 - 0
frameworks/Ruby/padrino/padrino.dockerfile

@@ -7,6 +7,7 @@ COPY models models
 COPY .components .components
 COPY config.ru config.ru
 COPY Gemfile Gemfile
+COPY Gemfile.lock Gemfile.lock
 COPY Rakefile Rakefile
 
 RUN bundle config set with 'puma'

+ 1 - 1
frameworks/Ruby/rack/rack-falcon.dockerfile

@@ -9,7 +9,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 
 WORKDIR /rack
 
-COPY Gemfile ./
+COPY Gemfile* ./
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
 RUN bundle config set with 'falcon'

+ 1 - 1
frameworks/Ruby/rack/rack-iodine.dockerfile

@@ -9,7 +9,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 
 WORKDIR /rack
 
-COPY Gemfile ./
+COPY Gemfile* ./
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
 RUN bundle config set with 'iodine'

+ 1 - 1
frameworks/Ruby/rack/rack-jruby.dockerfile

@@ -4,7 +4,7 @@ RUN apt-get update -y && apt-get install netbase -y
 
 WORKDIR /rack
 
-COPY Gemfile  ./
+COPY Gemfile*  ./
 
 RUN bundle config set with 'puma'
 RUN bundle install --jobs=8

+ 1 - 1
frameworks/Ruby/rack/rack-passenger.dockerfile

@@ -9,7 +9,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 
 WORKDIR /rack
 
-COPY Gemfile ./
+COPY Gemfile* ./
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
 RUN bundle config set with 'passenger'

+ 1 - 1
frameworks/Ruby/rack/rack-pitchfork.dockerfile

@@ -9,7 +9,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 
 WORKDIR /rack
 
-COPY Gemfile ./
+COPY Gemfile* ./
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
 RUN bundle config set with 'pitchfork'

+ 1 - 1
frameworks/Ruby/rack/rack-unicorn.dockerfile

@@ -9,7 +9,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 
 WORKDIR /rack
 
-COPY Gemfile ./
+COPY Gemfile* ./
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
 RUN bundle config set with 'unicorn'

+ 1 - 1
frameworks/Ruby/rack/rack.dockerfile

@@ -10,7 +10,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 
 WORKDIR /rack
 
-COPY Gemfile ./
+COPY Gemfile* ./
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
 RUN bundle config set with 'puma'