-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
37 lines (28 loc) · 1.24 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
# To run: docker run -v /path/to/wsgi.py:/var/www/sheepdog/wsgi.py --name=sheepdog -p 81:80 sheepdog
# To check running container: docker exec -it sheepdog /bin/bash
FROM quay.io/cdis/python:python3.6-buster-pybase3-3.0.2
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential libffi-dev musl-dev gcc libxml2-dev libxslt-dev \
curl bash git vim
COPY . /sheepdog
COPY ./deployment/uwsgi/uwsgi.ini /etc/uwsgi/uwsgi.ini
WORKDIR /sheepdog
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
# TODO: consider pinned version of pip.
# hadolint ignore=DL3013
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install --upgrade setuptools \
&& python3 /sheepdog/setup.py install \
&& python3 -m pip --version \
&& python3 -m pip install -r requirements.txt
RUN mkdir -p /var/www/sheepdog \
&& mkdir /run/ngnix/ \
&& chown nginx /var/www/sheepdog
EXPOSE 80
# TODO: Check using legacy notation instead of backticked
# hadolint ignore=SC2006
RUN COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" >sheepdog/version_data.py \
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >>sheepdog/version_data.py \
&& python3 setup.py install
WORKDIR /var/www/sheepdog
CMD /dockerrun.sh