-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (29 loc) · 1.06 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
FROM quay.io/aptible/ubuntu:12.04
MAINTAINER "Lewis Marshall" [email protected]
RUN apt-get update
RUN apt-get -y install wget build-essential zlib1g-dev libssl-dev \
libreadline6-dev libyaml-dev && cd /tmp && \
wget -q http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz && \
tar xzf ruby-2.2.0.tar.gz && \
cd ruby-2.2.0 && ./configure --enable-shared --prefix=/usr && \
make && make install && cd .. && rm -rf ruby-2.2.0*
# Don't want to do this - app should include dependancies...
# RUN gem install bundler
# Install some troubleshooting tools:
RUN apt-get -y install net-tools
ADD ./ /hod-app/
RUN adduser web --home /home/web --shell /bin/bash --disabled-password --gecos ""
RUN chown -R web:web /hod-app
USER web
ENV HOME /home/web
ENV PATH $PATH:/home/web/.gem/ruby/2.2.0/bin
ENV GEM_HOME /home/web/.gem/ruby/2.2.0
ENV GEM_PATH $GEM_HOME
RUN gem install --user-install bundler
WORKDIR /hod-app/
RUN bundle install
USER root
RUN chown -R web:web /hod-app
EXPOSE 4567
USER web
ENTRYPOINT ["/bin/sh", "-c", "cd /hod-app && ruby ./server.rb"]