2018-09-09 11:59:10 +02:00
|
|
|
FROM python:3.7
|
2018-01-10 22:36:31 +01:00
|
|
|
|
2018-01-14 17:37:14 +01:00
|
|
|
MAINTAINER SamR1@users.noreply.github.com
|
2018-01-14 17:19:02 +01:00
|
|
|
|
2018-01-10 22:36:31 +01:00
|
|
|
# set working directory
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# add requirements
|
2019-08-28 12:05:23 +02:00
|
|
|
COPY ./pyproject.toml /usr/src/app/pyproject.toml
|
|
|
|
COPY ./poetry.lock /usr/src/app/poetry.lock
|
2018-01-10 22:36:31 +01:00
|
|
|
|
|
|
|
# install requirements
|
2018-09-09 13:37:17 +02:00
|
|
|
RUN pip install --upgrade pip
|
2019-08-28 12:05:23 +02:00
|
|
|
RUN pip install poetry
|
2019-12-28 21:10:51 +01:00
|
|
|
RUN poetry config virtualenvs.create false
|
2019-08-28 13:35:15 +02:00
|
|
|
RUN poetry install --no-interaction --quiet
|
2018-01-10 22:36:31 +01:00
|
|
|
|
2019-08-28 12:05:23 +02:00
|
|
|
# add app --no-interaction
|
2018-01-14 17:19:02 +01:00
|
|
|
COPY . /usr/src/app
|
2018-01-10 22:36:31 +01:00
|
|
|
|
|
|
|
# run server
|
|
|
|
CMD flask run --with-threads -h 0.0.0.0
|