-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
44 lines (33 loc) · 1.34 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM ubuntu:14.04
ENV RUBY_MAJOR="2.2" \
RUBY_VERSION="2.2.2" \
DB_PACKAGES="libsqlite3-dev" \
RUBY_PACKAGES="ruby2.2 ruby2.2-dev"
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
curl \
libffi-dev \
libgdbm-dev \
libncurses-dev \
libreadline6-dev \
libssl-dev \
libyaml-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN echo 'gem: --no-document' >> /.gemrc
RUN mkdir -p /tmp/ruby \
&& curl -L "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /tmp/ruby --strip-components=1 \
&& cd /tmp/ruby \
&& ./configure --disable-install-doc \
&& make \
&& make install \
&& gem update --system \
&& rm -r /tmp/ruby
RUN gem install --no-document bundler
# see update.sh for why all "apt-get install"s have to stay as one long line
RUN apt-get update && curl --silent --location https://deb.nodesource.com/setup_0.12 | bash - && apt-get install -y nodejs --no-install-recommends && rm -rf /var/lib/apt/lists/*
# see http://guides.rubyonrails.org/command_line.html#rails-dbconsole
RUN apt-get update && apt-get install -y mysql-client postgresql-client libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
ENV RAILS_VERSION 4.2.3
RUN gem install rails --version "$RAILS_VERSION"