Dockerfile.template 613 Bytes
Newer Older
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
1
from python:{{PYVERSION}}
2

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
3
MAINTAINER J. Fernando Sánchez <jf.sanchez@upm.es>
4

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
5
RUN mkdir /cache/ /senpy-plugins /data/
6
7
8

VOLUME /data/

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
9
ENV PIP_CACHE_DIR=/cache/ SENPY_DATA=/data
10

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
11
ONBUILD COPY . /senpy-plugins/
12
ONBUILD RUN python -m senpy --only-install -f /senpy-plugins
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
13
14
15
16
17
18
19
ONBUILD WORKDIR /senpy-plugins/


WORKDIR /usr/src/app
COPY test-requirements.txt requirements.txt /usr/src/app/
RUN pip install --use-wheel -r test-requirements.txt -r requirements.txt
COPY . /usr/src/app/
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
20
RUN pip install --no-index --no-deps --editable .
21

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
22
ENTRYPOINT ["python", "-m", "senpy", "-f", "/senpy-plugins/", "--host", "0.0.0.0"]