forked from ukparliament/data-driven
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 759 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 759 Bytes
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
FROM ruby:2.3.1
MAINTAINER Steven Wade "steven@stevenwade.co.uk"
ENV APP_USER parliament
# create user to run app in user space
RUN set -x \
&& groupadd -g 5000 $APP_USER \
&& adduser --disabled-password --uid 5000 --gid 5000 --gecos '' $APP_USER
ENV RAILS_ROOT /opt/sparql-exploration
RUN mkdir -p $RAILS_ROOT
# cache the gems
COPY Gemfile $RAILS_ROOT/Gemfile
COPY Gemfile.lock $RAILS_ROOT/Gemfile.lock
RUN cd $RAILS_ROOT && bundle install \
&& chown -R $APP_USER:$APP_USER $GEM_HOME
# add project
COPY . $RAILS_ROOT
RUN chown -R $APP_USER:$APP_USER $RAILS_ROOT
USER $USER
WORKDIR $RAILS_ROOT
ARG GIT_SHA=unknown
ARG GIT_TAG=unknown
LABEL git-sha=$GIT_SHA \
git-tag=$GIT_TAG
# EXPOSE 3000
CMD ["passenger", "start"]