Update Dockerfile.analyzer
This commit is contained in:
@@ -1,17 +1,12 @@
|
|||||||
|
# Fichier : Dockerfile.analyzer
|
||||||
|
|
||||||
# Étape 1: Utiliser l'image de base officielle
|
# Étape 1: Utiliser l'image de base officielle
|
||||||
FROM mcr.microsoft.com/presidio-analyzer:latest
|
FROM mcr.microsoft.com/presidio-analyzer:latest
|
||||||
|
|
||||||
# Étape 2: Installer le modèle de langue français
|
# Étape 2: Installer le modèle de langue français comme avant
|
||||||
|
# (On utilise pip directement, c'est plus fiable)
|
||||||
RUN pip install --no-cache-dir https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-3.7.0/fr_core_news_sm-3.7.0-py3-none-any.whl
|
RUN pip install --no-cache-dir https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-3.7.0/fr_core_news_sm-3.7.0-py3-none-any.whl
|
||||||
|
|
||||||
# ÉTAPE 3 (LA CLÉ) : ÉCRASER LA CONFIGURATION PAR DÉFAUT AU BON ENDROIT
|
# Étape 3: Copier notre fichier de configuration personnalisé directement dans l'image,
|
||||||
# On copie notre fichier 'default.yaml' à l'emplacement exact où les logs
|
# à l'emplacement exact que nous avons trouvé.
|
||||||
# nous ont montré que Presidio le cherche.
|
COPY ./conf/default.yaml /usr/bin/presidio-analyzer/presidio_analyzer/conf/default.yaml
|
||||||
COPY ./conf/default.yaml /app/presidio_analyzer/conf/default.yaml
|
|
||||||
|
|
||||||
# ÉTAPE 4 : Copier nos règles Python pour que le chemin d'import dans notre
|
|
||||||
# fichier de configuration soit valide.
|
|
||||||
COPY ./presidio_config/ /app/presidio_config/
|
|
||||||
|
|
||||||
# PAS DE CMD, PAS DE ENV. On laisse l'image démarrer normalement,
|
|
||||||
# mais avec nos fichiers de configuration modifiés.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user