update Go to 1.11

For consistency with Moby (moby/moby#37358)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
docker-18.09
Akihiro Suda 2018-09-14 14:35:38 +09:00
parent 67f81f7105
commit bf571a519e
16 changed files with 23 additions and 25 deletions

View File

@ -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 .

View File

@ -508,7 +508,7 @@ func parseChange(str string) *change {
st.Mode |= 0777
}
c.fi = &fsutil.StatInfo{st}
c.fi = &fsutil.StatInfo{Stat: st}
return c
}

View File

@ -53,7 +53,7 @@ func (b *build) Marshal(c *llb.Constraints) (digest.Digest, []byte, *pb.OpMetada
pbo := &pb.BuildOp{
Builder: pb.LLBBuilder,
Inputs: map[string]*pb.BuildInput{
pb.LLBDefinitionInput: {pb.InputIndex(0)}},
pb.LLBDefinitionInput: {Input: pb.InputIndex(0)}},
}
pbo.Attrs = map[string]string{}

View File

@ -28,7 +28,7 @@ func TestMarshal(t *testing.T) {
require.Equal(t, len(op.Inputs), 1)
require.Equal(t, buildop.Builder, pb.LLBBuilder)
require.Equal(t, len(buildop.Inputs), 1)
require.Equal(t, buildop.Inputs[pb.LLBDefinitionInput], &pb.BuildInput{pb.InputIndex(0)})
require.Equal(t, buildop.Inputs[pb.LLBDefinitionInput], &pb.BuildInput{Input: pb.InputIndex(0)})
require.Equal(t, buildop.Attrs[pb.AttrLLBDefinitionFilename], "myfilename")
}

View File

@ -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)
}
}
}

View File

@ -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").

View File

@ -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").

View File

@ -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").

View File

@ -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").

View File

@ -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").

View File

@ -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

View File

@ -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 \

View File

@ -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 \

View File

@ -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
@ -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

View File

@ -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

View File

@ -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 {