fix docker build. update dockerfiles to Go 1.14 (#8051)
This commit is contained in:
parent
4ebb8c7820
commit
5d999f85f0
5
Makefile
5
Makefile
|
|
@ -94,6 +94,11 @@ deps:
|
||||||
telegraf:
|
telegraf:
|
||||||
go build -ldflags "$(LDFLAGS)" ./cmd/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
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
go test -short $(race_detector) ./...
|
go test -short $(race_detector) ./...
|
||||||
|
|
|
||||||
|
|
@ -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
|
WORKDIR /go/src/github.com/influxdata/telegraf
|
||||||
|
|
||||||
COPY . /go/src/github.com/influxdata/telegraf
|
COPY . /go/src/github.com/influxdata/telegraf
|
||||||
RUN CGO_ENABLED=0 make go-install
|
RUN CGO_ENABLED=0 make go-install
|
||||||
|
|
||||||
FROM alpine:3.6
|
FROM alpine:3.12
|
||||||
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
|
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
|
||||||
RUN apk add --no-cache iputils ca-certificates net-snmp-tools procps lm_sensors && \
|
RUN apk add --no-cache iputils ca-certificates net-snmp-tools procps lm_sensors && \
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
|
|
|
||||||
|
|
@ -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
|
WORKDIR /go/src/github.com/influxdata/telegraf
|
||||||
|
|
||||||
COPY . /go/src/github.com/influxdata/telegraf
|
COPY . /go/src/github.com/influxdata/telegraf
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue