fix docker build. update dockerfiles to Go 1.14 (#8051)

This commit is contained in:
Steven Soroka 2020-08-28 16:39:55 -04:00 committed by GitHub
parent 4ebb8c7820
commit 5d999f85f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -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) ./...

View File

@ -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

View File

@ -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