Skip to content

Commit

Permalink
update Go to 1.11
Browse files Browse the repository at this point in the history
For consistency with Moby (moby/moby#37358)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Sep 15, 2018
1 parent 67f81f7 commit 2821e93
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 22 deletions.
8 changes: 0 additions & 8 deletions Makefile
Expand Up @@ -5,14 +5,6 @@ DESTDIR=/usr/local
binaries: $(BINARIES)
binaries-all: $(BINARIES) $(BINARIES_EXTRA)

bin/buildctl-darwin: FORCE
mkdir -p bin
docker build --build-arg GOOS=darwin -t buildkit:buildctl-darwin --target buildctl -f ./hack/dockerfiles/test.Dockerfile --force-rm .
( containerID=$$(docker create buildkit:buildctl-darwin noop); \
docker cp $$containerID:/usr/bin/buildctl $@; \
docker rm $$containerID )
chmod +x $@

bin/%.exe: FORCE
mkdir -p bin
docker build -t buildkit:$*.exe --target $*.exe -f ./hack/dockerfiles/test.Dockerfile --force-rm .
Expand Down
2 changes: 1 addition & 1 deletion control/control.go
Expand Up @@ -127,7 +127,7 @@ func (c *Controller) Prune(req *controlapi.PruneRequest, stream controlapi.Contr
ReleaseUnreferenced() error
}); ok {
if err := c.ReleaseUnreferenced(); err != nil {
logrus.Errorf("failed to release cache metadata: %+v")
logrus.Errorf("failed to release cache metadata: %+v", err)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit0/buildkit.go
Expand Up @@ -32,7 +32,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit1/buildkit.go
Expand Up @@ -32,7 +32,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit2/buildkit.go
Expand Up @@ -32,7 +32,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit3/buildkit.go
Expand Up @@ -33,7 +33,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/nested-llb/main.go
Expand Up @@ -31,7 +31,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.10-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.11-alpine AS builder
ARG BUILDTAGS=""
COPY . /go/src/github.com/moby/buildkit
ARG TARGETOS
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/generated-files.Dockerfile
@@ -1,5 +1,5 @@
# protoc is dynamically linked to glibc to can't use golang:1.10-alpine
FROM golang:1.10 AS gobuild-base
# protoc is dynamically linked to glibc to can't use golang:1.11-alpine
FROM golang:1.11 AS gobuild-base
ARG PROTOC_VERSION=3.1.0
ARG GOGO_VERSION=master
RUN apt-get update && apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/lint.Dockerfile
@@ -1,4 +1,4 @@
FROM golang:1.10-alpine
FROM golang:1.11-alpine
RUN apk add --no-cache git
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 \
&& mv /go/bin/gometalinter.v1 /go/bin/gometalinter \
Expand Down
10 changes: 8 additions & 2 deletions hack/dockerfiles/test.Dockerfile
Expand Up @@ -10,7 +10,7 @@ ARG ROOTLESSKIT_VERSION=20b0fc24b305b031a61ef1a1ca456aadafaf5e77
# The `buildkitd` stage and the `buildctl` stage are placed here
# so that they can be built quickly with legacy DAG-unaware `docker build --target=...`

FROM golang:1.10-alpine AS gobuild-base
FROM golang:1.11-alpine AS gobuild-base
RUN apk add --no-cache g++ linux-headers
RUN apk add --no-cache git libseccomp-dev make

Expand All @@ -23,9 +23,15 @@ RUN mkdir .tmp; \

FROM buildkit-base AS buildctl
ENV CGO_ENABLED=0
ARG GOOS=linux
RUN go build -ldflags "$(cat .tmp/ldflags) -d" -o /usr/bin/buildctl ./cmd/buildctl

FROM buildkit-base AS buildctl-darwin
ENV CGO_ENABLED=0
ENV GOOS=darwin
RUN go build -ldflags "$(cat .tmp/ldflags)" -o /usr/bin/buildctl-darwin ./cmd/buildctl
# reset GOOS for legacy builder
ENV GOOS=linux

FROM buildkit-base AS buildkitd
ENV CGO_ENABLED=1
RUN go build -installsuffix netgo -ldflags "$(cat .tmp/ldflags) -w -extldflags -static" -tags 'seccomp netgo cgo static_build' -o /usr/bin/buildkitd ./cmd/buildkitd
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/vendor.Dockerfile
@@ -1,4 +1,4 @@
FROM golang:1.10-alpine AS vndr
FROM golang:1.11-alpine AS vndr
RUN apk add --no-cache git
# NOTE: hack scripts override VNDR_VERSION to a specific revision
ARG VNDR_VERSION=master
Expand Down
2 changes: 1 addition & 1 deletion solver/scheduler.go
Expand Up @@ -371,7 +371,7 @@ func debugSchedulerPreUnpark(e *edge, inc []pipe.Sender, updates, allPipes []pip
if dep.req != nil {
des = dep.req.Request().(*edgeRequest).desiredState
}
logrus.Debugf(":: dep%d %s state=%s des=%s keys=%s hasslowcache=%v", i, e.edge.Vertex.Inputs()[i].Vertex.Name(), dep.state, des, len(dep.keys), e.slowCacheFunc(dep) != nil)
logrus.Debugf(":: dep%d %s state=%s des=%s keys=%d hasslowcache=%v", i, e.edge.Vertex.Inputs()[i].Vertex.Name(), dep.state, des, len(dep.keys), e.slowCacheFunc(dep) != nil)
}

for i, in := range inc {
Expand Down

0 comments on commit 2821e93

Please sign in to comment.