diff --git a/Dockerfile.gccgo b/Dockerfile.gccgo deleted file mode 100644 index fc63a5c32b..0000000000 --- a/Dockerfile.gccgo +++ /dev/null @@ -1,104 +0,0 @@ -# This file describes the standard way to build Docker, using docker -# -# Usage: -# -# # Assemble the full dev environment. This is slow the first time. -# docker build -t docker -f Dockerfile.gccgo . -# - -FROM gcc:6.1 - -# Packaged dependencies -RUN apt-get update && apt-get install -y \ - apparmor \ - aufs-tools \ - btrfs-tools \ - build-essential \ - curl \ - git \ - iptables \ - jq \ - net-tools \ - libapparmor-dev \ - libcap-dev \ - libsqlite3-dev \ - mercurial \ - net-tools \ - parallel \ - python-dev \ - python-mock \ - python-pip \ - python-websocket \ - --no-install-recommends - -# Get lvm2 source for compiling statically -RUN git clone -b v2_02_103 https://git.fedorahosted.org/git/lvm2.git /usr/local/lvm2 -# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags - -# Compile and install lvm2 -RUN cd /usr/local/lvm2 \ - && ./configure --enable-static_link \ - && make device-mapper \ - && make install_device-mapper -# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL - -# install seccomp: the version shipped in jessie is too old -ENV SECCOMP_VERSION v2.3.1 -RUN set -x \ - && export SECCOMP_PATH=$(mktemp -d) \ - && git clone https://github.com/seccomp/libseccomp.git "$SECCOMP_PATH" \ - && ( \ - cd "$SECCOMP_PATH" \ - && git checkout "$SECCOMP_VERSION" \ - && ./autogen.sh \ - && ./configure --prefix=/usr \ - && make \ - && make install \ - ) \ - && rm -rf "$SECCOMP_PATH" - -ENV GOPATH /go:/go/src/github.com/docker/docker/vendor - -# Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT e2655f658408f9ad1f62abdef3eb6ed43c0cf324 -RUN git clone https://github.com/docker/docker-py.git /docker-py \ - && cd /docker-py \ - && git checkout -q $DOCKER_PY_COMMIT - -# Add an unprivileged user to be used for tests which need it -RUN groupadd -r docker -RUN useradd --create-home --gid docker unprivilegeduser - -VOLUME /var/lib/docker -WORKDIR /go/src/github.com/docker/docker -ENV DOCKER_BUILDTAGS apparmor seccomp selinux - -# Install runc -ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ - && cd "$GOPATH/src/github.com/opencontainers/runc" \ - && git checkout -q "$RUNC_COMMIT" \ - && make static BUILDTAGS="seccomp apparmor selinux" \ - && cp runc /usr/local/bin/docker-runc \ - && rm -rf "$GOPATH" - -# Install containerd -ENV CONTAINERD_COMMIT 0ac3cd1be170d180b2baed755e8f0da547ceb267 -RUN set -x \ - && export GOPATH="$(mktemp -d)" \ - && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ - && cd "$GOPATH/src/github.com/docker/containerd" \ - && git checkout -q "$CONTAINERD_COMMIT" \ - && make static \ - && cp bin/containerd /usr/local/bin/docker-containerd \ - && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ - && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ - && rm -rf "$GOPATH" - -# Wrap all commands in the "docker-in-docker" script to allow nested containers -ENTRYPOINT ["hack/dind"] - -# Upload docker source -COPY . /go/src/github.com/docker/docker diff --git a/Makefile b/Makefile index 838880a737..8e809a548d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all binary build build-gccgo cross deb docs gccgo help init-go-pkg-cache install manpages rpm run shell test test-docker-py test-integration-cli tgz test-unit validate win +.PHONY: all binary build cross deb docs help init-go-pkg-cache install manpages rpm run shell test test-docker-py test-integration-cli tgz test-unit validate win # set the graph driver as the current graphdriver if not set DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //')) @@ -81,9 +81,6 @@ binary: build ## build the linux binaries build: bundles init-go-pkg-cache docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)" -f "$(DOCKERFILE)" . -build-gccgo: bundles init-go-pkg-cache - docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)-gccgo" -f Dockerfile.gccgo . - bundles: mkdir bundles @@ -105,9 +102,6 @@ deb: build ## build the deb packages docs: ## build the docs $(MAKE) -C docs docs -gccgo: build-gccgo ## build the gcc-go linux binaries - $(DOCKER_FLAGS) "$(DOCKER_IMAGE)-gccgo" hack/make.sh gccgo - install: ## install the linux binaries KEEPBUNDLE=1 hack/make.sh install-binary diff --git a/hack/make/.integration-daemon-start b/hack/make/.integration-daemon-start index 61324081c4..61ba6fccac 100644 --- a/hack/make/.integration-daemon-start +++ b/hack/make/.integration-daemon-start @@ -3,7 +3,7 @@ # see test-integration-cli for example usage of this script base="$ABS_DEST/.." -export PATH="$base/binary-client:$base/binary-daemon:$base/dynbinary-client:$base/dynbinary-daemon:$base/gccgo:$base/dyngccgo:$PATH" +export PATH="$base/binary-client:$base/binary-daemon:$base/dynbinary-client:$base/dynbinary-daemon:$PATH" if ! command -v docker &> /dev/null; then echo >&2 'error: binary-client or dynbinary-client must be run before .integration-daemon-start' diff --git a/hack/make/cover b/hack/make/cover index 624943b8aa..08e28e3fea 100644 --- a/hack/make/cover +++ b/hack/make/cover @@ -12,9 +12,4 @@ bundle_cover() { done } -if [ "$HAVE_GO_TEST_COVER" ]; then - bundle_cover 2>&1 | tee "$DEST/report.log" -else - echo >&2 'warning: the current version of go does not support -cover' - echo >&2 ' skipping test coverage report' -fi +bundle_cover 2>&1 | tee "$DEST/report.log" diff --git a/hack/make/dyngccgo b/hack/make/dyngccgo deleted file mode 100644 index a9019e8cfa..0000000000 --- a/hack/make/dyngccgo +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -e - -( - export IAMSTATIC="false" - export EXTLDFLAGS_STATIC='' - export LDFLAGS_STATIC_DOCKER='' - export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary - export BUILDFLAGS=( "${BUILDFLAGS[@]/static_build /}" ) # we're not building a "static" binary here - source "${MAKEDIR}/gccgo" -) diff --git a/hack/make/gccgo b/hack/make/gccgo deleted file mode 100644 index 54c983eb2e..0000000000 --- a/hack/make/gccgo +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -set -e - -BINARY_NAME="dockerd-$VERSION" -BINARY_EXTENSION="$(binary_extension)" -BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION" - -PROXY_NAME="docker-proxy-$VERSION" -PROXY_FULLNAME="$PROXY_NAME$BINARY_EXTENSION" - -CLIENTBIN_NAME="docker-$VERSION" -CLIENTBIN_FULLNAME="$CLIENTBIN_NAME$BINARY_EXTENSION" - -source "${MAKEDIR}/.go-autogen" - -if [[ "${BUILDFLAGS[@]}" =~ 'netgo ' ]]; then - EXTLDFLAGS_STATIC+=' -lnetgo' -fi -# gccgo require explicit flag -pthread to allow goroutines to work. -go build -compiler=gccgo \ - -o "$DEST/$BINARY_FULLNAME" \ - "${BUILDFLAGS[@]}" \ - -gccgoflags " - -g - $EXTLDFLAGS_STATIC - -Wl,--no-export-dynamic - -ldl - -pthread - " \ - ./cmd/dockerd - -echo "Created binary: $DEST/$BINARY_FULLNAME" -ln -sf "$BINARY_FULLNAME" "$DEST/dockerd$BINARY_EXTENSION" - -go build -compiler=gccgo \ - -o "$DEST/$PROXY_FULLNAME" \ - "${BUILDFLAGS[@]}" \ - -gccgoflags " - -g - $EXTLDFLAGS_STATIC - -Wl,--no-export-dynamic - -ldl - -pthread - " \ - ./vendor/src/github.com/docker/libnetwork/cmd/proxy - -echo "Created binary: $DEST/$PROXY_FULLNAME" -ln -sf "$PROXY_FULLNAME" "$DEST/docker-proxy$BINARY_EXTENSION" - -copy_containerd "$DEST" "hash" -hash_files "$DEST/$BINARY_FULLNAME" - -go build -compiler=gccgo \ - -o "$DEST/$CLIENTBIN_FULLNAME" \ - "${BUILDFLAGS[@]}" \ - -gccgoflags " - -g - $EXTLDFLAGS_STATIC - -Wl,--no-export-dynamic - -ldl - -pthread - " \ - ./cmd/docker - -echo "Created binary: $DEST/$CLIENTBIN_FULLNAME" -ln -sf "$CLIENTBIN_FULLNAME" "$DEST/docker$BINARY_EXTENSION" -hash_files "$DEST/$CLIENTBIN_FULLNAME" - diff --git a/hack/make/test-unit b/hack/make/test-unit index 80c327ccba..24b79bd374 100644 --- a/hack/make/test-unit +++ b/hack/make/test-unit @@ -34,13 +34,7 @@ bundle_test_unit() { | grep -v github.com/docker/docker/vendor \ | grep -v github.com/docker/docker/man \ | grep -v github.com/docker/docker/integration-cli) - go test $COVER $GCCGOFLAGS -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list + go test -cover -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list } - -if [[ "$(go version)" == *"gccgo"* ]]; then - GCCGOFLAGS=-gccgoflags="-lpthread" -else - COVER=-cover -fi bundle_test_unit 2>&1 | tee -a "$DEST/test.log" diff --git a/integration-cli/docker_cli_events_unix_test.go b/integration-cli/docker_cli_events_unix_test.go index 0f3ead3cd2..92832bb7cb 100644 --- a/integration-cli/docker_cli_events_unix_test.go +++ b/integration-cli/docker_cli_events_unix_test.go @@ -47,7 +47,7 @@ func (s *DockerSuite) TestEventsRedirectStdout(c *check.C) { } func (s *DockerSuite) TestEventsOOMDisableFalse(c *check.C) { - testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotGCCGO, swapMemorySupport) + testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, swapMemorySupport) errChan := make(chan error) go func() { @@ -77,7 +77,7 @@ func (s *DockerSuite) TestEventsOOMDisableFalse(c *check.C) { } func (s *DockerSuite) TestEventsOOMDisableTrue(c *check.C) { - testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotGCCGO, NotArm, swapMemorySupport) + testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotArm, swapMemorySupport) errChan := make(chan error) observer, err := newEventObserver(c) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 8e659e551a..bdc6d620a9 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -3495,7 +3495,7 @@ func (s *DockerSuite) TestPtraceContainerProcsFromHost(c *check.C) { func (s *DockerSuite) TestAppArmorDeniesPtrace(c *check.C) { // Not applicable on Windows as uses Unix specific functionality - testRequires(c, SameHostDaemon, Apparmor, DaemonIsLinux, NotGCCGO) + testRequires(c, SameHostDaemon, Apparmor, DaemonIsLinux) // Run through 'sh' so we are NOT pid 1. Pid 1 may be able to trace // itself, but pid>1 should not be able to trace pid1. diff --git a/integration-cli/docker_cli_run_unix_test.go b/integration-cli/docker_cli_run_unix_test.go index e7d4a20b15..53f44b87cf 100644 --- a/integration-cli/docker_cli_run_unix_test.go +++ b/integration-cli/docker_cli_run_unix_test.go @@ -611,8 +611,7 @@ func (s *DockerSuite) TestRunOOMExitCode(c *check.C) { errChan := make(chan error) go func() { defer close(errChan) - //changing memory to 40MB from 4MB due to an issue with GCCGO that test fails to start the container. - out, exitCode, _ := dockerCmdWithError("run", "-m", "40MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done") + out, exitCode, _ := dockerCmdWithError("run", "-m", "4MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done") if expected := 137; exitCode != expected { errChan <- fmt.Errorf("wrong exit code for OOM container: expected %d, got %d (output: %q)", expected, exitCode, out) } diff --git a/integration-cli/requirements.go b/integration-cli/requirements.go index a9fe468e47..51bc603154 100644 --- a/integration-cli/requirements.go +++ b/integration-cli/requirements.go @@ -153,16 +153,6 @@ var ( }, "Test requires support for IPv6", } - NotGCCGO = testRequirement{ - func() bool { - out, err := exec.Command("go", "version").Output() - if err == nil && strings.Contains(string(out), "gccgo") { - return false - } - return true - }, - "Test requires native Golang compiler instead of GCCGO", - } UserNamespaceInKernel = testRequirement{ func() bool { if _, err := os.Stat("/proc/self/uid_map"); os.IsNotExist(err) {