From 05c6dcff6aeb3908982bb26779bb5059d9de2399 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sat, 5 Sep 2026 21:50:24 +0000 Subject: [PATCH] Actualiser cookcli/Dockerfile --- cookcli/Dockerfile | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/cookcli/Dockerfile b/cookcli/Dockerfile index cfec8c1..c696fbe 100644 --- a/cookcli/Dockerfile +++ b/cookcli/Dockerfile @@ -9,16 +9,30 @@ RUN apk add --no-cache \ git \ openssh-client \ nginx \ - && curl -L https://github.com/cooklang/CookCLI/releases/latest/download/cook-x86_64-unknown-freebsd.tar.gz | tar xz \ - && mv cook /usr/local/bin/ \ - && chmod a+x /usr/local/bin/cook + file -# Copie du système de fichiers +# Détection de l'architecture et téléchargement de la bonne version +RUN ARCH=$(uname -m) && \ + case "${ARCH}" in \ + x86_64) COOK_ARCH="x86_64-unknown-linux-musl" ;; \ + aarch64) COOK_ARCH="aarch64-unknown-linux-musl" ;; \ + armv7l) COOK_ARCH="arm-unknown-linux-musleabihf" ;; \ + armv6l) COOK_ARCH="arm-unknown-linux-musleabihf" ;; \ + *) COOK_ARCH="i686-unknown-linux-musl" ;; \ + esac && \ + echo "Téléchargement de CookCLI pour l'architecture: ${COOK_ARCH}" && \ + curl -L "https://github.com/cooklang/CookCLI/releases/latest/download/cook-${COOK_ARCH}.tar.gz" | tar xz && \ + mv cook /usr/local/bin/ && \ + chmod a+x /usr/local/bin/cook && \ + # Vérification du binaire + file /usr/local/bin/cook && \ + /usr/local/bin/cook --version + +# Copie des fichiers COPY rootfs / -# Rendre tous les scripts run exécutables +# Rendre tous les scripts exécutables RUN find /etc -name "run" -type f -exec chmod +x {} \; \ && find /usr -name "*.sh" -type f -exec chmod +x {} \; -# Point d'entrée S6-overlay ENTRYPOINT ["/init"] \ No newline at end of file