Files
cantabile-ha-addons/cantabile_eebus/Dockerfile
T

24 lines
1.2 KiB
Docker

# Copyright © 2026 Setti Solutions S.R.L, www.setti.md. All rights reserved.
# The EEBUS bridge add-on's image: the Hub's bridge (one Go binary) and the
# device profiles; -ha reads the add-on's options and the Supervisor's
# broker. Built from the repository's root:
# docker build -f cantabile_eebus/Dockerfile --build-arg VERSION=<v> \
# -t <registry>/cantabile-ha-eebus-amd64:<v> .
FROM docker.io/library/golang:1.26.9-bookworm AS build
WORKDIR /src
COPY src/eebus-bridge/go.mod src/eebus-bridge/go.sum ./
RUN go mod download
COPY src/eebus-bridge/*.go ./
ARG VERSION=0.0.0-dev
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /cantabile-eebus .
FROM docker.io/library/alpine:3.22
ARG VERSION ARCH=amd64 REVISION
LABEL io.hass.version="${VERSION}" io.hass.type="addon" io.hass.arch="${ARCH}" \
org.opencontainers.image.revision="${REVISION}"
COPY --from=build /cantabile-eebus /usr/bin/cantabile-eebus
COPY src/eebus-bridge/THIRD-PARTY-NOTICES.md /usr/share/doc/cantabile-eebus/
COPY src/profiles/*.json /app/profiles/
ENV DATA_DIR=/data PROFILES_DIR=/app/profiles PAGE_PORT=8099
ENTRYPOINT ["/usr/bin/cantabile-eebus", "-ha"]