forked from zooniverse/panoptes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
29 lines (21 loc) · 848 Bytes
/
Dockerfile.dev
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
FROM ruby:2.5
WORKDIR /rails_app
RUN echo $(grep "VERSION=" /etc/os-release | cut -d "(" -f2 | cut -d ")" -f1) | \
xargs -i echo "deb http://apt.postgresql.org/pub/repos/apt/ {}-pgdg main" > /etc/apt/sources.list.d/postgresql.list && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get update && apt-get -y upgrade && \
apt-get install --no-install-recommends -y \
git \
curl \
libpq-dev \
postgresql-client-9.5 \
tmpreaper \
&& \
apt-get clean
ADD ./Gemfile /rails_app/
ADD ./Gemfile.lock /rails_app/
RUN bundle config --global jobs `cat /proc/cpuinfo | grep processor | wc -l | xargs -I % expr % - 1` && \
bundle install
ADD ./ /rails_app
RUN (cd /rails_app && mkdir -p tmp/pids && rm -f tmp/pids/*.pid)
CMD ["/rails_app/scripts/docker/start.sh"]