diff --git a/influxdata/telegraf/1.33.0/Dockerfile b/influxdata/telegraf/1.33.0/Dockerfile new file mode 100644 index 00000000..0eabdaab --- /dev/null +++ b/influxdata/telegraf/1.33.0/Dockerfile @@ -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"] diff --git a/influxdata/telegraf/1.33.0/Makefile b/influxdata/telegraf/1.33.0/Makefile new file mode 100644 index 00000000..af37636f --- /dev/null +++ b/influxdata/telegraf/1.33.0/Makefile @@ -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