2021-02-08 15:04:13 +11:00
|
|
|
FROM python:3.7.3-alpine3.9 as dev
|
2021-02-08 11:57:52 +11:00
|
|
|
|
2021-02-08 15:04:13 +11:00
|
|
|
RUN mkdir /work/
|
|
|
|
WORKDIR /work/
|
2021-02-08 13:43:09 +11:00
|
|
|
|
2021-02-08 15:04:13 +11:00
|
|
|
COPY ./src/requirements.txt /work/requirements.txt
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
COPY ./src/ /work/
|
2021-02-08 13:43:09 +11:00
|
|
|
|
|
|
|
###########START NEW IMAGE###################
|
|
|
|
|
2021-02-08 15:04:13 +11:00
|
|
|
FROM python:3.7.3-alpine3.9 as prod
|
|
|
|
|
|
|
|
RUN mkdir /app/
|
|
|
|
WORKDIR /app/
|
|
|
|
|
|
|
|
COPY --from=dev /work/ /app/
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
ENV FLASK_APP=server.py
|
|
|
|
CMD flask run -h 0.0.0 -p 5000
|