# Utilise l'image de base Home Assistant
ARG BUILD_FROM
FROM $BUILD_FROM

# Installation des dépendances
RUN apk add --no-cache \
    curl \
    bash \
    git \
    openssh-client \
    && curl -L https://github.com/cooklang/CookCLI/releases/latest/download/cook-linux-amd64.tar.gz | tar xz \
    && mv cook /usr/local/bin/ \
    && chmod a+x /usr/local/bin/cook

# Copie du système de fichiers
COPY rootfs /

# Point d'entrée S6-overlay
ENTRYPOINT ["/init"]