mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2025-12-15 11:14:19 +01:00
Added Telegraf
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
repository: [restic-auto, influxdb]
|
||||
repository: [restic-auto, influxdb, telegraf]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
25
telegraf/Dockerfile
Normal file
25
telegraf/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM alpine:latest AS builder
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
RUN apk add --no-cache curl jq \
|
||||
&& VERSION=$(curl -s https://api.github.com/repos/influxdata/telegraf/releases/latest | jq '.name' | sed -E "s/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/") \
|
||||
&& curl -s -o entrypoint.sh https://raw.githubusercontent.com/influxdata/influxdata-docker/master/telegraf/1.17/alpine/entrypoint.sh \
|
||||
&& DOWNLOAD_ARCH=$(echo ${TARGETPLATFORM} | sed "s#/#_#") \
|
||||
&& curl -s -o telegraf.tgz https://dl.influxdata.com/telegraf/releases/telegraf-${VERSION}_${DOWNLOAD_ARCH}.tar.gz \
|
||||
&& tar -z -x -f telegraf.tgz
|
||||
|
||||
FROM alpine:3.12
|
||||
|
||||
COPY --from=builder telegraf*/usr/bin/telegraf /usr/bin/
|
||||
COPY --from=builder entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf \
|
||||
&& apk add --no-cache iputils ca-certificates net-snmp-tools procps lm_sensors tzdata \
|
||||
&& update-ca-certificates \
|
||||
&& chmod +x /usr/bin/telegraf /entrypoint.sh
|
||||
|
||||
EXPOSE 8125/udp 8092/udp 8094
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["telegraf"]
|
||||
Reference in New Issue
Block a user