forked from data-for-change/anyway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (30 loc) · 915 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
35
36
37
38
39
40
41
42
FROM ubuntu:19.10
# Install system tools
# Install system tools
RUN apt-get clean && \
apt-get -y update && \
apt-get install -y \
python3.7-dev \
build-essential \
postgresql-client \
libpq-dev \
default-jdk \
virtualenv && \
apt-get clean
WORKDIR /anyway
COPY requirements.txt /anyway
COPY alembic.ini /anyway
COPY alembic /anyway/alembic
# First copy only the requirement.txt, so changes in other files won't trigger
# a full pip reinstall
RUN virtualenv /venv3 -p python3
ENV VIRTUAL_ENV=/venv3
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN . /venv3/bin/activate && \
pip install -U setuptools wheel && \
pip install --upgrade pip && \
pip install -r requirements.txt
COPY . /anyway
EXPOSE 5000
ENTRYPOINT ["/anyway/docker-entrypoint.sh"]
CMD FLASK_APP=anyway flask run --host 0.0.0.0