This commit is contained in:
2022-06-18 23:52:46 +02:00
parent ff7d475465
commit 6c26d878ad
5 changed files with 18 additions and 7 deletions

View File

@@ -12,6 +12,8 @@ ARG BUILD_VERSION
ARG TELEGRAF_VERSION ARG TELEGRAF_VERSION
ARG BASHIO_VERSION ARG BASHIO_VERSION
ARG TEMPIO_VERSION ARG TEMPIO_VERSION
ARG HAPROXY_VERSION
ARG HAPROXY_SHA256
# Environment variables # Environment variables
ENV \ ENV \
@@ -52,7 +54,7 @@ RUN \
jq=1.6-r1 \ jq=1.6-r1 \
tzdata=2022a-r0 && \ tzdata=2022a-r0 && \
curl -J -L -o /tmp/bashio.tar.gz \ curl -J -L -o /tmp/bashio.tar.gz \
"https://github.com/hassio-addons/bashio/archive/v0.14.3.tar.gz" && \ "https://github.com/hassio-addons/bashio/archive/${BASHIO_VERSION}.tar.gz" && \
mkdir /tmp/bashio && \ mkdir /tmp/bashio && \
tar zxvf \ tar zxvf \
/tmp/bashio.tar.gz \ /tmp/bashio.tar.gz \
@@ -60,7 +62,7 @@ RUN \
mv /tmp/bashio/lib /usr/lib/bashio && \ mv /tmp/bashio/lib /usr/lib/bashio && \
ln -s /usr/lib/bashio/bashio /usr/bin/bashio && \ ln -s /usr/lib/bashio/bashio /usr/bin/bashio && \
curl -L -s -o /usr/bin/tempio \ curl -L -s -o /usr/bin/tempio \
"https://github.com/home-assistant/tempio/releases/download/2021.09.0/tempio_${BUILD_ARCH}" && \ "https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" && \
chmod a+x /usr/bin/tempio && \ chmod a+x /usr/bin/tempio && \
apk del --no-cache --purge .build-dependencies && \ apk del --no-cache --purge .build-dependencies && \
rm -f -r \ rm -f -r \
@@ -80,9 +82,9 @@ RUN set -eux; \
mkdir /var/lib/haproxy; \ mkdir /var/lib/haproxy; \
chown haproxy:haproxy /var/lib/haproxy chown haproxy:haproxy /var/lib/haproxy
ENV HAPROXY_VERSION 2.6.0 ENV HAPROXY_VERSION ${HAPROXY_VERSION}
ENV HAPROXY_URL https://www.haproxy.org/download/2.6/src/haproxy-2.6.0.tar.gz ENV HAPROXY_URL https://www.haproxy.org/download/2.6/src/haproxy-${HAPROXY_VERSION}.tar.gz
ENV HAPROXY_SHA256 90f8e608aacd513b0f542e0438fa12e7fb4622cf58bd4375f3fe0350146eaa59 ENV HAPROXY_SHA256 ${HAPROXY_SHA256}
RUN set -eux; \ RUN set -eux; \
\ \

View File

@@ -4,3 +4,8 @@ build_from:
armhf: library/alpine:3.16 armhf: library/alpine:3.16
armv7: library/alpine:3.16 armv7: library/alpine:3.16
i386: library/alpine:3.16 i386: library/alpine:3.16
args:
BASHIO_VERSION: v0.14.3
TEMPIO_VERSION: 2021.09.0
HAPROXY_VERSION: 2.6.0
HAPROXY_SHA256: 90f8e608aacd513b0f542e0438fa12e7fb4622cf58bd4375f3fe0350146eaa59

View File

@@ -32,6 +32,7 @@ docker_api: true
host_pid: true host_pid: true
full_access: true full_access: true
options: options:
socket_path: "/var/run/docker.sock"
events: true events: true
ping: true ping: true
version: true version: true
@@ -58,6 +59,7 @@ options:
secrets: false secrets: false
post: false post: false
schema: schema:
socket_path: str
events: bool events: bool
ping: bool ping: bool
version: bool version: bool

View File

@@ -68,4 +68,3 @@ frontend dockerfrontend
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/volumes } { env(ENABLE_VOLUMES) -m bool } http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/volumes } { env(ENABLE_VOLUMES) -m bool }
http-request deny http-request deny
default_backend dockerbackend default_backend dockerbackend

View File

@@ -1,11 +1,14 @@
#!/usr/bin/env bashio #!/usr/bin/env bashio
set -x
declare hostname declare hostname
bashio::require.unprotected bashio::require.unprotected
SETTINGS_CONF=/variables.sh SETTINGS_CONF=/variables.sh
touch ${SETTINGS_CONF} touch ${SETTINGS_CONF}
SOCKET_PATH=$(bashio::config 'socket_path')
bashio::log.info "Setting socket path: ${SOCKET_PATH}"
echo "export SOCKET_PATH=${SOCKET_PATH}" >> ${SETTINGS_CONF}
if bashio::var.true 'events'; then if bashio::var.true 'events'; then
bashio::log.info "Enabling events" bashio::log.info "Enabling events"
echo "export ENABLE_EVENTS=1" >> ${SETTINGS_CONF} echo "export ENABLE_EVENTS=1" >> ${SETTINGS_CONF}