update docker files for go modules. Closes #7170 (#7179)

This commit is contained in:
Steven Soroka 2020-03-16 19:21:21 -04:00 committed by GitHub
parent dafd08c0ca
commit fcb038d352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 10 deletions

View File

@ -1,9 +1,6 @@
FROM golang:1.11.0 as builder
ENV DEP_VERSION 0.5.0
RUN curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 && chmod +x /usr/local/bin/dep
FROM golang:1.13.8 as builder
WORKDIR /go/src/github.com/influxdata/telegraf
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -vendor-only
COPY . /go/src/github.com/influxdata/telegraf
RUN CGO_ENABLED=0 make go-install

View File

@ -1,9 +1,6 @@
FROM golang:1.11.0 as builder
ENV DEP_VERSION 0.5.0
RUN curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 && chmod +x /usr/local/bin/dep
FROM golang:1.13.8 as builder
WORKDIR /go/src/github.com/influxdata/telegraf
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -vendor-only
COPY . /go/src/github.com/influxdata/telegraf
RUN make go-install