Skip to content

Commit 4e94b39

Browse files
committed
Add ruby 1.9
1 parent 9ebdc9a commit 4e94b39

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

1.9/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM buildpack-deps:wheezy
2+
3+
ENV RUBY_MAJOR 1.9
4+
ENV RUBY_VERSION 1.9.3-p547
5+
6+
# some of ruby's build scripts are written in ruby
7+
# we purge this later to make sure our final image uses what we just built
8+
RUN apt-get update \
9+
&& apt-get install -y bison curl ruby procps \
10+
&& mkdir -p /usr/src/ruby \
11+
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
12+
| tar -xjC /usr/src/ruby --strip-components=1 \
13+
&& cd /usr/src/ruby \
14+
&& autoconf \
15+
&& ./configure --disable-install-doc \
16+
&& make \
17+
&& apt-get purge -y bison ruby procps \
18+
&& apt-get autoremove -y \
19+
&& make install \
20+
&& rm -r /usr/src/ruby
21+
22+
# skip installing gem documentation
23+
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
24+
25+
RUN gem install bundler

1.9/onbuild/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM ruby:1.9.3
2+
3+
RUN mkdir -p /usr/src/app
4+
WORKDIR /usr/src/app
5+
6+
ONBUILD ADD Gemfile /usr/src/app/
7+
ONBUILD ADD Gemfile.lock /usr/src/app/
8+
ONBUILD RUN bundle install --system
9+
10+
ONBUILD ADD . /usr/src/app

Dockerfile renamed to 2.1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM buildpack-deps
1+
FROM buildpack-deps:jessie
22

33
ENV RUBY_MAJOR 2.1
44
ENV RUBY_VERSION 2.1.2
@@ -13,7 +13,7 @@ RUN apt-get update \
1313
&& cd /usr/src/ruby \
1414
&& autoconf \
1515
&& ./configure --disable-install-doc \
16-
&& make -j"${nproc}" \
16+
&& make -j"$(nproc)" \
1717
&& apt-get purge -y bison ruby procps \
1818
&& apt-get autoremove -y \
1919
&& make install \
File renamed without changes.

0 commit comments

Comments
 (0)