blob: 35802dff1c90a7c541f9af326e08f7e273ac3660 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
FROM python:3.11-alpine as builder
RUN python -m pip install --no-cache-dir --upgrade pip
RUN pip install --upgrade setuptools
FROM python:3.11-alpine
WORKDIR /due
COPY requirements.lock /due
COPY pyproject.toml /due
COPY src/ /due/src
RUN sed '/-e/d' requirements.lock > requirements.txt
RUN sed -i 's/requires = \["hatchling"\]/requires = \["setuptools", "setuptools-scm"\]/; s/build-backend = "hatchling.build"/build-backend = "setuptools.build_meta"/' pyproject.toml
RUN sed -i '/\[tool\.hatch\.metadata\]/d; /allow-direct-references = true/d' pyproject.toml
RUN pip install -r requirements.txt
RUN pip install .
EXPOSE 5000
CMD ["python", "-m", "flask", "--app", "due", "run", "--host=0.0.0.0"]
|