diff --git a/Dockerfile b/Dockerfile index 9d80e361824a0..7f8145fd09379 100644 --- a/Dockerfile +++ b/Dockerfile @@ -129,40 +129,18 @@ ENV DOCKER_CROSSPLATFORMS \ freebsd/amd64 freebsd/386 freebsd/arm \ windows/amd64 windows/386 -COPY go1.4.3.linux-amd64.tar.gz /tmp/go1.4.3.linux-amd64.tar.gz -COPY go1.6.4.src.tar.gz /tmp/go1.6.4.src.tar.gz - +# Install Go +# IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines +# will need updating, to avoid errors. Ping #docker-maintainers on IRC +# with a heads-up. +ENV GO_VERSION 1.12.13 +RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \ + | tar -xzC /usr/local -RUN tar -zxvf /tmp/go1.4.3.linux-amd64.tar.gz -C /root && \ - mv /root/go /root/go1.4 && \ - cd /usr/local && \ - tar -zxvf /tmp/go1.6.4.src.tar.gz -C /usr/local && \ - cd go && \ - printf 'diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s\nindex e09b906..fa8ff2f 100644\n--- a/src/runtime/sys_darwin_amd64.s\n+++ b/src/runtime/sys_darwin_amd64.s\n@@ -157,6 +157,7 @@ systime:\n\t// Fall back to system call (usually first call in this thread).\n\tMOVQ\tSP, DI\n\tMOVQ\t$0, SI\n+\tMOVQ\t$0, DX // required as of Sierra; Issue 16570\n\tMOVL\t$(0x2000000+116), AX\n\tSYSCALL\n\tCMPQ\tAX, $0\n' | patch -p1 && \ - cd src && \ - ./make.bash ENV PATH /go/bin:/usr/local/go/bin:$PATH ENV GOPATH /go:/go/src/github.com/docker/docker/vendor -# This has been commented out and kept as reference because we don't support compiling with older Go anymore. -# ENV GOFMT_VERSION 1.3.3 -# RUN curl -sSL https://storage.googleapis.com/golang/go${GOFMT_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz | tar -C /go/bin -xz --strip-components=2 go/bin/gofmt - -ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3 -# Grab Go's cover tool for dead-simple code coverage testing -# Grab Go's vet tool for examining go code to find suspicious constructs -# and help prevent errors that the compiler might not catch -RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ - && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \ - && go install -v golang.org/x/tools/cmd/cover \ - && go install -v golang.org/x/tools/cmd/vet -# Grab Go's lint tool -ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456 -RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ - && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ - && go install -v github.com/golang/lint/golint - # Install two versions of the registry. The first is an older version that # only supports schema1 manifests. The second is a newer version that supports # both. This allows integration-cli tests to cover push/pull with both schema1