2017-03-17 17:48:20 +08:00
|
|
|
FROM ruby:2.3.3
|
2016-02-12 23:52:43 +08:00
|
|
|
MAINTAINER BioSistemika <info@biosistemika.com>
|
|
|
|
|
|
|
|
# additional dependecies
|
2016-08-25 13:49:51 +08:00
|
|
|
RUN apt-get update -qq && \
|
|
|
|
apt-get install -y \
|
2017-03-17 17:48:20 +08:00
|
|
|
nodejs \
|
|
|
|
postgresql-client \
|
2016-08-25 13:49:51 +08:00
|
|
|
default-jre-headless \
|
|
|
|
unison \
|
|
|
|
sudo graphviz --no-install-recommends \
|
|
|
|
sudo libfile-mimeinfo-perl && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
# heroku tools
|
|
|
|
RUN wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
|
|
|
|
|
|
|
|
# install gems
|
|
|
|
COPY Gemfile* /tmp/
|
2017-02-07 21:01:19 +08:00
|
|
|
COPY addons /tmp/addons
|
2016-02-12 23:52:43 +08:00
|
|
|
WORKDIR /tmp
|
|
|
|
RUN bundle install
|
2017-02-07 21:01:19 +08:00
|
|
|
RUN rm -rf addons
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
# create app directory
|
|
|
|
ENV APP_HOME /usr/src/app
|
|
|
|
RUN mkdir $APP_HOME
|
|
|
|
WORKDIR $APP_HOME
|
2017-02-07 21:01:19 +08:00
|
|
|
RUN mkdir addons
|
|
|
|
RUN ln -s $(readlink -f addons) /tmp
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
# container user
|
|
|
|
RUN groupadd scinote
|
|
|
|
RUN useradd -ms /bin/bash -g scinote scinote
|
|
|
|
USER scinote
|
|
|
|
|
|
|
|
CMD rails s -b 0.0.0.0
|