aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: b4897140acbca94c3ff48391f25d446652e0a6ec (plain)
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
FROM python:3.6
MAINTAINER gs244f@att.com

ENV INSROOT /opt/app
ENV APPUSER misshtbt
ENV APPDIR ${INSROOT}/${APPUSER}

RUN useradd -d ${APPDIR} ${APPUSER}

WORKDIR ${APPDIR}

#ADD . /tmp
#RUN mkdir /tmp/config

EXPOSE 10001

COPY ./miss_htbt_service/ ./bin/
COPY ./etc/ ./etc/
COPY requirements.txt ./
COPY setup.py ./

#need pip > 8 to have internal pypi repo in requirements.txt
RUN pip install --upgrade pip 
#do the install
#WORKDIR /tmp
RUN pip install pyyaml --upgrade
RUN pip install -r requirements.txt
RUN pip install -e .

RUN mkdir -p ${APPDIR}/data \
 && mkdir -p ${APPDIR}/logs \
 && mkdir -p ${APPDIR}/tmp \
 && chown -R ${APPUSER}:${APPUSER} ${APPDIR} \
 && chmod a+w ${APPDIR}/data \
 && chmod a+w ${APPDIR}/logs \
 && chmod a+w ${APPDIR}/tmp \
 && chmod 500 ${APPDIR}/etc \
 && chmod 500 ${APPDIR}/bin/*.py \
 && chmod 500 ${APPDIR}/bin/*.sh \
 && chmod 500 ${APPDIR}/bin/*/*.py

USER ${APPUSER}
VOLUME ${APPDIR}/logs

CMD ["./bin/misshtbt.sh"]

#ENV PYTHONPATH="/usr/local/lib/python3.6:/usr/local/lib/python3.6/site-packages:${PATH}"
#ENV PYTHONPATH="/usr/local/lib/python3.6/site-packages:/usr/local/lib/python3.6"
#ENV PYTHONPATH=/usr/local/lib/python3.6/site-packages:.
#ENTRYPOINT ["/bin/python", "./bin/run.py"]
#ENTRYPOINT ["/usr/bin/python","./bin/run.py" ]
#ENTRYPOINT ["/usr/local/bin/python","./bin/misshtbtd.py" ]
#ENTRYPOINT ["/bin/ls","-lR", "."]