-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.component-health-checker
More file actions
44 lines (34 loc) · 1.32 KB
/
Dockerfile.component-health-checker
File metadata and controls
44 lines (34 loc) · 1.32 KB
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
35
36
37
38
39
40
41
42
43
44
FROM python:3.10-slim
LABEL maintainer="Evil2Root AI Team"
LABEL description="Vérificateur de santé des composants Kubernetes pour Evil2Root Trading"
# Installation des dépendances système
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
apt-transport-https \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Installation de kubectl avec la méthode officielle actuelle
RUN curl -LO "https://dl.k8s.io/release/stable.txt" && \
KUBECTL_VERSION=$(cat stable.txt) && \
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/ && \
rm stable.txt
# Création des répertoires
RUN mkdir -p /app /var/log/health-checks /etc/health-checker/config
# Installation des dépendances Python
COPY requirements-health-checker.txt /app/
RUN pip install --no-cache-dir -r /app/requirements-health-checker.txt
# Copie du script
COPY scripts/k8s-component-health-checker.py /app/
# Permissions d'exécution
RUN chmod +x /app/k8s-component-health-checker.py
# Configuration de l'environnement
ENV PYTHONUNBUFFERED=1
ENV LOG_LEVEL=INFO
ENV KUBERNETES_NAMESPACE=evil2root-trading
# Répertoire de travail
WORKDIR /app
# Commande par défaut
ENTRYPOINT ["python", "/app/k8s-component-health-checker.py"]