-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
30 lines (22 loc) · 857 Bytes
/
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
FROM ubuntu:trusty
MAINTAINER jussi.nummelin@gmail.com
RUN echo 'deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu trusty main' >> /etc/apt/sources.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x80f70e11f0f0d5f10cb20e62f5da5f09c3173aa6 && \
apt-get update && \
apt-get install -y ruby2.2 ruby2.2-dev build-essential ca-certificates libssl-dev sqlite3 libsqlite3-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
gem install bundler
ADD Gemfile /app/
ADD Gemfile.lock /app/
RUN cd /app ; bundle install --without development test
ADD . /app
RUN chown -R nobody:nogroup /app
USER nobody
ENV RACK_ENV production
EXPOSE 5000
WORKDIR /app
CMD ["./run.sh"]
# Make sure the user sqlite db file is on volume so that it can be easily backed up
ENV DB_PATH=/data/users.db
VOLUME ["/data"]