Update
This commit is contained in:
parent
d4eaef73fc
commit
bc92109ae0
@ -1,5 +1,5 @@
|
|||||||
# https://github.com/hassio-addons/addon-base/releases
|
# https://github.com/hassio-addons/addon-base/releases
|
||||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64
|
ARG BUILD_FROM
|
||||||
|
|
||||||
# hadolint ignore=DL3006
|
# hadolint ignore=DL3006
|
||||||
FROM ${BUILD_FROM}
|
FROM ${BUILD_FROM}
|
||||||
@ -31,8 +31,8 @@ RUN set -eux; \
|
|||||||
apk del .build-deps; \
|
apk del .build-deps; \
|
||||||
\
|
\
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
ca-certificates=20220614-r0 \
|
ca-certificates \
|
||||||
nginx=1.22.0-r1 \
|
nginx \
|
||||||
; \
|
; \
|
||||||
update-ca-certificates; \
|
update-ca-certificates; \
|
||||||
nginx -v; \
|
nginx -v; \
|
||||||
@ -50,10 +50,10 @@ RUN set -eux; \
|
|||||||
\
|
\
|
||||||
echo "Add user for Loki"; \
|
echo "Add user for Loki"; \
|
||||||
mkdir -p /data/loki; \
|
mkdir -p /data/loki; \
|
||||||
addgroup -S abc; \
|
addgroup -S loki; \
|
||||||
adduser -u 12345 -h /data/loki -D -S abc -G abc; \
|
adduser -u loki -h /data/loki -D -S loki -G loki; \
|
||||||
\
|
\
|
||||||
chown -R abc:abc \
|
chown -R loki:loki \
|
||||||
/usr/lib/nginx \
|
/usr/lib/nginx \
|
||||||
/usr/share/nginx \
|
/usr/share/nginx \
|
||||||
/var/lib/nginx \
|
/var/lib/nginx \
|
||||||
@ -66,7 +66,7 @@ RUN set -eux; \
|
|||||||
# See https://github.com/grafana/loki/issues/1928
|
# See https://github.com/grafana/loki/issues/1928
|
||||||
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
|
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
|
WORKDIR /data/loki
|
||||||
|
|
||||||
# Build arguments
|
# Build arguments
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash1234adc
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Home Assistant Add-on: Loki
|
# Home Assistant Add-on: Loki
|
||||||
# This file configures nginx
|
# This file configures nginx
|
||||||
|
@ -47,5 +47,5 @@ if [ "${log_level}" == "debug" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
bashio::log.info "Handing over control to Loki..."
|
bashio::log.info "Handing over control to Loki..."
|
||||||
exec s6-setuidgid abc \
|
exec s6-setuidgid loki \
|
||||||
/usr/bin/loki "${loki_args[@]}"
|
/usr/bin/loki "${loki_args[@]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user