From d8060a47e9fdf854eddcd4607c765328dfd614b5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 2 Sep 2022 13:50:20 +0200 Subject: [PATCH] [0.8] update to go1.18, debian bullseye Both go1.13 and debian buster reached EOL, and some packages are no longer available for buster. It's worth noting that this branch is _only_ used for vendoring in moby/docker 20.10, so updating versions here is not affecting that, but allows us to run CI here for validatoin. Signed-off-by: Sebastiaan van Stijn --- .github/workflows/build.yml | 2 +- Dockerfile | 4 ++-- examples/buildkit0/buildkit.go | 2 +- examples/buildkit1/buildkit.go | 2 +- examples/buildkit2/buildkit.go | 2 +- examples/buildkit3/buildkit.go | 2 +- examples/nested-llb/main.go | 2 +- frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile | 2 +- hack/dockerfiles/generated-files.Dockerfile | 2 +- hack/dockerfiles/lint.Dockerfile | 2 +- hack/dockerfiles/vendor.Dockerfile | 2 +- util/archutil/Dockerfile | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dacd5326df062..5ed2b6efcb8e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -167,7 +167,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.13 + go-version: 1.18 - name: Cache Go modules uses: actions/cache@v2 diff --git a/Dockerfile b/Dockerfile index 68b0c18c2d6de..80cc844bbb3bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN apk add --no-cache git FROM --platform=$BUILDPLATFORM tonistiigi/xx:golang@sha256:6f7d999551dd471b58f70716754290495690efa8421e0a1fcf18eb11d0c0a537 AS xgo # gobuild is base stage for compiling go/cgo -FROM --platform=$BUILDPLATFORM golang:1.13-buster AS gobuild-minimal +FROM --platform=$BUILDPLATFORM golang:1.18-bullseye AS gobuild-minimal COPY --from=xgo / / RUN apt-get update && apt-get install --no-install-recommends -y libseccomp-dev file @@ -38,7 +38,7 @@ RUN dpkg --add-architecture s390x && \ --no-install-recommends FROM gobuild-minimal AS gobuild-cross-amd64-arm -RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list +RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list RUN apt-get update && apt-get install --no-install-recommends -y libseccomp2=2.4.4-1~bpo10+1 libseccomp-dev=2.4.4-1~bpo10+1 RUN dpkg --add-architecture armel && \ dpkg --add-architecture armhf && \ diff --git a/examples/buildkit0/buildkit.go b/examples/buildkit0/buildkit.go index dd094d15ec59e..1a524347427dd 100644 --- a/examples/buildkit0/buildkit.go +++ b/examples/buildkit0/buildkit.go @@ -33,7 +33,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.13-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/buildkit1/buildkit.go b/examples/buildkit1/buildkit.go index ea3e558e18091..5942de38b6177 100644 --- a/examples/buildkit1/buildkit.go +++ b/examples/buildkit1/buildkit.go @@ -33,7 +33,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.13-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/buildkit2/buildkit.go b/examples/buildkit2/buildkit.go index 9e82d3adee0ab..fed66079783f2 100644 --- a/examples/buildkit2/buildkit.go +++ b/examples/buildkit2/buildkit.go @@ -33,7 +33,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.13-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/buildkit3/buildkit.go b/examples/buildkit3/buildkit.go index 633891483d197..ac1c18ecdc075 100644 --- a/examples/buildkit3/buildkit.go +++ b/examples/buildkit3/buildkit.go @@ -34,7 +34,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.13-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/nested-llb/main.go b/examples/nested-llb/main.go index d53aa57cb43f4..180282e6eb19b 100644 --- a/examples/nested-llb/main.go +++ b/examples/nested-llb/main.go @@ -32,7 +32,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.13-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile b/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile index a35d80957f39a..64fb1a16835e3 100644 --- a/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile +++ b/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile @@ -2,7 +2,7 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:golang@sha256:6f7d999551dd471b58f70716754290495690efa8421e0a1fcf18eb11d0c0a537 AS xgo -FROM --platform=$BUILDPLATFORM golang:1.13-buster AS base +FROM --platform=$BUILDPLATFORM golang:1.18-bullseye AS base COPY --from=xgo / / WORKDIR /src ENV GOFLAGS=-mod=vendor diff --git a/hack/dockerfiles/generated-files.Dockerfile b/hack/dockerfiles/generated-files.Dockerfile index 30f4955b9ba1e..d0ceed51192d3 100644 --- a/hack/dockerfiles/generated-files.Dockerfile +++ b/hack/dockerfiles/generated-files.Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # protoc is dynamically linked to glibc to can't use golang:1.10-alpine -FROM golang:1.13-buster AS gobuild-base +FROM golang:1.18-bullseye AS gobuild-base RUN apt-get update && apt-get --no-install-recommends install -y \ git \ diff --git a/hack/dockerfiles/lint.Dockerfile b/hack/dockerfiles/lint.Dockerfile index e735aeebaba78..bfb21950b7df5 100644 --- a/hack/dockerfiles/lint.Dockerfile +++ b/hack/dockerfiles/lint.Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM golang:1.13-alpine +FROM golang:1.18-alpine RUN apk add --no-cache gcc musl-dev yamllint RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.27.0 WORKDIR /go/src/github.com/moby/buildkit diff --git a/hack/dockerfiles/vendor.Dockerfile b/hack/dockerfiles/vendor.Dockerfile index efd726f78b141..ff303a962b8a4 100644 --- a/hack/dockerfiles/vendor.Dockerfile +++ b/hack/dockerfiles/vendor.Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM golang:1.13-alpine AS vendored +FROM golang:1.18-alpine AS vendored RUN apk add --no-cache git WORKDIR /src RUN --mount=target=/src,rw \ diff --git a/util/archutil/Dockerfile b/util/archutil/Dockerfile index 70337ccd1558d..6557de1df1a37 100644 --- a/util/archutil/Dockerfile +++ b/util/archutil/Dockerfile @@ -38,7 +38,7 @@ FROM base AS exit-ppc64le COPY fixtures/exit.ppc64le.s . RUN powerpc64le-linux-gnu-as --noexecstack -o exit.o exit.ppc64le.s && powerpc64le-linux-gnu-ld -o exit -s exit.o -FROM golang:1.13-alpine AS generate +FROM golang:1.18-alpine AS generate WORKDIR /src COPY --from=exit-amd64 /src/exit amd64 COPY --from=exit-386 /src/exit 386