-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (37 loc) · 1.43 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
37
38
39
40
41
42
43
44
45
# Heroku-16 is based on Ubuntu 16.4
# Debian Stretch is the upstream of Ubuntu 16.4
FROM ruby:2.6.3-stretch
MAINTAINER Darin London <[email protected]>
RUN ["mkdir", "-p", "/root/installs"]
WORKDIR /root/installs
# Node binary
ENV LATEST_NODE node-v0.12.7-linux-x64
ENV LATEST_NODE_URL https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz
ADD docker/includes/install_node.sh /root/installs/install_node.sh
RUN ["chmod", "777", "/root/installs/install_node.sh"]
RUN ["/root/installs/install_node.sh"]
RUN ["npm","install","-g","bower"]
# ssl certs
ADD docker/includes/install_ssl_cert.sh /root/installs/install_ssl_cert.sh
ADD docker/includes/cert_config /root/installs/cert_config
RUN ["chmod", "u+x", "/root/installs/install_ssl_cert.sh"]
RUN ["/root/installs/install_ssl_cert.sh"]
#Postgresql client
RUN /usr/bin/apt-get update && /usr/bin/apt-get install -y postgresql libpq-dev
#GraphViz for Rails ERD
RUN /usr/bin/apt-get install -y graphviz
#RubyGems system update
RUN ["gem", "update", "--system", "2.7.6"]
#miscellaneous
RUN ["mkdir","-p","/var/www"]
WORKDIR /var/www
RUN git clone https://github.com/Duke-Translational-Bioinformatics/duke-data-service.git app
WORKDIR /var/www/app
RUN git checkout develop
ADD Gemfile /var/www/app/Gemfile
ADD Gemfile.lock /var/www/app/Gemfile.lock
RUN ["bundle", "config", "build.nokogiri", "--use-system-libraries"]
RUN ["bundle", "install", "--jobs=4"]
# run the app by defualt
EXPOSE 3000
CMD ["puma"]