-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
25 lines (19 loc) · 841 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
FROM python:3
COPY setup.py /tmp/cacus/setup.py
COPY cacus /tmp/cacus/cacus
COPY vendor /tmp/cacus/vendor
COPY contrib /tmp/cacus/contrib
COPY plugins /tmp/cacus/plugins
#ENV PYTHONPATH="/usr/lib/python2.7/dist-packages"
# python-apt in PyPi seems to be abandoned
#RUN apt-get update && apt-get -y install python-apt gnupg
#RUN pip --no-cache-dir list
RUN cd /tmp/cacus/vendor/python-jose && python setup.py install
RUN cd /tmp/cacus && python setup.py install
RUN mkdir -p /opt/cacus/plugins
ARG STORAGE=file
RUN if [ $STORAGE = 'file' ] ; then cp -a /tmp/cacus/plugins/FileStorage /opt/cacus/plugins/; fi
RUN if [ $STORAGE = 'azure' ] ; then cp -a /tmp/cacus/plugins/AzureStorage /opt/cacus/plugins; pip install chardet azure-common azure-storage; fi
RUN rm -rf /tmp/cacus
EXPOSE 1488
ENTRYPOINT ["cacus", "-c", "/cacus/config.yml"]