Skip to content

Commit

Permalink
add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankf authored and zipper-meng committed Aug 1, 2024
1 parent d160276 commit fbb8f68
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM golang:latest as builder
WORKDIR /go/src/github.com/cnosdb/telegraf
COPY . /go/src/github.com/cnosdb/telegraf
RUN go env -w GOPROXY="https://goproxy.cn"
RUN go build -o telegraf ./cmd/telegraf

FROM ubuntu:latest
COPY --from=builder /go/src/github.com/cnosdb/telegraf/telegraf /usr/bin/
COPY --from=builder /go/src/github.com/cnosdb/telegraf/etc/telegraf.conf /etc/telegraf/
CMD ["telegraf"]

0 comments on commit fbb8f68

Please sign in to comment.