Skip to content

Commit

Permalink
Merge pull request #279 from liujie-666/main
Browse files Browse the repository at this point in the history
add telegrafV1.33.0
  • Loading branch information
liujie-666 authored Dec 17, 2024
2 parents 72c8f40 + 596bd3e commit 4e63a6a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions influxdata/telegraf/1.33.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM cr.loongnix.cn/library/golang:1.23 as builder
ENV GOPROXY https://goproxy.cn
WORKDIR /go/src/telegraf
COPY ./src/telegraf /go/src/telegraf
RUN go mod tidy && make deps
RUN make go-install
FROM cr.loongnix.cn/library/buildpack-deps:buster-curl
COPY --from=builder /go/bin/* /usr/bin/
EXPOSE 8125/udp 8092/udp 8094
ENTRYPOINT ["telegraf"]
17 changes: 17 additions & 0 deletions influxdata/telegraf/1.33.0/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
REGISTRY?=cr.loongnix.cn
ORGANIZATION?=calico
REPOSITORY?=telegraf
TAG?=1.33.0

IMAGE_NAME := ${REGISTRY}/${ORGANIZATION}/${REPOSITORY}:$(TAG)
SOURCE_URL := https://github.com/influxdata/telegraf.git
SOURCE := $(shell echo $(SOURCE_URL) | awk -F '/' '{print $$NF}' | awk -F '.' '{print $$1}')
default:image

image: src/$(SOURCE)
docker build -t $(IMAGE_NAME) .

src/$(SOURCE):
git clone -b v1.33.0 $(SOURCE_URL) $@
clean:
rm -rf src

0 comments on commit 4e63a6a

Please sign in to comment.