parent
d3e990384d
commit
e2fd185971
47 changed files with 1043 additions and 35 deletions
33
Dockerfile
Normal file
33
Dockerfile
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
FROM ghcr.io/astral-sh/uv:0.9-python3.12-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk update \
|
||||
&& apk add gcc python3-dev musl-dev linux-headers
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
uv sync --no-install-workspace
|
||||
|
||||
ADD . /app
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --locked
|
||||
|
||||
FROM python:3.12-alpine3.22
|
||||
|
||||
RUN apk update --no-cache \
|
||||
&& apk add --no-cache git
|
||||
|
||||
COPY --from=builder --chown=app:app /app/.venv /app/.venv
|
||||
COPY --from=builder --chown=app:app /app/src /app/src
|
||||
|
||||
ENV PYTHONPATH="/app"
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENTRYPOINT ["/app/.venv/bin/python"]
|
||||
|
||||
CMD ["/app/src/karl/__init__.py"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue