forked from antarctica/flask-entra-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (23 loc) · 819 Bytes
/
Dockerfile
File metadata and controls
38 lines (23 loc) · 819 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
29
30
31
32
33
34
35
36
37
38
FROM python:3.8-alpine as base
LABEL maintainer = "Felix Fennell <felnne@bas.ac.uk>"
ENV APPPATH=/usr/src/app/
ENV PYTHONPATH=$APPPATH
RUN mkdir $APPPATH
WORKDIR $APPPATH
RUN apk add --no-cache libffi-dev libressl-dev python3-dev git
FROM base as build
ENV APPVENV=/usr/local/virtualenvs/flask_azure_oauth
RUN apk add --no-cache build-base
RUN python3 -m venv $APPVENV
ENV PATH="$APPVENV/bin:$PATH"
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir poetry==1.0.0
COPY pyproject.toml poetry.toml poetry.lock $APPPATH
RUN poetry install --no-root --no-interaction --no-ansi
FROM base as run
ENV APPVENV=/usr/local/virtualenvs/flask_azure_oauth
ENV PATH="$APPVENV/bin:$PATH"
ENV FLASK_APP=examples
ENV FLASK_ENV=development
COPY --from=build $APPVENV/ $APPVENV/
ENTRYPOINT []