-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
24 lines (19 loc) · 813 Bytes
/
Dockerfile.dev
File metadata and controls
24 lines (19 loc) · 813 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
FROM python:3.8-buster AS devenv
WORKDIR ./
RUN apt-get -y install wget ca-certificates gcc && pip3 install --upgrade pip
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' && apt-get update && apt-get -y install postgresql-client
COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 --no-cache-dir install wheel
RUN pip3 --no-cache-dir install -r /tmp/requirements.txt
RUN useradd --create-home omenuser
WORKDIR /home/omenuser
USER omenuser
COPY ./app ./app/
COPY ./config.json ./app/
WORKDIR /home/omenuser/app
ENV FLASK_APP web.py
ENV FLASK_DEBUG 1
ENV FLASK_RUN_HOST 0.0.0.0
ENV FLASK_SKIP_DOTENV 1
EXPOSE 5000
CMD ["flask", "run", "-p", "5000"]