diff --git a/Dockerfile b/Dockerfile index 0266557d5..3be6e0a0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -127,19 +127,10 @@ RUN set -x \ # 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.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \ | tar -xzC /usr/local -# !!! TEMPORARY HACK !!! -# Because of https://github.com/golang/go/issues/15286 we have to revert to Go 1.5.3 for windows/amd64 in master -# To change which version of Go to compile with, simply prepend PATH with /usr/local/go1.5.3/bin -# and set GOROOT to /usr/local/go1.5.3 -ENV HACK_GO_VERSION 1.5.3 -RUN curl -fsSL "https://storage.googleapis.com/golang/go${HACK_GO_VERSION}.linux-amd64.tar.gz" \ - | tar -xzC /tmp \ - && mv /tmp/go "/usr/local/go${HACK_GO_VERSION}" - ENV PATH /go/bin:/usr/local/go/bin:$PATH ENV GOPATH /go:/go/src/github.com/docker/docker/vendor diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 56fb014d0..9f122def2 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -96,7 +96,7 @@ RUN set -x \ # We don't have official binary tarballs for ARM64, eigher for Go or bootstrap, # so we use the official armv6 released binaries as a GOROOT_BOOTSTRAP, and # build Go from source code. -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN mkdir /usr/src/go && curl -fsSL https://storage.googleapis.com/golang/go${GO_VERSION}.src.tar.gz | tar -v -C /usr/src/go -xz --strip-components=1 \ && cd /usr/src/go/src \ && GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 12a317cf0..6dc893ee8 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -65,10 +65,8 @@ RUN cd /usr/local/lvm2 \ # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL # Install Go -# TODO Update to 1.5.4 once available, or build from source, as these builds -# are marked "end of life", see http://dave.cheney.net/unofficial-arm-tarballs -ENV GO_VERSION 1.5.3 -RUN curl -fsSL "http://dave.cheney.net/paste/go${GO_VERSION}.linux-arm.tar.gz" \ +ENV GO_VERSION 1.6.2 +RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-armv6l.tar.gz" \ | tar -xzC /usr/local ENV PATH /go/bin:/usr/local/go/bin:$PATH ENV GOPATH /go:/go/src/github.com/docker/docker/vendor diff --git a/Dockerfile.gccgo b/Dockerfile.gccgo index 928f93254..f4ab4c136 100644 --- a/Dockerfile.gccgo +++ b/Dockerfile.gccgo @@ -6,7 +6,7 @@ # docker build -t docker -f Dockerfile.gccgo . # -FROM gcc:5.3 +FROM gcc:6.1 # Packaged dependencies RUN apt-get update && apt-get install -y \ diff --git a/Dockerfile.ppc64le b/Dockerfile.ppc64le index f2f0c28e2..8ea5d22b7 100644 --- a/Dockerfile.ppc64le +++ b/Dockerfile.ppc64le @@ -15,7 +15,7 @@ # the case. Therefore, you don't have to disable it anymore. # -FROM ppc64le/gcc:5.3 +FROM ppc64le/gcc:6.1 # Packaged dependencies RUN apt-get update && apt-get install -y \ diff --git a/Dockerfile.simple b/Dockerfile.simple index fece5532f..d31a52744 100644 --- a/Dockerfile.simple +++ b/Dockerfile.simple @@ -49,7 +49,7 @@ RUN set -x \ # 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.5.3 +ENV GO_VERSION 1.6.2 RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \ | tar -xzC /usr/local ENV PATH /go/bin:/usr/local/go/bin:$PATH diff --git a/Dockerfile.windows b/Dockerfile.windows index e67127547..196f902c4 100755 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -34,7 +34,7 @@ FROM windowsservercore # Environment variable notes: # - GO_VERSION must consistent with 'Dockerfile' used by Linux'. # - FROM_DOCKERFILE is used for detection of building within a container. -ENV GO_VERSION=1.5.3 \ +ENV GO_VERSION=1.6.2 \ GIT_LOCATION=https://github.com/git-for-windows/git/releases/download/v2.7.2.windows.1/Git-2.7.2-64-bit.exe \ GOPATH=C:/go;C:/go/src/github.com/docker/docker/vendor \ FROM_DOCKERFILE=1 diff --git a/cmd/docker/docker_windows.go b/cmd/docker/docker_windows.go index de3225758..9bc507e20 100644 --- a/cmd/docker/docker_windows.go +++ b/cmd/docker/docker_windows.go @@ -1,5 +1,18 @@ package main import ( + "sync/atomic" + _ "github.com/docker/docker/autogen/winresources/docker" ) + +//go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll" + +var dummy uintptr + +func init() { + // Ensure that this import is not removed by the linker. This is used to + // ensure that shell32.dll is loaded by the system loader, preventing + // go#15286 from triggering on Nano Server TP5. + atomic.LoadUintptr(&dummy) +} diff --git a/cmd/dockerd/docker_windows.go b/cmd/dockerd/docker_windows.go index 889e35272..19c5587cb 100644 --- a/cmd/dockerd/docker_windows.go +++ b/cmd/dockerd/docker_windows.go @@ -1,5 +1,18 @@ package main import ( + "sync/atomic" + _ "github.com/docker/docker/autogen/winresources/dockerd" ) + +//go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll" + +var dummy uintptr + +func init() { + // Ensure that this import is not removed by the linker. This is used to + // ensure that shell32.dll is loaded by the system loader, preventing + // go#15286 from triggering on Nano Server TP5. + atomic.LoadUintptr(&dummy) +} diff --git a/contrib/builder/deb/amd64/debian-jessie/Dockerfile b/contrib/builder/deb/amd64/debian-jessie/Dockerfile index 9470d06af..499137de3 100644 --- a/contrib/builder/deb/amd64/debian-jessie/Dockerfile +++ b/contrib/builder/deb/amd64/debian-jessie/Dockerfile @@ -10,7 +10,7 @@ RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev pkg-config libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/deb/amd64/debian-stretch/Dockerfile b/contrib/builder/deb/amd64/debian-stretch/Dockerfile index 0d51fab7e..6393fa18a 100644 --- a/contrib/builder/deb/amd64/debian-stretch/Dockerfile +++ b/contrib/builder/deb/amd64/debian-stretch/Dockerfile @@ -10,7 +10,7 @@ RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev libsqlite3-dev pkg-config libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/deb/amd64/debian-wheezy/Dockerfile b/contrib/builder/deb/amd64/debian-wheezy/Dockerfile index ea2af74a3..08bb9f855 100644 --- a/contrib/builder/deb/amd64/debian-wheezy/Dockerfile +++ b/contrib/builder/deb/amd64/debian-wheezy/Dockerfile @@ -12,7 +12,7 @@ RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list.d/backport RUN apt-get update && apt-get install -y -t wheezy-backports btrfs-tools --no-install-recommends && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y apparmor bash-completion build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev pkg-config --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/deb/amd64/ubuntu-precise/Dockerfile b/contrib/builder/deb/amd64/ubuntu-precise/Dockerfile index d88301ede..efb11ec80 100644 --- a/contrib/builder/deb/amd64/ubuntu-precise/Dockerfile +++ b/contrib/builder/deb/amd64/ubuntu-precise/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:precise RUN apt-get update && apt-get install -y apparmor bash-completion build-essential curl ca-certificates debhelper dh-apparmor git libapparmor-dev libltdl-dev libsqlite3-dev pkg-config --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/deb/amd64/ubuntu-trusty/Dockerfile b/contrib/builder/deb/amd64/ubuntu-trusty/Dockerfile index 1e83056f3..1cfa66743 100644 --- a/contrib/builder/deb/amd64/ubuntu-trusty/Dockerfile +++ b/contrib/builder/deb/amd64/ubuntu-trusty/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:trusty RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev pkg-config libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/deb/amd64/ubuntu-wily/Dockerfile b/contrib/builder/deb/amd64/ubuntu-wily/Dockerfile index acf268f7a..88cb52a70 100644 --- a/contrib/builder/deb/amd64/ubuntu-wily/Dockerfile +++ b/contrib/builder/deb/amd64/ubuntu-wily/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:wily RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev libsqlite3-dev pkg-config libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/deb/amd64/ubuntu-xenial/Dockerfile b/contrib/builder/deb/amd64/ubuntu-xenial/Dockerfile index 1a4cc8e48..14e8a1cfb 100644 --- a/contrib/builder/deb/amd64/ubuntu-xenial/Dockerfile +++ b/contrib/builder/deb/amd64/ubuntu-xenial/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:xenial RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev libsqlite3-dev pkg-config libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/deb/armhf/debian-jessie/Dockerfile b/contrib/builder/deb/armhf/debian-jessie/Dockerfile index 7636e890d..cdaa1b2ee 100644 --- a/contrib/builder/deb/armhf/debian-jessie/Dockerfile +++ b/contrib/builder/deb/armhf/debian-jessie/Dockerfile @@ -6,8 +6,8 @@ RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* -ENV GO_VERSION 1.4.3 -RUN curl -fSL "https://github.com/hypriot/golang-armbuilds/releases/download/v${GO_VERSION}/go${GO_VERSION}.linux-armv7.tar.gz" | tar xzC /usr/local +ENV GO_VERSION 1.6.2 +RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-armv6l.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin ENV AUTO_GOPATH 1 diff --git a/contrib/builder/rpm/amd64/centos-7/Dockerfile b/contrib/builder/rpm/amd64/centos-7/Dockerfile index fb1a6805f..4cdbe2e04 100644 --- a/contrib/builder/rpm/amd64/centos-7/Dockerfile +++ b/contrib/builder/rpm/amd64/centos-7/Dockerfile @@ -8,7 +8,7 @@ RUN yum groupinstall -y "Development Tools" RUN yum -y swap -- remove systemd-container systemd-container-libs -- install systemd systemd-libs RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libseccomp-devel libselinux-devel libtool-ltdl-devel pkgconfig selinux-policy selinux-policy-devel sqlite-devel systemd-devel tar git -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/rpm/amd64/fedora-22/Dockerfile b/contrib/builder/rpm/amd64/fedora-22/Dockerfile index 401380387..23cd4aacf 100644 --- a/contrib/builder/rpm/amd64/fedora-22/Dockerfile +++ b/contrib/builder/rpm/amd64/fedora-22/Dockerfile @@ -7,7 +7,7 @@ FROM fedora:22 RUN dnf install -y @development-tools fedora-packager RUN dnf install -y btrfs-progs-devel device-mapper-devel glibc-static libseccomp-devel libselinux-devel libtool-ltdl-devel pkgconfig selinux-policy selinux-policy-devel sqlite-devel systemd-devel tar git -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/rpm/amd64/fedora-23/Dockerfile b/contrib/builder/rpm/amd64/fedora-23/Dockerfile index 5d311a008..6d9843b40 100644 --- a/contrib/builder/rpm/amd64/fedora-23/Dockerfile +++ b/contrib/builder/rpm/amd64/fedora-23/Dockerfile @@ -7,7 +7,7 @@ FROM fedora:23 RUN dnf install -y @development-tools fedora-packager RUN dnf install -y btrfs-progs-devel device-mapper-devel glibc-static libseccomp-devel libselinux-devel libtool-ltdl-devel pkgconfig selinux-policy selinux-policy-devel sqlite-devel systemd-devel tar git -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/rpm/amd64/opensuse-13.2/Dockerfile b/contrib/builder/rpm/amd64/opensuse-13.2/Dockerfile index 348e26072..f077144d6 100644 --- a/contrib/builder/rpm/amd64/opensuse-13.2/Dockerfile +++ b/contrib/builder/rpm/amd64/opensuse-13.2/Dockerfile @@ -7,7 +7,7 @@ FROM opensuse:13.2 RUN zypper --non-interactive install ca-certificates* curl gzip rpm-build RUN zypper --non-interactive install libbtrfs-devel device-mapper-devel glibc-static libselinux-devel libtool-ltdl-devel pkg-config selinux-policy selinux-policy-devel sqlite-devel systemd-devel tar git systemd-rpm-macros -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/rpm/amd64/oraclelinux-6/Dockerfile b/contrib/builder/rpm/amd64/oraclelinux-6/Dockerfile index 581aa6100..0abca3a61 100644 --- a/contrib/builder/rpm/amd64/oraclelinux-6/Dockerfile +++ b/contrib/builder/rpm/amd64/oraclelinux-6/Dockerfile @@ -10,7 +10,7 @@ RUN yum install -y kernel-uek-devel-4.1.12-32.el6uek RUN yum groupinstall -y "Development Tools" RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel libtool-ltdl-devel pkgconfig selinux-policy selinux-policy-devel sqlite-devel tar git -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/contrib/builder/rpm/amd64/oraclelinux-7/Dockerfile b/contrib/builder/rpm/amd64/oraclelinux-7/Dockerfile index 46878ef39..34415b081 100644 --- a/contrib/builder/rpm/amd64/oraclelinux-7/Dockerfile +++ b/contrib/builder/rpm/amd64/oraclelinux-7/Dockerfile @@ -7,7 +7,7 @@ FROM oraclelinux:7 RUN yum groupinstall -y "Development Tools" RUN yum install -y --enablerepo=ol7_optional_latest btrfs-progs-devel device-mapper-devel glibc-static libseccomp-devel libselinux-devel libtool-ltdl-devel pkgconfig selinux-policy selinux-policy-devel sqlite-devel systemd-devel tar git -ENV GO_VERSION 1.5.4 +ENV GO_VERSION 1.6.2 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local ENV PATH $PATH:/usr/local/go/bin diff --git a/hack/make.sh b/hack/make.sh index 3624de0e1..bbe8a9a4d 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -117,7 +117,7 @@ if [ "$AUTO_GOPATH" ]; then if [ "$(go env GOOS)" = 'solaris' ]; then # sys/unix is installed outside the standard library on solaris # TODO need to allow for version change, need to get version from go - export GOPATH="${GOPATH}:/usr/lib/gocode/1.5" + export GOPATH="${GOPATH}:/usr/lib/gocode/1.6.2" fi fi diff --git a/hack/make/cross b/hack/make/cross index dfcd14401..162458a3b 100644 --- a/hack/make/cross +++ b/hack/make/cross @@ -27,13 +27,6 @@ for platform in $DOCKER_CROSSPLATFORMS; do export GOOS=${platform%/*} export GOARCH=${platform##*/} - # !!! TEMPORARY HACK !!! - # See Dockerfile - if [ "$platform" == "windows/amd64" ]; then - export GOROOT="/usr/local/go${HACK_GO_VERSION}" - export PATH=$(echo "$PATH" | sed "s,:/usr/local/go/bin:,:/usr/local/go${HACK_GO_VERSION}/bin:,") - fi - if [ -z "${daemonSupporting[$platform]}" ]; then # we just need a simple client for these platforms export LDFLAGS_STATIC_DOCKER=""