FROM alpine@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099

RUN apk add --no-cache python3 py3-pip

RUN \
	--mount=type=cache,target=/root/.cache/pip \
	pip install \
		--break-system-packages \
		uv

WORKDIR /app

COPY requirements.txt requirements.txt

RUN \
	--mount=type=cache,target=/root/.cache/pip \
	--mount=type=cache,target=/root/.cache/uv \
	--mount=type=bind,source=./deps/whl,target=/app/deps/whl \
	uv pip install \
	-f deps/whl \
	-r requirements.txt \
	--break-system-packages --system

COPY ./rest.py ./rest.py

# CMD ["python3", "rest.py"]
