ARG BUILD_FROM FROM ${BUILD_FROM} # Build arguments ARG BUILD_ARCH ARG BUILD_DATE ARG BUILD_DESCRIPTION ARG BUILD_NAME ARG BUILD_REF ARG BUILD_REPOSITORY ARG BUILD_VERSION ARG TELEGRAF_VERSION ARG BASHIO_VERSION ARG TEMPIO_VERSION # Environment variables ENV \ CARGO_NET_GIT_FETCH_WITH_CLI=true \ HOME="/root" \ LANG="C.UTF-8" \ PIP_DISABLE_PIP_VERSION_CHECK=1 \ PIP_FIND_LINKS=https://wheels.home-assistant.io/musllinux/ \ PIP_NO_CACHE_DIR=1 \ PIP_PREFER_BINARY=1 \ PS1="$(whoami)@$(hostname):$(pwd)$ " \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ YARN_HTTP_TIMEOUT=1000000 \ TERM="xterm-256color" # Copy root filesystem COPY rootfs / # Set shell SHELL ["/bin/ash", "-o", "pipefail", "-c"] USER root RUN \ set -o pipefail && \ apk add --no-cache --virtual .build-dependencies \ tar=1.34-r0 \ xz=5.2.5-r1 && \ apk add --no-cache \ libcrypto1.1=1.1.1o-r0 \ libssl1.1=1.1.1o-r0 \ musl-utils=1.2.3-r0 \ musl=1.2.3-r0 && \ apk add --no-cache \ bash=5.1.16-r2 \ curl=7.83.1-r1 \ jq=1.6-r1 \ tzdata=2022a-r0 && \ curl -J -L -o /tmp/bashio.tar.gz \ "https://github.com/hassio-addons/bashio/archive/v0.14.3.tar.gz" && \ mkdir /tmp/bashio && \ tar zxvf \ /tmp/bashio.tar.gz \ --strip 1 -C /tmp/bashio && \ mv /tmp/bashio/lib /usr/lib/bashio && \ ln -s /usr/lib/bashio/bashio /usr/bin/bashio && \ curl -L -s -o /usr/bin/tempio \ "https://github.com/home-assistant/tempio/releases/download/2021.09.0/tempio_${BUILD_ARCH}" && \ chmod a+x /usr/bin/tempio && \ apk del --no-cache --purge .build-dependencies && \ rm -f -r \ /tmp/* USER haproxy ENV ALLOW_RESTARTS=0 \ AUTH=0 \ BUILD=0 \ COMMIT=0 \ CONFIGS=0 \ CONTAINERS=0 \ DISTRIBUTION=0 \ EVENTS=1 \ EXEC=0 \ GRPC=0 \ IMAGES=0 \ INFO=0 \ LOG_LEVEL=info \ NETWORKS=0 \ NODES=0 \ PING=1 \ PLUGINS=0 \ POST=0 \ SECRETS=0 \ SERVICES=0 \ SESSION=0 \ SOCKET_PATH=/var/run/docker.sock \ SWARM=0 \ SYSTEM=0 \ TASKS=0 \ VERSION=1 \ VOLUMES=0 COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg EXPOSE 2375 COPY entrypoint.sh /entrypoint.sh COPY settings.sh /settings.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["telegraf"] # Labels LABEL \ io.hass.name="${BUILD_NAME}" \ io.hass.description="${BUILD_DESCRIPTION}" \ io.hass.arch="${BUILD_ARCH}" \ io.hass.type="addon" \ io.hass.version=${BUILD_VERSION} \ maintainer="fbonelle" \ org.opencontainers.image.title="${BUILD_NAME}" \ org.opencontainers.image.description="${BUILD_DESCRIPTION}" \ org.opencontainers.image.vendor="fbonelle's addons" \ org.opencontainers.image.authors="fbonelle" \ org.opencontainers.image.licenses="MIT" \ org.opencontainers.image.created=${BUILD_DATE} \ org.opencontainers.image.revision=${BUILD_REF} \ org.opencontainers.image.version=${BUILD_VERSION}