Actualiser cookcli/Dockerfile

This commit is contained in:
TheThomaas 2026-09-05 21:50:24 +00:00
parent 88e0b317d4
commit 05c6dcff6a

View file

@ -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"]