-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
36 lines (29 loc) · 1.04 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
FROM ubuntu:16.04
# python version
ARG PYTHON_VERSION="2.7"
# environment variables
ENV PYTHON_VERSION=${PYTHON_VERSION} \
RABBITMQ_URI="amqp://guest:guest@rabbitmq:5672/%2F" \
RABBITMQ_QUEUE="" \
CLOWDER_URL="" \
EMAIL_SERVER="" \
EMAIL_SENDER="extractor" \
MAIN_SCRIPT=""
# install python
RUN apt-get -q -q update \
&& apt-get install -y --no-install-recommends python${PYTHON_VERSION} curl \
&& if [ ! -e /usr/bin/python ]; then ln -s /usr/bin/python${PYTHON_VERSION} /usr/bin/python; fi \
&& curl -k https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
&& python /tmp/get-pip.py \
&& pip install --upgrade setuptools \
&& rm -rf /var/lib/apt/lists/* /tmp/get-pip.py
# instal pyclowder
COPY pyclowder /tmp/pyclowder/pyclowder
COPY setup.py description.rst /tmp/pyclowder/
RUN pip install --upgrade /tmp/pyclowder \
&& rm -rf /tmp/pyclowder
# folder for pyclowder code
WORKDIR /home/clowder
COPY notifications.json /home/clowder/
# command to run when starting container
CMD python "./${MAIN_SCRIPT}"