-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (19 loc) · 720 Bytes
/
Dockerfile
File metadata and controls
28 lines (19 loc) · 720 Bytes
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
FROM google/python
# Ideally I could extract these to another Dockerfile with the ONBUILD
# instruction
WORKDIR /app
RUN virtualenv /env
# [Optional] If you are building from within China, I recommend uncommenting
# this line.
# ADD chinese-sources.list /etc/apt/sources.list
# Required for psycopg2
RUN DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y libpq-dev
# This will invalidate the cache everytime the requirements.txt file is
# changed, so we want don't want to impact anything with apt.
ADD requirements.txt /app/requirements.txt
RUN /env/bin/pip install -r requirements.txt
ENTRYPOINT ["/env/bin/python", "manage.py"]
CMD ["runserver", "0.0.0.0:8080"]
ADD . /app