Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docker build. update dockerfiles to Go 1.14 #8051

Merged
merged 1 commit into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ deps:
telegraf:
go build -ldflags "$(LDFLAGS)" ./cmd/telegraf

# Used by dockerfile builds
.PHONY: go-install
go-install:
go install -ldflags "-w -s $(LDFLAGS)" ./cmd/telegraf

.PHONY: test
test:
go test -short $(race_detector) ./...
Expand Down
4 changes: 2 additions & 2 deletions scripts/alpine.docker
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.13.13 as builder
FROM golang:1.14.7 as builder
WORKDIR /go/src/github.com/influxdata/telegraf

COPY . /go/src/github.com/influxdata/telegraf
RUN CGO_ENABLED=0 make go-install

FROM alpine:3.6
FROM alpine:3.12
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
RUN apk add --no-cache iputils ca-certificates net-snmp-tools procps lm_sensors && \
update-ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion scripts/stretch.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13.13 as builder
FROM golang:1.14.7-stretch as builder
WORKDIR /go/src/github.com/influxdata/telegraf

COPY . /go/src/github.com/influxdata/telegraf
Expand Down