forked from ga4gh/ga4gh-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (47 loc) · 1.97 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
############################################################
## Dockerfile to build the ga4gh server on mod_wsgi-express
## Configurable to use a local dataset
############################################################
FROM ubuntu
# Originally created by Steve Hershman GitHub @hershman
# previously maintained by Alastair Firth
# currently maintained by Maciek Smuga-Otto at UCSC Genomics Institute
MAINTAINER Maciek Smuga-Otto <[email protected]>
# Update the sources list
RUN apt-get update
# Install packages
RUN apt-get install -y tar git curl wget dialog net-tools build-essential \
python python-dev python-distribute python-pip zlib1g-dev \
apache2 libapache2-mod-wsgi libxslt1-dev libffi-dev libssl-dev
# Enable wsgi module
RUN a2enmod wsgi
# Create cache directories
RUN mkdir /var/cache/apache2/python-egg-cache && \
chown www-data:www-data /var/cache/apache2/python-egg-cache/
# build the GA4GH server
RUN mkdir -p /srv/ga4gh/server
WORKDIR /srv/ga4gh/server
# Configure the python requirements
# Do this as a separate step prior to the build so that changes
# to the GA4GH Server codebase do not trigger a full rebuild of the
# pip requirements.
COPY requirements.txt /srv/ga4gh/server/
RUN pip install -r requirements.txt
# Install the code
COPY . /srv/ga4gh/server/
RUN python setup.py install
# Write new apache config
COPY deploy/001-ga4gh.conf /etc/apache2/sites-available/001-ga4gh.conf
# Write application.wsgi
COPY deploy/application.wsgi /srv/ga4gh/application.wsgi
COPY deploy/config.py /srv/ga4gh/config.py
# Configure apache to serve GA4GH site
WORKDIR /etc/apache2/sites-enabled
RUN rm -f 000-default.conf && ln -s /etc/apache2/sites-available/001-ga4gh.conf 001-ga4gh.conf
# Open port 80 for HTTP
EXPOSE 80
# Prepare container for deployment
# The directory that the user will land in when executing an interactive shell
WORKDIR /srv/ga4gh/server
# Default action: Bring up a webserver instance to run as a daemon
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]