-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 770 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 770 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
# Étape de construction
FROM azul/zulu-openjdk:24-latest AS builder
# Installation de UV
COPY --from=ghcr.io/astral-sh/uv /uv /bin/
# Définition du répertoire de travail
WORKDIR /app
# Copie des fichiers de configuration
COPY pyproject.toml .
COPY README.md .
COPY src/ .
# Installation des dépendances avec UV
RUN uv sync --no-editable --link-mode=copy --no-dev
# Étape finale
FROM azul/zulu-openjdk
WORKDIR /app
# Copie de UV et des dépendances depuis l'étape builder
COPY --from=ghcr.io/astral-sh/uv /uv /bin/
COPY --from=builder /app/.venv /app/.venv
# Ajout du chemin des dépendances installées par UV
ENV PATH="/app/.venv/bin:$PATH"
# Copie du code source
COPY src/ .
# Commande pour exécuter le bot avec UV
CMD ["bash"]