Add promtail
Upgrade telegraf Upgrade docker-socket-proxy
This commit is contained in:
60
promtail/Dockerfile
Normal file
60
promtail/Dockerfile
Normal file
@@ -0,0 +1,60 @@
|
||||
ARG BUILD_FROM
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# Build arguments
|
||||
ARG BUILD_ARCH
|
||||
ARG YQ_VERSION
|
||||
ARG PROMTAIL_VERSION
|
||||
|
||||
# Add yq and tzdata (required for the timestamp stage)
|
||||
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
|
||||
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev
|
||||
RUN set -eux; \
|
||||
apt-get update; \
|
||||
apt-get install -qy --no-install-recommends \
|
||||
tar \
|
||||
; \
|
||||
update-ca-certificates; \
|
||||
\
|
||||
case "${BUILD_ARCH}" in \
|
||||
amd64) BINARCH='amd64' ;; \
|
||||
armhf) BINARCH='arm' ;; \
|
||||
armv7) BINARCH='arm' ;; \
|
||||
aarch64) BINARCH='arm64' ;; \
|
||||
*) echo >&2 "error: unsupported architecture (${APKARCH})"; exit 1 ;; \
|
||||
esac; \
|
||||
curl -s -J -L -o /tmp/yq.tar.gz \
|
||||
"https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_${BINARCH}.tar.gz"; \
|
||||
tar -xf /tmp/yq.tar.gz -C /usr/bin; \
|
||||
mv /usr/bin/yq_linux_${BINARCH} /usr/bin/yq; \
|
||||
chmod a+x /usr/bin/yq; \
|
||||
rm /tmp/yq.tar.gz; \
|
||||
yq --version; \
|
||||
\
|
||||
apt-get clean; \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*;
|
||||
|
||||
# Add promtail
|
||||
COPY --from=grafana/promtail:${PROMTAIL_VERSION} /usr/bin/promtail /usr/bin/promtail
|
||||
RUN promtail --version
|
||||
|
||||
COPY rootfs /
|
||||
WORKDIR /data/promtail
|
||||
|
||||
# Build arguments
|
||||
ARG BUILD_ARCH
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_DESCRIPTION
|
||||
ARG BUILD_NAME
|
||||
ARG BUILD_REF
|
||||
ARG BUILD_REPOSITORY
|
||||
ARG BUILD_VERSION
|
||||
|
||||
# Labels
|
||||
LABEL \
|
||||
io.hass.name="${BUILD_NAME}" \
|
||||
io.hass.description="${BUILD_DESCRIPTION}" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION} \
|
||||
maintainer="fbonelle"
|
||||
Reference in New Issue
Block a user