-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 823 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ARG python_version=3.13-slim
ARG uv_version=0.9.10
# Create a stage specifically for the uv binary to work around the --from limitation.
FROM ghcr.io/astral-sh/uv:${uv_version} AS uv
FROM python:${python_version} AS builder
COPY --from=uv /uv /bin/
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy
WORKDIR /build
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-dev
# -------------------------------------------------------------------------------
FROM python:${python_version}
ARG git_sha="development"
ENV GIT_SHA=$git_sha
COPY --from=builder /build /build
ENV PATH="/build/.venv/bin:$PATH"
WORKDIR /app
COPY . .
ENTRYPOINT ["python"]
CMD ["-m", "capy_discord"]