Skip to content

Commit

Permalink
fix docker build. update dockerfiles to Go 1.14 (influxdata#8051)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssoroka authored and idohalevi committed Sep 23, 2020
1 parent 73a4eb6 commit 74bbcac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
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

0 comments on commit 74bbcac

Please sign in to comment.