forked from zooniverse/panoptes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
31 lines (23 loc) · 897 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
30
31
FROM ruby:2.5
WORKDIR /rails_app
ENV DEBIAN_FRONTEND noninteractive
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 \
supervisor \
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 supervisord.conf.dev /etc/supervisor/conf.d/panoptes.conf
ADD ./ /rails_app
CMD ["/rails_app/scripts/docker/start.sh"]