-
Notifications
You must be signed in to change notification settings - Fork 90
/
Dockerfile
68 lines (57 loc) · 1.3 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM ubuntu:14.04
MAINTAINER talkingquickly.co.uk <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
# INSTALL
RUN apt-get update -y --fix-missing
RUN apt-get install -y --fix-missing -q \
autoconf \
automake \
bison \
build-essential \
curl \
git-core \
libc6-dev \
libffi-dev \
libssl-dev \
libtool \
libyaml-dev \
libxml2-dev \
make \
ncurses-dev \
nodejs \
openjdk-7-jdk \
openssl \
pkg-config \
postgresql-client \
unzip \
vim \
wget \
xvfb
# Get ruby-build
RUN git clone https://github.com/sstephenson/ruby-build.git /tmp/ruby-build && \
cd /tmp/ruby-build && \
./install.sh && \
cd / && \
rm -rf /tmp/ruby-build
# List available rubies
RUN ruby-build --definitions
# Install ruby
RUN ruby-build -v jruby-1.7.19 /usr/local
# Install base gems
RUN gem install bundler rubygems-bundler --no-rdoc --no-ri
# Regenerate binstubs
RUN gem regenerate_binstubs
# Rails app code
ADD docker/rails/start-server.sh /start-server.sh
RUN chmod +x /start-server.sh
RUN mkdir /app
WORKDIR /app
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle install --retry 3
ADD . /app
# default to development mode. Override by setting RAILS_ENV in the bash environment.
ENV RAILS_ENV development
EXPOSE 3000
# Server startup
CMD ["/start-server.sh"]