From 57adda2c3fb62d9da063273b54579543270b02d0 Mon Sep 17 00:00:00 2001 From: leefan <980488905@qq.com> Date: Sun, 7 Apr 2024 08:50:01 +0000 Subject: [PATCH] =?UTF-8?q?OE2203SP3=E7=89=88=E6=9C=AC=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=94=AF=E6=8C=812.9.6=E5=AE=B9=E5=99=A8=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- loki/2.9.6/22.03-lts-sp3/Dockerfile | 34 ++++++++++++++++++ loki/2.9.6/22.03-lts-sp3/local-config.yaml | 42 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 loki/2.9.6/22.03-lts-sp3/Dockerfile create mode 100644 loki/2.9.6/22.03-lts-sp3/local-config.yaml diff --git a/loki/2.9.6/22.03-lts-sp3/Dockerfile b/loki/2.9.6/22.03-lts-sp3/Dockerfile new file mode 100644 index 0000000..5c40125 --- /dev/null +++ b/loki/2.9.6/22.03-lts-sp3/Dockerfile @@ -0,0 +1,34 @@ +ARG BASE=openeuler/openeuler:22.03-lts-sp3 +FROM ${BASE} + +ARG TARGETARCH +ARG BUILDARCH +ARG VERSION=2.9.6 + +RUN yum -y update && \ + yum -y install wget && \ + yum clean all + +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + BUILDARCH="x86_64"; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + BUILDARCH="aarch64"; \ + fi && \ + wget -O grafana-logcli.rpm https://github.com/grafana/loki/releases/download/v${VERSION}/logcli-${VERSION}.${BUILDARCH}.rpm && \ + wget -O grafana-loki.rpm https://github.com/grafana/loki/releases/download/v${VERSION}/loki-${VERSION}.${BUILDARCH}.rpm && \ + wget -O grafana-promtail.rpm https://github.com/grafana/loki/releases/download/v${VERSION}/promtail-${VERSION}.${BUILDARCH}.rpm && \ + yum -y install grafana-loki.rpm grafana-promtail.rpm grafana-logcli.rpm && \ + rm -rf grafana-loki.rpm grafana-promtail.rpm grafana-logcli.rpm + +COPY local-config.yaml /etc/loki/local-config.yaml + +RUN groupadd -g 10001 loki && \ + adduser -u 10001 -g loki loki && \ + mkdir -p /loki/rules && \ + mkdir -p /loki/rules-temp && \ + chown -R loki:loki /etc/loki /loki + +USER 10001 +EXPOSE 3100 +ENTRYPOINT [ "loki" ] +CMD ["-config.file=/etc/loki/local-config.yaml"] diff --git a/loki/2.9.6/22.03-lts-sp3/local-config.yaml b/loki/2.9.6/22.03-lts-sp3/local-config.yaml new file mode 100644 index 0000000..119b939 --- /dev/null +++ b/loki/2.9.6/22.03-lts-sp3/local-config.yaml @@ -0,0 +1,42 @@ +auth_enabled: false + +server: + http_listen_port: 3100 + +common: + instance_addr: 127.0.0.1 + path_prefix: /loki + storage: + filesystem: + chunks_directory: /loki/chunks + rules_directory: /loki/rules + replication_factor: 1 + ring: + kvstore: + store: inmemory + +schema_config: + configs: + - from: 2020-10-24 + store: tsdb + object_store: filesystem + schema: v12 + index: + prefix: index_ + period: 24h + +ruler: + alertmanager_url: http://localhost:9093 + +# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration +# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ +# +# Statistics help us better understand how Loki is used, and they show us performance +# levels for most users. This helps us prioritize features and documentation. +# For more information on what's sent, look at +# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go +# Refer to the buildReport method to see what goes into a report. +# +# If you would like to disable reporting, uncomment the following lines: +#analytics: +# reporting_enabled: false \ No newline at end of file -- Gitee