| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,104 +0,0 @@ |
| 1 |
-# This file describes the standard way to build Docker, using docker |
|
| 2 |
-# |
|
| 3 |
-# Usage: |
|
| 4 |
-# |
|
| 5 |
-# # Assemble the full dev environment. This is slow the first time. |
|
| 6 |
-# docker build -t docker -f Dockerfile.gccgo . |
|
| 7 |
-# |
|
| 8 |
- |
|
| 9 |
-FROM gcc:6.1 |
|
| 10 |
- |
|
| 11 |
-# Packaged dependencies |
|
| 12 |
-RUN apt-get update && apt-get install -y \ |
|
| 13 |
- apparmor \ |
|
| 14 |
- aufs-tools \ |
|
| 15 |
- btrfs-tools \ |
|
| 16 |
- build-essential \ |
|
| 17 |
- curl \ |
|
| 18 |
- git \ |
|
| 19 |
- iptables \ |
|
| 20 |
- jq \ |
|
| 21 |
- net-tools \ |
|
| 22 |
- libapparmor-dev \ |
|
| 23 |
- libcap-dev \ |
|
| 24 |
- libsqlite3-dev \ |
|
| 25 |
- mercurial \ |
|
| 26 |
- net-tools \ |
|
| 27 |
- parallel \ |
|
| 28 |
- python-dev \ |
|
| 29 |
- python-mock \ |
|
| 30 |
- python-pip \ |
|
| 31 |
- python-websocket \ |
|
| 32 |
- --no-install-recommends |
|
| 33 |
- |
|
| 34 |
-# Get lvm2 source for compiling statically |
|
| 35 |
-RUN git clone -b v2_02_103 https://git.fedorahosted.org/git/lvm2.git /usr/local/lvm2 |
|
| 36 |
-# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags |
|
| 37 |
- |
|
| 38 |
-# Compile and install lvm2 |
|
| 39 |
-RUN cd /usr/local/lvm2 \ |
|
| 40 |
- && ./configure --enable-static_link \ |
|
| 41 |
- && make device-mapper \ |
|
| 42 |
- && make install_device-mapper |
|
| 43 |
-# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL |
|
| 44 |
- |
|
| 45 |
-# install seccomp: the version shipped in jessie is too old |
|
| 46 |
-ENV SECCOMP_VERSION v2.3.1 |
|
| 47 |
-RUN set -x \ |
|
| 48 |
- && export SECCOMP_PATH=$(mktemp -d) \ |
|
| 49 |
- && git clone https://github.com/seccomp/libseccomp.git "$SECCOMP_PATH" \ |
|
| 50 |
- && ( \ |
|
| 51 |
- cd "$SECCOMP_PATH" \ |
|
| 52 |
- && git checkout "$SECCOMP_VERSION" \ |
|
| 53 |
- && ./autogen.sh \ |
|
| 54 |
- && ./configure --prefix=/usr \ |
|
| 55 |
- && make \ |
|
| 56 |
- && make install \ |
|
| 57 |
- ) \ |
|
| 58 |
- && rm -rf "$SECCOMP_PATH" |
|
| 59 |
- |
|
| 60 |
-ENV GOPATH /go:/go/src/github.com/docker/docker/vendor |
|
| 61 |
- |
|
| 62 |
-# Get the "docker-py" source so we can run their integration tests |
|
| 63 |
-ENV DOCKER_PY_COMMIT e2655f658408f9ad1f62abdef3eb6ed43c0cf324 |
|
| 64 |
-RUN git clone https://github.com/docker/docker-py.git /docker-py \ |
|
| 65 |
- && cd /docker-py \ |
|
| 66 |
- && git checkout -q $DOCKER_PY_COMMIT |
|
| 67 |
- |
|
| 68 |
-# Add an unprivileged user to be used for tests which need it |
|
| 69 |
-RUN groupadd -r docker |
|
| 70 |
-RUN useradd --create-home --gid docker unprivilegeduser |
|
| 71 |
- |
|
| 72 |
-VOLUME /var/lib/docker |
|
| 73 |
-WORKDIR /go/src/github.com/docker/docker |
|
| 74 |
-ENV DOCKER_BUILDTAGS apparmor seccomp selinux |
|
| 75 |
- |
|
| 76 |
-# Install runc |
|
| 77 |
-ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 78 |
-RUN set -x \ |
|
| 79 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 80 |
- && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 81 |
- && cd "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 82 |
- && git checkout -q "$RUNC_COMMIT" \ |
|
| 83 |
- && make static BUILDTAGS="seccomp apparmor selinux" \ |
|
| 84 |
- && cp runc /usr/local/bin/docker-runc \ |
|
| 85 |
- && rm -rf "$GOPATH" |
|
| 86 |
- |
|
| 87 |
-# Install containerd |
|
| 88 |
-ENV CONTAINERD_COMMIT 0ac3cd1be170d180b2baed755e8f0da547ceb267 |
|
| 89 |
-RUN set -x \ |
|
| 90 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 91 |
- && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ |
|
| 92 |
- && cd "$GOPATH/src/github.com/docker/containerd" \ |
|
| 93 |
- && git checkout -q "$CONTAINERD_COMMIT" \ |
|
| 94 |
- && make static \ |
|
| 95 |
- && cp bin/containerd /usr/local/bin/docker-containerd \ |
|
| 96 |
- && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ |
|
| 97 |
- && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ |
|
| 98 |
- && rm -rf "$GOPATH" |
|
| 99 |
- |
|
| 100 |
-# Wrap all commands in the "docker-in-docker" script to allow nested containers |
|
| 101 |
-ENTRYPOINT ["hack/dind"] |
|
| 102 |
- |
|
| 103 |
-# Upload docker source |
|
| 104 |
-COPY . /go/src/github.com/docker/docker |
| ... | ... |
@@ -1,4 +1,4 @@ |
| 1 |
-.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 |
|
| 1 |
+.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 |
|
| 2 | 2 |
|
| 3 | 3 |
# set the graph driver as the current graphdriver if not set |
| 4 | 4 |
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 |
| 81 | 81 |
build: bundles init-go-pkg-cache |
| 82 | 82 |
docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)" -f "$(DOCKERFILE)" .
|
| 83 | 83 |
|
| 84 |
-build-gccgo: bundles init-go-pkg-cache |
|
| 85 |
- docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)-gccgo" -f Dockerfile.gccgo .
|
|
| 86 |
- |
|
| 87 | 84 |
bundles: |
| 88 | 85 |
mkdir bundles |
| 89 | 86 |
|
| ... | ... |
@@ -105,9 +102,6 @@ deb: build ## build the deb packages |
| 105 | 105 |
docs: ## build the docs |
| 106 | 106 |
$(MAKE) -C docs docs |
| 107 | 107 |
|
| 108 |
-gccgo: build-gccgo ## build the gcc-go linux binaries |
|
| 109 |
- $(DOCKER_FLAGS) "$(DOCKER_IMAGE)-gccgo" hack/make.sh gccgo |
|
| 110 |
- |
|
| 111 | 108 |
install: ## install the linux binaries |
| 112 | 109 |
KEEPBUNDLE=1 hack/make.sh install-binary |
| 113 | 110 |
|
| ... | ... |
@@ -3,7 +3,7 @@ |
| 3 | 3 |
# see test-integration-cli for example usage of this script |
| 4 | 4 |
|
| 5 | 5 |
base="$ABS_DEST/.." |
| 6 |
-export PATH="$base/binary-client:$base/binary-daemon:$base/dynbinary-client:$base/dynbinary-daemon:$base/gccgo:$base/dyngccgo:$PATH" |
|
| 6 |
+export PATH="$base/binary-client:$base/binary-daemon:$base/dynbinary-client:$base/dynbinary-daemon:$PATH" |
|
| 7 | 7 |
|
| 8 | 8 |
if ! command -v docker &> /dev/null; then |
| 9 | 9 |
echo >&2 'error: binary-client or dynbinary-client must be run before .integration-daemon-start' |
| ... | ... |
@@ -12,9 +12,4 @@ bundle_cover() {
|
| 12 | 12 |
done |
| 13 | 13 |
} |
| 14 | 14 |
|
| 15 |
-if [ "$HAVE_GO_TEST_COVER" ]; then |
|
| 16 |
- bundle_cover 2>&1 | tee "$DEST/report.log" |
|
| 17 |
-else |
|
| 18 |
- echo >&2 'warning: the current version of go does not support -cover' |
|
| 19 |
- echo >&2 ' skipping test coverage report' |
|
| 20 |
-fi |
|
| 15 |
+bundle_cover 2>&1 | tee "$DEST/report.log" |
| 21 | 16 |
deleted file mode 100644 |
| ... | ... |
@@ -1,11 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-( |
|
| 5 |
- export IAMSTATIC="false" |
|
| 6 |
- export EXTLDFLAGS_STATIC='' |
|
| 7 |
- export LDFLAGS_STATIC_DOCKER='' |
|
| 8 |
- export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
|
|
| 9 |
- export BUILDFLAGS=( "${BUILDFLAGS[@]/static_build /}" ) # we're not building a "static" binary here
|
|
| 10 |
- source "${MAKEDIR}/gccgo"
|
|
| 11 |
-) |
| 12 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,68 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-BINARY_NAME="dockerd-$VERSION" |
|
| 5 |
-BINARY_EXTENSION="$(binary_extension)" |
|
| 6 |
-BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION" |
|
| 7 |
- |
|
| 8 |
-PROXY_NAME="docker-proxy-$VERSION" |
|
| 9 |
-PROXY_FULLNAME="$PROXY_NAME$BINARY_EXTENSION" |
|
| 10 |
- |
|
| 11 |
-CLIENTBIN_NAME="docker-$VERSION" |
|
| 12 |
-CLIENTBIN_FULLNAME="$CLIENTBIN_NAME$BINARY_EXTENSION" |
|
| 13 |
- |
|
| 14 |
-source "${MAKEDIR}/.go-autogen"
|
|
| 15 |
- |
|
| 16 |
-if [[ "${BUILDFLAGS[@]}" =~ 'netgo ' ]]; then
|
|
| 17 |
- EXTLDFLAGS_STATIC+=' -lnetgo' |
|
| 18 |
-fi |
|
| 19 |
-# gccgo require explicit flag -pthread to allow goroutines to work. |
|
| 20 |
-go build -compiler=gccgo \ |
|
| 21 |
- -o "$DEST/$BINARY_FULLNAME" \ |
|
| 22 |
- "${BUILDFLAGS[@]}" \
|
|
| 23 |
- -gccgoflags " |
|
| 24 |
- -g |
|
| 25 |
- $EXTLDFLAGS_STATIC |
|
| 26 |
- -Wl,--no-export-dynamic |
|
| 27 |
- -ldl |
|
| 28 |
- -pthread |
|
| 29 |
- " \ |
|
| 30 |
- ./cmd/dockerd |
|
| 31 |
- |
|
| 32 |
-echo "Created binary: $DEST/$BINARY_FULLNAME" |
|
| 33 |
-ln -sf "$BINARY_FULLNAME" "$DEST/dockerd$BINARY_EXTENSION" |
|
| 34 |
- |
|
| 35 |
-go build -compiler=gccgo \ |
|
| 36 |
- -o "$DEST/$PROXY_FULLNAME" \ |
|
| 37 |
- "${BUILDFLAGS[@]}" \
|
|
| 38 |
- -gccgoflags " |
|
| 39 |
- -g |
|
| 40 |
- $EXTLDFLAGS_STATIC |
|
| 41 |
- -Wl,--no-export-dynamic |
|
| 42 |
- -ldl |
|
| 43 |
- -pthread |
|
| 44 |
- " \ |
|
| 45 |
- ./vendor/src/github.com/docker/libnetwork/cmd/proxy |
|
| 46 |
- |
|
| 47 |
-echo "Created binary: $DEST/$PROXY_FULLNAME" |
|
| 48 |
-ln -sf "$PROXY_FULLNAME" "$DEST/docker-proxy$BINARY_EXTENSION" |
|
| 49 |
- |
|
| 50 |
-copy_containerd "$DEST" "hash" |
|
| 51 |
-hash_files "$DEST/$BINARY_FULLNAME" |
|
| 52 |
- |
|
| 53 |
-go build -compiler=gccgo \ |
|
| 54 |
- -o "$DEST/$CLIENTBIN_FULLNAME" \ |
|
| 55 |
- "${BUILDFLAGS[@]}" \
|
|
| 56 |
- -gccgoflags " |
|
| 57 |
- -g |
|
| 58 |
- $EXTLDFLAGS_STATIC |
|
| 59 |
- -Wl,--no-export-dynamic |
|
| 60 |
- -ldl |
|
| 61 |
- -pthread |
|
| 62 |
- " \ |
|
| 63 |
- ./cmd/docker |
|
| 64 |
- |
|
| 65 |
-echo "Created binary: $DEST/$CLIENTBIN_FULLNAME" |
|
| 66 |
-ln -sf "$CLIENTBIN_FULLNAME" "$DEST/docker$BINARY_EXTENSION" |
|
| 67 |
-hash_files "$DEST/$CLIENTBIN_FULLNAME" |
|
| 68 |
- |
| ... | ... |
@@ -34,13 +34,7 @@ bundle_test_unit() {
|
| 34 | 34 |
| grep -v github.com/docker/docker/vendor \ |
| 35 | 35 |
| grep -v github.com/docker/docker/man \ |
| 36 | 36 |
| grep -v github.com/docker/docker/integration-cli) |
| 37 |
- go test $COVER $GCCGOFLAGS -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list
|
|
| 37 |
+ go test -cover -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list
|
|
| 38 | 38 |
} |
| 39 | 39 |
|
| 40 |
- |
|
| 41 |
-if [[ "$(go version)" == *"gccgo"* ]]; then |
|
| 42 |
- GCCGOFLAGS=-gccgoflags="-lpthread" |
|
| 43 |
-else |
|
| 44 |
- COVER=-cover |
|
| 45 |
-fi |
|
| 46 | 40 |
bundle_test_unit 2>&1 | tee -a "$DEST/test.log" |
| ... | ... |
@@ -47,7 +47,7 @@ func (s *DockerSuite) TestEventsRedirectStdout(c *check.C) {
|
| 47 | 47 |
} |
| 48 | 48 |
|
| 49 | 49 |
func (s *DockerSuite) TestEventsOOMDisableFalse(c *check.C) {
|
| 50 |
- testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotGCCGO, swapMemorySupport) |
|
| 50 |
+ testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, swapMemorySupport) |
|
| 51 | 51 |
|
| 52 | 52 |
errChan := make(chan error) |
| 53 | 53 |
go func() {
|
| ... | ... |
@@ -77,7 +77,7 @@ func (s *DockerSuite) TestEventsOOMDisableFalse(c *check.C) {
|
| 77 | 77 |
} |
| 78 | 78 |
|
| 79 | 79 |
func (s *DockerSuite) TestEventsOOMDisableTrue(c *check.C) {
|
| 80 |
- testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotGCCGO, NotArm, swapMemorySupport) |
|
| 80 |
+ testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotArm, swapMemorySupport) |
|
| 81 | 81 |
|
| 82 | 82 |
errChan := make(chan error) |
| 83 | 83 |
observer, err := newEventObserver(c) |
| ... | ... |
@@ -3495,7 +3495,7 @@ func (s *DockerSuite) TestPtraceContainerProcsFromHost(c *check.C) {
|
| 3495 | 3495 |
|
| 3496 | 3496 |
func (s *DockerSuite) TestAppArmorDeniesPtrace(c *check.C) {
|
| 3497 | 3497 |
// Not applicable on Windows as uses Unix specific functionality |
| 3498 |
- testRequires(c, SameHostDaemon, Apparmor, DaemonIsLinux, NotGCCGO) |
|
| 3498 |
+ testRequires(c, SameHostDaemon, Apparmor, DaemonIsLinux) |
|
| 3499 | 3499 |
|
| 3500 | 3500 |
// Run through 'sh' so we are NOT pid 1. Pid 1 may be able to trace |
| 3501 | 3501 |
// itself, but pid>1 should not be able to trace pid1. |
| ... | ... |
@@ -611,8 +611,7 @@ func (s *DockerSuite) TestRunOOMExitCode(c *check.C) {
|
| 611 | 611 |
errChan := make(chan error) |
| 612 | 612 |
go func() {
|
| 613 | 613 |
defer close(errChan) |
| 614 |
- //changing memory to 40MB from 4MB due to an issue with GCCGO that test fails to start the container. |
|
| 615 |
- out, exitCode, _ := dockerCmdWithError("run", "-m", "40MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
|
|
| 614 |
+ out, exitCode, _ := dockerCmdWithError("run", "-m", "4MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
|
|
| 616 | 615 |
if expected := 137; exitCode != expected {
|
| 617 | 616 |
errChan <- fmt.Errorf("wrong exit code for OOM container: expected %d, got %d (output: %q)", expected, exitCode, out)
|
| 618 | 617 |
} |
| ... | ... |
@@ -153,16 +153,6 @@ var ( |
| 153 | 153 |
}, |
| 154 | 154 |
"Test requires support for IPv6", |
| 155 | 155 |
} |
| 156 |
- NotGCCGO = testRequirement{
|
|
| 157 |
- func() bool {
|
|
| 158 |
- out, err := exec.Command("go", "version").Output()
|
|
| 159 |
- if err == nil && strings.Contains(string(out), "gccgo") {
|
|
| 160 |
- return false |
|
| 161 |
- } |
|
| 162 |
- return true |
|
| 163 |
- }, |
|
| 164 |
- "Test requires native Golang compiler instead of GCCGO", |
|
| 165 |
- } |
|
| 166 | 156 |
UserNamespaceInKernel = testRequirement{
|
| 167 | 157 |
func() bool {
|
| 168 | 158 |
if _, err := os.Stat("/proc/self/uid_map"); os.IsNotExist(err) {
|