From 9d0fd3a7e3a498d7a8dbbb1b5b9720ced28b34da Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Wed, 13 Apr 2022 10:10:43 +0100 Subject: [PATCH] Upgrade golang version to v1.17.9 (#5899) ``` git ls-files '*[Dd]ockerfile*' | grep -v ^vendor/ | xargs sed -i "s/golang:[0-9\\.]*/golang:1.17.9/g" | ag 'golang:' ``` --- Makefile | 2 +- clients/cmd/fluent-bit/Dockerfile | 2 +- clients/cmd/promtail/Dockerfile | 2 +- clients/cmd/promtail/Dockerfile.arm32 | 2 +- clients/cmd/promtail/Dockerfile.cross | 2 +- cmd/logcli/Dockerfile | 2 +- cmd/loki-canary/Dockerfile | 2 +- cmd/loki-canary/Dockerfile.cross | 2 +- cmd/loki/Dockerfile | 2 +- cmd/loki/Dockerfile.cross | 2 +- cmd/migrate/Dockerfile | 2 +- cmd/querytee/Dockerfile | 2 +- cmd/querytee/Dockerfile.cross | 2 +- loki-build-image/Dockerfile | 12 ++++++------ operator/Dockerfile | 2 +- operator/calculator.Dockerfile | 2 +- tools/dev/loki-boltdb-storage-s3/dev.dockerfile | 2 +- tools/lambda-promtail/Dockerfile | 2 +- 18 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 1aa0ec26c0cec..b17e21ed31c78 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ DOCKER_IMAGE_DIRS := $(patsubst %/Dockerfile,%,$(DOCKERFILES)) BUILD_IN_CONTAINER ?= true # ensure you run `make drone` after changing this -BUILD_IMAGE_VERSION := 0.20.1 +BUILD_IMAGE_VERSION := 0.20.2 # Docker image info IMAGE_PREFIX ?= grafana diff --git a/clients/cmd/fluent-bit/Dockerfile b/clients/cmd/fluent-bit/Dockerfile index 78cb2450ec141..583a29ee2dd78 100644 --- a/clients/cmd/fluent-bit/Dockerfile +++ b/clients/cmd/fluent-bit/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8 as build +FROM golang:1.17.9 as build COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false fluent-bit-plugin diff --git a/clients/cmd/promtail/Dockerfile b/clients/cmd/promtail/Dockerfile index 8ddfd4b220fb7..a7e782f62b5ec 100644 --- a/clients/cmd/promtail/Dockerfile +++ b/clients/cmd/promtail/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8-bullseye as build +FROM golang:1.17.9-bullseye as build COPY . /src/loki WORKDIR /src/loki diff --git a/clients/cmd/promtail/Dockerfile.arm32 b/clients/cmd/promtail/Dockerfile.arm32 index 76c609577aeb2..8e70ba084e65a 100644 --- a/clients/cmd/promtail/Dockerfile.arm32 +++ b/clients/cmd/promtail/Dockerfile.arm32 @@ -1,4 +1,4 @@ -FROM golang:1.17.8 as build +FROM golang:1.17.9 as build COPY . /src/loki WORKDIR /src/loki diff --git a/clients/cmd/promtail/Dockerfile.cross b/clients/cmd/promtail/Dockerfile.cross index 231e15bbb47bd..b43ededde405a 100644 --- a/clients/cmd/promtail/Dockerfile.cross +++ b/clients/cmd/promtail/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile . -FROM golang:1.17.8-alpine as goenv +FROM golang:1.17.9-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/cmd/logcli/Dockerfile b/cmd/logcli/Dockerfile index 9ecc374d8ee4b..2989dc6a97cff 100644 --- a/cmd/logcli/Dockerfile +++ b/cmd/logcli/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8 as build +FROM golang:1.17.9 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/loki-canary/Dockerfile b/cmd/loki-canary/Dockerfile index 3deda906be0c2..f3523a52a4e6c 100644 --- a/cmd/loki-canary/Dockerfile +++ b/cmd/loki-canary/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8 as build +FROM golang:1.17.9 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/loki-canary/Dockerfile.cross b/cmd/loki-canary/Dockerfile.cross index f7879e31a787e..ce93d4c36522a 100644 --- a/cmd/loki-canary/Dockerfile.cross +++ b/cmd/loki-canary/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . -FROM golang:1.17.8-alpine as goenv +FROM golang:1.17.9-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/cmd/loki/Dockerfile b/cmd/loki/Dockerfile index 1775e1b0fa748..9f6a3f61af4e0 100644 --- a/cmd/loki/Dockerfile +++ b/cmd/loki/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8 as build +FROM golang:1.17.9 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/loki/Dockerfile.cross b/cmd/loki/Dockerfile.cross index 5d77c13a47cfb..fd3967cb19511 100644 --- a/cmd/loki/Dockerfile.cross +++ b/cmd/loki/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/loki -f cmd/loki/Dockerfile . -FROM golang:1.17.8-alpine as goenv +FROM golang:1.17.9-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/cmd/migrate/Dockerfile b/cmd/migrate/Dockerfile index 7e2510a7f5a9d..cf0f92527c11e 100644 --- a/cmd/migrate/Dockerfile +++ b/cmd/migrate/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8 as build +FROM golang:1.17.9 as build COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false migrate diff --git a/cmd/querytee/Dockerfile b/cmd/querytee/Dockerfile index d57b03f805267..6ff90e3382901 100644 --- a/cmd/querytee/Dockerfile +++ b/cmd/querytee/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8 as build +FROM golang:1.17.9 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/querytee/Dockerfile.cross b/cmd/querytee/Dockerfile.cross index 6154fbf5e7b90..7ebc34d49055c 100644 --- a/cmd/querytee/Dockerfile.cross +++ b/cmd/querytee/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . -FROM golang:1.17.8-alpine as goenv +FROM golang:1.17.9-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/loki-build-image/Dockerfile b/loki-build-image/Dockerfile index b26ba00725d30..a735f31d127b6 100644 --- a/loki-build-image/Dockerfile +++ b/loki-build-image/Dockerfile @@ -28,7 +28,7 @@ RUN apk add --no-cache docker-cli # TODO this should be fixed to download and extract the specific release binary from github as we do for golangci and helm above # however we need a commit which hasn't been released yet: https://github.com/drone/drone-cli/commit/1fad337d74ca0ecf420993d9d2d7229a1c99f054 # Read the comment below regarding GO111MODULE=on and why it is necessary -FROM golang:1.17.8 as drone +FROM golang:1.17.9 as drone RUN curl -L https://github.com/drone/drone-cli/releases/download/v1.4.0/drone_linux_amd64.tar.gz | tar zx && \ install -t /usr/local/bin drone @@ -37,22 +37,22 @@ RUN curl -L https://github.com/drone/drone-cli/releases/download/v1.4.0/drone_li # Error: # github.com/fatih/faillint@v1.5.0 requires golang.org/x/tools@v0.0.0-20200207224406-61798d64f025 # (not golang.org/x/tools@v0.0.0-20190918214920-58d531046acd from golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69) -FROM golang:1.17.8 as faillint +FROM golang:1.17.9 as faillint RUN GO111MODULE=on go get github.com/fatih/faillint@v1.5.0 -FROM golang:1.17.8 as delve +FROM golang:1.17.9 as delve RUN GO111MODULE=on go get github.com/go-delve/delve/cmd/dlv@v1.7.3 # Install ghr used to push binaries and template the release # This collides with the version of go tools used in the base image, thus we install it in its own image and copy it over. -FROM golang:1.17.8 as ghr +FROM golang:1.17.9 as ghr RUN GO111MODULE=on go get github.com/tcnksm/ghr # Install nfpm (https://nfpm.goreleaser.com) for creating .deb and .rpm packages. -FROM golang:1.17.8 as nfpm +FROM golang:1.17.9 as nfpm RUN GO111MODULE=on go get github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.11.3 -FROM golang:1.17.8-buster +FROM golang:1.17.9-buster RUN apt-get update && \ apt-get install -qy \ musl gnupg ragel \ diff --git a/operator/Dockerfile b/operator/Dockerfile index 054084b73be4c..8851ce5fe25f6 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.17.9 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/operator/calculator.Dockerfile b/operator/calculator.Dockerfile index c6fb5ede78e09..42976a5ee4296 100644 --- a/operator/calculator.Dockerfile +++ b/operator/calculator.Dockerfile @@ -1,5 +1,5 @@ # Build the calculator binary -FROM golang:1.17 as builder +FROM golang:1.17.9 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/tools/dev/loki-boltdb-storage-s3/dev.dockerfile b/tools/dev/loki-boltdb-storage-s3/dev.dockerfile index eb9ba6f67aa95..0f25dc0fc8f47 100644 --- a/tools/dev/loki-boltdb-storage-s3/dev.dockerfile +++ b/tools/dev/loki-boltdb-storage-s3/dev.dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.8 +FROM golang:1.17.9 ENV CGO_ENABLED=0 RUN go get github.com/go-delve/delve/cmd/dlv diff --git a/tools/lambda-promtail/Dockerfile b/tools/lambda-promtail/Dockerfile index 4efe948a1fe8c..ce14b59502fd8 100644 --- a/tools/lambda-promtail/Dockerfile +++ b/tools/lambda-promtail/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1-alpine3.14 AS build-image +FROM golang:1.17.9-alpine3.14 AS build-image COPY tools/lambda-promtail /src/lambda-promtail WORKDIR /src/lambda-promtail