Skip to content

Commit

Permalink
[0.8] update to go1.18, debian bullseye
Browse files Browse the repository at this point in the history
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@gone.nl>
  • Loading branch information
thaJeztah committed Sep 4, 2022
1 parent ddf3212 commit 3631de3
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 && \
Expand Down Expand Up @@ -158,6 +158,7 @@ WORKDIR /go/src/github.com/containerd/containerd

FROM containerd-base AS containerd
ARG CONTAINERD_VERSION
ARG GO111MODULE=off
RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target=/root/.cache,type=cache \
git fetch origin \
&& git checkout -q "$CONTAINERD_VERSION" \
Expand All @@ -169,6 +170,7 @@ RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target
# containerd v1.3 for integration tests
FROM containerd-base as containerd-alt
ARG CONTAINERD_ALT_VERSION
ARG GO111MODULE=off
RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target=/root/.cache,type=cache \
git fetch origin \
&& git checkout -q "$CONTAINERD_ALT_VERSION" \
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit0/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit1/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit2/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit3/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down
2 changes: 1 addition & 1 deletion examples/nested-llb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down
2 changes: 1 addition & 1 deletion frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/generated-files.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/lint.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/vendor.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion util/archutil/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3631de3

Please sign in to comment.