-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (23 loc) · 827 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
FROM python:3.7.9-buster
LABEL maintainer="[email protected]"
# Define environment variable
# If you are behind a proxy uncomment and edit lines below
# ENV http_proxy "http://<USER>:<PASSWORD>@<IP>:<PORT>"
# ENV https_proxy "http://<USER>:<PASSWORD>@<IP>:<PORT>"
# Copy application files.
COPY . /app
# Setup working directory.
WORKDIR /app
# Update the system and install needed packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install --yes git && \
pip3 install -r ./requirements.txt
# Expose port 8080 for the Flask app to run on
EXPOSE 8080
# Delete all the apt list files since they're big and get stale quickly
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set default language to English
ENV LANG en
# Execute the application
CMD ["python3", "manage.py", "runserver"]