FROM eclipse-mosquitto:2

# Install jq (needed by run.sh for config parsing)
RUN apk add --no-cache jq

# Copy and prepare the entrypoint
COPY run.sh /run.sh
RUN chmod a+x /run.sh

# Optional but recommended labels
LABEL \
  io.hass.name="Visquitto" \
  io.hass.description="Second private Mosquitto broker for bitopa nodes" \
  io.hass.type="addon" \
  io.hass.arch="amd64"

CMD [ "/run.sh" ]