-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (26 loc) · 817 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
FROM debian:stable
# Install python and git
RUN apt-get update -y \
&& apt-get install -y python3 \
&& apt-get install -y python3-venv \
&& apt-get install -y python3-pip \
&& apt-get install -y git
# Set the time zone
ENV TZ="America/Toronto"
# Custom cache invalidation
ARG CACHEBUST=1
# Clone netdd repository
RUN git clone https://.../netdd_demo.git
# Replace 'activate' cmd by setting the environment variables
RUN mkdir /netdd_demo/venv
ENV VIRTUAL_ENV=/netdd_demo/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Persistent volume mount point
VOLUME /netdd_demo/files
# Install dependencies:
RUN python3 -m pip install --upgrade pip \
&& pip3 install -r /netdd_demo/requirements.txt
# Run the application:
WORKDIR /netdd_demo
ENTRYPOINT ["python3", "netdd_main.py"]