-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 922 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 922 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
FROM ghcr.io/astral-sh/uv:python3.13-trixie-slim AS builder
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git=1:2.* --no-install-recommends
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
WORKDIR /app
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-install-project --no-group dev
COPY LICENSE /app/
COPY config.py main.py messages.json /app/
COPY exceptions/ /app/exceptions/
COPY utils/ /app/utils/
COPY db/ /app/db/
COPY cogs/ /app/cogs/
FROM python:3.13-slim-trixie
LABEL org.opencontainers.image.source=https://github.com/CSSUoB/TeX-Bot-Py-V2
LABEL org.opencontainers.image.licenses=Apache-2.0
COPY --from=builder --chown=app:app /app /app
ENV LANG=C.UTF-8 PATH="/app/.venv/bin:$PATH"
WORKDIR /app
ENTRYPOINT ["python", "-m", "main"]