diff --git a/loki/Dockerfile b/loki/Dockerfile index 96d8195..74ecffb 100644 --- a/loki/Dockerfile +++ b/loki/Dockerfile @@ -1,5 +1,5 @@ # https://github.com/hassio-addons/addon-base/releases -ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64 +ARG BUILD_FROM # hadolint ignore=DL3006 FROM ${BUILD_FROM} @@ -31,8 +31,8 @@ RUN set -eux; \ apk del .build-deps; \ \ apk add --no-cache \ - ca-certificates=20220614-r0 \ - nginx=1.22.0-r1 \ + ca-certificates \ + nginx \ ; \ update-ca-certificates; \ nginx -v; \ @@ -50,10 +50,10 @@ RUN set -eux; \ \ echo "Add user for Loki"; \ mkdir -p /data/loki; \ - addgroup -S abc; \ - adduser -u 12345 -h /data/loki -D -S abc -G abc; \ + addgroup -S loki; \ + adduser -u loki -h /data/loki -D -S loki -G loki; \ \ - chown -R abc:abc \ + chown -R loki:loki \ /usr/lib/nginx \ /usr/share/nginx \ /var/lib/nginx \ @@ -66,7 +66,7 @@ RUN set -eux; \ # See https://github.com/grafana/loki/issues/1928 RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf -COPY --chown=abc:abc rootfs / +COPY --chown=loki:loki rootfs / WORKDIR /data/loki # Build arguments diff --git a/loki/rootfs/etc/cont-init.d/nginx.sh b/loki/rootfs/etc/cont-init.d/nginx.sh index 7997b40..afb2c00 100644 --- a/loki/rootfs/etc/cont-init.d/nginx.sh +++ b/loki/rootfs/etc/cont-init.d/nginx.sh @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bashio -# shellcheck shell=bash +# shellcheck shell=bash1234adc # ============================================================================== # Home Assistant Add-on: Loki # This file configures nginx diff --git a/loki/rootfs/etc/services.d/loki/run b/loki/rootfs/etc/services.d/loki/run index 7949afe..411937f 100644 --- a/loki/rootfs/etc/services.d/loki/run +++ b/loki/rootfs/etc/services.d/loki/run @@ -47,5 +47,5 @@ if [ "${log_level}" == "debug" ]; then fi bashio::log.info "Handing over control to Loki..." -exec s6-setuidgid abc \ +exec s6-setuidgid loki \ /usr/bin/loki "${loki_args[@]}"