File tree Expand file tree Collapse file tree 6 files changed +51
-18
lines changed Expand file tree Collapse file tree 6 files changed +51
-18
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ RUN apt-get update \
22
22
&& rm -r /usr/src/ruby
23
23
24
24
# skip installing gem documentation
25
- RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
25
+ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME /.gemrc"
26
26
27
- RUN gem install bundler
27
+ # install things globally, for great justice
28
+ ENV GEM_HOME /usr/local/bundle
29
+ ENV PATH $GEM_HOME/bin:$PATH
30
+ RUN gem install bundler \
31
+ && bundle config --global path "$GEM_HOME" \
32
+ && bundle config --global bin "$GEM_HOME/bin"
33
+
34
+ # don't create ".bundle" in all our apps
35
+ ENV BUNDLE_APP_CONFIG $GEM_HOME
28
36
29
37
CMD [ "irb" ]
Original file line number Diff line number Diff line change 1
1
FROM ruby:1.9.3-p547
2
2
3
+ # throw errors if Gemfile has been modified since Gemfile.lock
4
+ RUN bundle config --global frozen 1
5
+
3
6
RUN mkdir -p /usr/src/app
4
7
WORKDIR /usr/src/app
5
8
6
- ONBUILD ADD Gemfile /usr/src/app/
7
- ONBUILD ADD Gemfile.lock /usr/src/app/
8
- ONBUILD RUN bundle install --system
9
+ ONBUILD COPY Gemfile /usr/src/app/
10
+ ONBUILD COPY Gemfile.lock /usr/src/app/
11
+ ONBUILD RUN bundle install
9
12
10
- ONBUILD ADD . /usr/src/app
13
+ ONBUILD COPY . /usr/src/app
Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ RUN apt-get update \
22
22
&& rm -r /usr/src/ruby
23
23
24
24
# skip installing gem documentation
25
- RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
25
+ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME /.gemrc"
26
26
27
- RUN gem install bundler
27
+ # install things globally, for great justice
28
+ ENV GEM_HOME /usr/local/bundle
29
+ ENV PATH $GEM_HOME/bin:$PATH
30
+ RUN gem install bundler \
31
+ && bundle config --global path "$GEM_HOME" \
32
+ && bundle config --global bin "$GEM_HOME/bin"
33
+
34
+ # don't create ".bundle" in all our apps
35
+ ENV BUNDLE_APP_CONFIG $GEM_HOME
28
36
29
37
CMD [ "irb" ]
Original file line number Diff line number Diff line change 1
1
FROM ruby:2.0.0-p576
2
2
3
+ # throw errors if Gemfile has been modified since Gemfile.lock
4
+ RUN bundle config --global frozen 1
5
+
3
6
RUN mkdir -p /usr/src/app
4
7
WORKDIR /usr/src/app
5
8
6
- ONBUILD ADD Gemfile /usr/src/app/
7
- ONBUILD ADD Gemfile.lock /usr/src/app/
8
- ONBUILD RUN bundle install --system
9
+ ONBUILD COPY Gemfile /usr/src/app/
10
+ ONBUILD COPY Gemfile.lock /usr/src/app/
11
+ ONBUILD RUN bundle install
9
12
10
- ONBUILD ADD . /usr/src/app
13
+ ONBUILD COPY . /usr/src/app
Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ RUN apt-get update \
22
22
&& rm -r /usr/src/ruby
23
23
24
24
# skip installing gem documentation
25
- RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
25
+ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME /.gemrc"
26
26
27
- RUN gem install bundler
27
+ # install things globally, for great justice
28
+ ENV GEM_HOME /usr/local/bundle
29
+ ENV PATH $GEM_HOME/bin:$PATH
30
+ RUN gem install bundler \
31
+ && bundle config --global path "$GEM_HOME" \
32
+ && bundle config --global bin "$GEM_HOME/bin"
33
+
34
+ # don't create ".bundle" in all our apps
35
+ ENV BUNDLE_APP_CONFIG $GEM_HOME
28
36
29
37
CMD [ "irb" ]
Original file line number Diff line number Diff line change 1
1
FROM ruby:2.1.3
2
2
3
+ # throw errors if Gemfile has been modified since Gemfile.lock
4
+ RUN bundle config --global frozen 1
5
+
3
6
RUN mkdir -p /usr/src/app
4
7
WORKDIR /usr/src/app
5
8
6
- ONBUILD ADD Gemfile /usr/src/app/
7
- ONBUILD ADD Gemfile.lock /usr/src/app/
8
- ONBUILD RUN bundle install --system
9
+ ONBUILD COPY Gemfile /usr/src/app/
10
+ ONBUILD COPY Gemfile.lock /usr/src/app/
11
+ ONBUILD RUN bundle install
9
12
10
- ONBUILD ADD . /usr/src/app
13
+ ONBUILD COPY . /usr/src/app
You can’t perform that action at this time.
0 commit comments