forked from scitran/core
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
45 lines (38 loc) · 1.12 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
FROM ubuntu:14.04
# Install pre-requisites
RUN apt-get update \
&& apt-get install -y \
build-essential \
python \
python-dev \
python-pip \
libffi-dev \
libssl-dev \
libpcre3 \
libpcre3-dev \
git \
uwsgi \
uwsgi-plugin-python \
&& rm -rf /var/lib/apt/lists/* \
&& pip install -U pip
# Setup environment
WORKDIR /srv/bids-core
# Copy repo context
ADD . /srv/bids-core
# Declaring a volume makes the intent to map externally explicit. This enables
# the contents to survive/persist across container versions, and easy access
# to the contents outside the container.
#
# Declaring the VOLUME in the Dockerfile guarantees the contents are empty
# for any new container that doesn't specify a volume map via 'docker run -v '
# or similar option.
#
VOLUME /srv/bids-core/keys
VOLUME /srv/bids-core/data
VOLUME /srv/bids-core/logs
# Install pip modules
RUN pip install --upgrade pip wheel setuptools \
&& pip install --ignore-installed -r /srv/bids-core/requirements.txt \
&& pip install -r requirements_dev.txt
EXPOSE 8112
CMD ["uwsgi", "/srv/bids-core/uwsgi-config.ini", "--socket", "[::]:8112", "--plugins", "python"]