提交grafana、loki和promtail镜像

This commit is contained in:
KennyLee 2021-06-09 18:05:22 +08:00
parent ae0920bb8a
commit d07b07f07d
7 changed files with 98 additions and 0 deletions

21
grafana/Dockerfile Executable file
View File

@ -0,0 +1,21 @@
FROM grafana/grafana:8.0.0
USER root
# 使用阿里云镜像
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# Install base packages
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add curl bash tzdata tar unzip && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
echo -ne "Alpine Linux 3.13 image. (`uname -rsv`)\n" >> /root/.built && \
rm -fr /tmp/* /var/cache/apk/*
USER grafana
EXPOSE 3000
ENTRYPOINT [ "/run.sh" ]

6
grafana/README.md Normal file
View File

@ -0,0 +1,6 @@
# Grafana
* [grafana/grafana GitHub repository](https://github.com/grafana/grafana)
* [Run Grafana Docker image](https://grafana.com/docs/grafana/latest/installation/docker/)
* [Deploy Grafana on Kubernetes](https://grafana.com/docs/grafana/latest/installation/kubernetes/)

23
loki/Dockerfile Executable file
View File

@ -0,0 +1,23 @@
FROM grafana/loki:2.2.1
USER root
# 使用阿里云镜像
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# Install base packages
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add curl bash tzdata tar unzip && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
echo -ne "Alpine Linux 3.9.6 image. (`uname -rsv`)\n" >> /root/.built && \
rm -fr /tmp/* /var/cache/apk/*
USER loki
EXPOSE 3100
ENTRYPOINT ["/usr/bin/loki"]
CMD ["-config.file=/etc/loki/local-config.yaml"]

4
loki/README.md Normal file
View File

@ -0,0 +1,4 @@
# Loki
* [Loki Github Repo](https://github.com/grafana/loki)
* [Install Loki](https://grafana.com/docs/loki/latest/installation/)

31
promtail/Dockerfile Executable file
View File

@ -0,0 +1,31 @@
FROM grafana/promtail:2.2.1
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
COPY buster.sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y curl git unzip vim wget && \
apt-get install -y locales kde-l10n-zhcn && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN sed -i 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/g' /etc/locale.gen
RUN locale && locale-gen "zh_CN.UTF-8"
# Set environment variables.
ENV LANG=zh_CN.UTF-8 \
LANGUAGE=zh_CN:zh:en_US:en \
LC_ALL=zh_CN.UTF-8 \
TZ=Asia/Shanghai \
DEBIAN_FRONTEND="noninteractive" \
TERM=xterm
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata && \
dpkg-reconfigure --frontend noninteractive locales
ENTRYPOINT ["/usr/bin/promtail"]
CMD ["-config.file=/etc/promtail/config.yml"]

4
promtail/README.md Normal file
View File

@ -0,0 +1,4 @@
# Promtail
* [Promtail](https://grafana.com/docs/loki/latest/clients/promtail/)
* [Installing Promtail](https://grafana.com/docs/loki/latest/clients/promtail/installation/)

View File

@ -0,0 +1,9 @@
deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib