ARG BUILD_FROM
FROM $BUILD_FROM

# Install chrony, jq for config parsing, and python for status dashboard
RUN apk add --no-cache \
    chrony \
    jq \
    python3 \
    py3-flask

# Copy root filesystem
COPY rootfs /

# Make scripts executable
RUN chmod a+x /etc/s6-overlay/s6-rc.d/chrony/run \
    && chmod a+x /etc/s6-overlay/s6-rc.d/webui/run

WORKDIR /
