-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
44 lines (26 loc) · 1005 Bytes
/
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
FROM ubuntu:20.04
RUN apt-get update; DEBIAN_FRONTEND="noninteractive" apt-get install -y redis-server git python3-pip libgl1-mesa-glx libsm6 libxext6 libxrender-dev libglib2.0-0 pandoc
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN ln -s /usr/bin/pip3 /usr/bin/pip
WORKDIR /home/service
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY requirements-dev.txt requirements-dev.txt
RUN pip install -r requirements-dev.txt
COPY ./platipy platipy
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV PYTHONPATH "/home/service"
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV WORK C.UTF-8
ARG dicom_listen_port=7777
ENV DICOM_LISTEN_PORT ${dicom_listen_port}
ENV DICOM_LISTEN_AET PLATIPY_SERVICE
RUN printf '#!/bin/bash\npython3 -m platipy.backend.manage $@\n' > /usr/bin/manage && chmod +x /usr/bin/manage
EXPOSE 8000
EXPOSE ${dicom_listen_port}
ENV WORK /data
RUN mkdir /logs /data && chmod 0777 /logs /data
ENTRYPOINT ["/entrypoint.sh"]
CMD [ "manage" ]