Commit Graph

204 Commits

Author SHA1 Message Date
a8b3ac7249 Remove cmd/docker and other directories in cli/ in accordance with the new Moby project scope
Starting with this commit, integration tests should no longer rely on
the docker cli, they should be API tests instead. For the existing tests
the scripts will use a frozen version of the docker cli with a
DOCKER_API_VERSION frozen to 1.30, which should ensure that the CI remains
green at all times.

To help contributors develop and test manually with a modified docker
cli, this commit also adds a DOCKER_CLI_PATH environment variable to the
Makefile. This allows to set the path of a custom cli that will be
available inside the development container and used to run the
integration tests.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 32915b1d0a315598edb737785d0357b5a1b8aa11
Component: engine
2017-05-05 12:14:29 -07:00
1d33c2f300 Fix inContainer detection which CROSSPLATFORM env variable missing
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b985db92a3d60ac5485474145c15d3d0bc5571ff
Component: engine
2017-03-02 14:36:37 +01:00
f31ca9220e Force copy on make install to avoid Text file busy error
Signed-off-by: Christophe Mehay <cmehay@online.net>
Upstream-commit: 01273ad85f334ff0ae141cfa8ab0e52ca895fd3d
Component: engine
2017-02-13 14:17:06 +01:00
ba62bc02bb Merge pull request #30290 from vdemeester/carry-pr-27834
Carry #27834 — Do not require `.git` in the build context
Upstream-commit: 4af2555a353a8f407c49adb57877ead436af04be
Component: engine
2017-02-04 19:19:16 -08:00
ba32ae9bba Bind mount .git 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 617be0ef2bbbce6f0e908734f8a5f2b6a7b93877
Component: engine
2017-02-03 21:00:32 +01:00
21a0759342 Fix installation using make install
The following command fails when the target directory does not exist.

	$ sudo make install DOCKER_MAKE_INSTALL_PREFIX=/opt/docker AUTO_GOPATH=1
	KEEPBUNDLE=1 hack/make.sh install-binary
	# WARNING! I don't seem to be running in a Docker container.
	# The result of this command might be an incorrect build, and will not be
	# officially supported.
	#
	# Try this instead: make all
	#

	---> Making bundle: install-binary (in bundles/1.14.0-dev/install-binary)
	Installing docker to /opt/docker/bin/
	cp: cannot create regular file '/opt/docker/bin/': No such file or directory
	make: *** [Makefile:119: install] Error 1

The patch installs the target directory before copying any binaries.

	$ sudo make install DOCKER_MAKE_INSTALL_PREFIX=/opt/docker AUTO_GOPATH=1
	KEEPBUNDLE=1 hack/make.sh install-binary
	# WARNING! I don't seem to be running in a Docker container.
	# The result of this command might be an incorrect build, and will not be
	# officially supported.
	#
	# Try this instead: make all
	#

	---> Making bundle: install-binary (in bundles/1.14.0-dev/install-binary)
	Installing docker to /opt/docker/bin/
	Installing dockerd to /opt/docker/bin/
	Installing docker-runc to /opt/docker/bin/
	Installing docker-containerd to /opt/docker/bin/
	Installing docker-containerd-ctr to /opt/docker/bin/
	Installing docker-containerd-shim to /opt/docker/bin/
	Installing docker-proxy to /opt/docker/bin/
	Installing docker-init to /opt/docker/bin/

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Upstream-commit: 425cd7d1c5c17af5eeebc241d289d81519e748ab
Component: engine
2017-01-27 17:34:38 -05:00
7e467dc7f7 Do not required .git in the build context
- export DOCKER_GITCOMMIT in the Makefile
- prioritize DOCKER_GITCOMMIT against the `git` command in
  `./hack/make.sh`
- Also add `integration-cli/bundles` to gitignore (it's generated when
  using integration-cli shell)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fae6ca2bb42d9c4146df413bcce701431298161c
Component: engine
2017-01-24 14:42:57 +01:00
ecfeb35159 Remove sqlite
This drops support for migrations from pre-1.10 Docker versions, which
should be done via an external tool or an intermediate upgrade.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: f8119bb7a76b5c42defb6e0a2dc67bd77ad29a5e
Component: engine
2017-01-18 12:27:21 +00:00
ed70bdfd73 hack/make.sh: fix BUILDTIME
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 7b1f77dcbc4c7cda754613f424f937056d3206ec
Component: engine
2016-12-03 09:09:41 +01:00
a498054fff Remove old Windows hack in make.sh
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5e6f8cb4a7f8bf294b3b459d2c2afed6d69fcdf1
Component: engine
2016-11-16 09:29:38 -08:00
fadee20b95 Build docker incrementally by default
This speeds up docker build time drastically. It still possible to
disable this by setting `DOCKER_INCREMENTAL_BUILD` to `0` (and this is
what should be done on the CI).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2c342cff79d6e781e06258cefcd2b2b1a23396ec
Component: engine
2016-11-15 16:23:48 +01:00
61646d77af project: use vndr for vendoring
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f2614f2107c838d014d31b806e3b8a9f1395cb2b
Component: engine
2016-11-03 15:31:46 -07:00
dd0403a2eb Move validation out of hack/make
Allow each script to run directly without the hack/make.sh wrapper. These
scripts do not produce artifacts and do not benefit from the "bundles"
framework.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 22033e10034884734621f185b60ddaa119014480
Component: engine
2016-11-03 14:24:22 -06:00
34bac6f06e Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e6866492c4492db3bb9546afa2fbaed20f4c1883
Component: engine
2016-10-29 15:03:26 +08:00
ea2938292a Merge pull request #27519 from justincormack/proxy-build
Build docker-proxy from git checkout like other external binaries
Upstream-commit: 36f47aa2527f83d7ca7254c43eb08ffc5ce1102e
Component: engine
2016-10-25 08:54:13 -07:00
44e77a4b4f Build docker-proxy from git checkout like other external binaries
This means we can vendor libnetwork without special casing, and
it is built the same way as the other external binaries.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 3996975b0840033bda3919440d122d734a4bc66b
Component: engine
2016-10-25 13:13:22 +01:00
9a299b360f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7781a1bf0fef748877326632b88e92fbf3c90daa
Component: engine
2016-10-24 15:20:01 -07:00
8a1347213b Bump remaining Dockerfile go versions to 1.7.1
These weren't updated with the switch to go1.7.1

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: f431211631f0dd68ec41c970e5b951c5141e3f9b
Component: engine
2016-09-26 12:13:39 -04:00
8ee0f56810 Add init process for zombie fighting
This adds a small C binary for fighting zombies.  It is mounted under
`/dev/init` and is prepended to the args specified by the user.  You
enable it via a daemon flag, `dockerd --init`, as it is disable by
default for backwards compat.

You can also override the daemon option or specify this on a per
container basis with `docker run --init=true|false`.

You can test this by running a process like this as the pid 1 in a
container and see the extra zombie that appears in the container as it
is running.

```c

int main(int argc, char ** argv) {
	pid_t pid = fork();
	if (pid == 0) {
		pid = fork();
		if (pid == 0) {
			exit(0);
		}
		sleep(3);
		exit(0);
	}
	printf("got pid %d and exited\n", pid);
	sleep(20);
}
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: ee3ac3aa66bfb27b7c21dfb253fdaa113baedd4e
Component: engine
2016-09-19 17:33:50 -07:00
b03700a5d5 Verify integration tests before building bundles
Adds a new bundle `verify-integration-tests` which pre-compiles a test
binary for the integration tests.

This makes sure that the integration tests will actually compile before
doing other tasks which take much longer, such as building dockerd and
loading test fixtures.
When it comes time to actually run the tests, the pre-compiled binary
will be used so it doesn't have to compile the tests a 2nd time.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4d0275c8192ca39d88f7dbe1e59ec03b544b6696
Component: engine
2016-09-06 20:27:28 -04:00
0f0bfaaffb Bump go to 1.7
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 12e2c2687e5c1f47287aa3668c8853ee8b5d6706
Component: engine
2016-08-21 19:04:15 +02:00
75edb24b6f Disable coverage on test-integration-cli
Temporarly remove cover bundle from defaults.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5ec6e11e157b94d56bc2d7aa8e94cf7e72f51871
Component: engine
2016-08-18 22:12:24 +02:00
aa2e0abc3e Support interactive integration testing.
Interactive integration testing is useful when you're developing new tests, or
making changes to cli code.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1d945a9743748373cd5c5bfface3209d241007d7
Component: engine
2016-08-05 12:07:28 -04:00
b9565b1842 bump Go to 1.6.3
following the announcement;
https://groups.google.com/forum/m/#!topic/golang-announce/7JTsd70ZAT0

> [security] Go 1.6.3 and Go 1.7rc2 pre-announcement
>
> Hello gophers,
> We plan to issue Go 1.6.3 and Go 1.7rc2 on Monday July 18 at approximately 2am UTC.
> These are minor release to fix a security issue.
>
> Following our policy at https://golang.org/security, this is the pre-announcement of those releases.
>
> Because we are so late in the release cycle for Go 1.7, we will not issue a minor release of Go 1.5.
> Additionally, we plan to issue Go 1.7rc3 later next week, which will include any changes between 1.7rc1 and tip.
>
> Cheers,
> Chris on behalf of the Go team

**Note:**
the man/Dockerfile is not yet updated, because
the official image for Go 1.6.2 has not yet
been updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 589bafddf391cbf6aff8b22044266dc819cdcaeb
Component: engine
2016-07-18 23:15:03 +02:00
1d2d19ec51 Merge pull request #23215 from BlackYoup/pkg-config
make.sh: use PKG_CONFIG environment variable if it exists
Upstream-commit: 726ef47d5c50c329b5b0c30f3a0612cc7ee241b3
Component: engine
2016-06-03 15:04:37 +02:00
56f0d7968e Add make install task
This installs docker and dockerd to `$DOCKER_MAKE_INSTALL_PREFIX/bin`, which
defaults to `/usr/local/bin`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9bb54f89ad26015c79dab7c5ac210cb846e0713b
Component: engine
2016-06-03 12:08:33 +02:00
22121ca2b2 Use PKG_CONFIG environment variable if it exists
pkg-config is not always available in the path
so let people choose where it's located

Signed-off-by: Arnaud Lefebvre <a.lefebvre@outlook.fr>
Upstream-commit: 20bf00dfa56ef9584d25777031ac4d11360386a8
Component: engine
2016-06-02 21:53:28 +02:00
d552c414d4 Windows: work around Go 1.6.2/Nano Server TP5 issue
This works around golang/go#15286 by explicitly loading shell32.dll at
load time, ensuring that syscall can load it dynamically during process
startup.

Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: fa82c0aa10cfac8c6d5e2446876dc79b2b0c1bf9
Component: engine
2016-05-25 11:59:28 +02:00
3a35464d9d Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: 86d8758e2bb5e9d21d454ceda90b33feb8e74771
Component: engine
2016-05-23 16:37:12 -07:00
86a8cdbb4b Raise a more relevant error when dockerd is not available on the platform.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8983d42988ad59f1a19a0f4e9e88dfec8b1be690
Component: engine
2016-05-02 11:59:25 -04:00
dcd6f9747a Build two binaries client and daemon.
Add a proxy to support 'docker daemon'
Fix configFile option, and remove a test that is no longer relevant.
Remove daemon build tag.
Remove DOCKER_CLIENTONLY from build scripts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Change docker-daemon to dockerd.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9e7651db4d464649bc32cf346fdee8c6900ebe0f
Component: engine
2016-04-22 11:26:01 -04:00
7e728fb00f Fix detection of git commit during build from tarball
Distro packagers will often use the tarball to build a package and have
the build script for the package in git. To avoid that the docker build
script picks up the git commit from the distro repo we also check for a
directory named .git before check for -unsupported builds.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
Upstream-commit: 355ad33087c1c683458b60a6bc9e1f89623ee275
Component: engine
2016-04-14 17:30:18 +02:00
43be88856e Improve source for containerd/runc copy
This improves getting the source for the binaries that are compiled on
the system so that they can be copied into the bundles output.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 45fb80331662b107ee523d184aef83fa3cae97f2
Component: engine
2016-04-11 12:02:01 -07:00
b882239dcc Merge pull request #21591 from riyazdf/hardware-signing-non-experimental
move hardware signing out of experimental, remove yubico-piv-tool deps
Upstream-commit: d800be743db5bcd1bfdcd948619af5811ff7aec8
Component: engine
2016-03-30 00:09:22 -04:00
8080d1d7e4 move hardware signing out of experimental, remove dependencies to yubico-piv-tool
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 8d18e6b30f0a33463c749079d87cad8fa9c19d52
Component: engine
2016-03-28 14:33:06 -07:00
4ae1bedbae Add support for repeating integration tests
`TEST_REPEAT=n` runs the test suite again n times or
until the first failure without doing building and
daemon setup. Useful for debugging flaky tests.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 477fe4846ac72a77d7b045d1b5619bc7cfdbb9aa
Component: engine
2016-03-26 23:05:55 -07:00
d3263a9591 Added a better message for when we build an unsupported version
Signed-off-by: Ken Cochrane <kencochrane@gmail.com>
Upstream-commit: 181d2725d7ac8da5174b1a13d3ee413057af57b8
Component: engine
2016-03-25 10:09:03 -04:00
ba23c7ef71 Revert "Merge pull request #21003 from riyazdf/hardware-signing-ga"
This reverts commit e6d3a9849c96201681915944947a0e5452619929, reversing
changes made to d3afe34b51e7588984cc21a2f48da116645e52e3.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: dd33d18045e50a198d3d75db8fba12f126e93937
Component: engine
2016-03-24 21:12:52 -07:00
d716d49ce7 Remove the verbosity of copy_containerd
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2164018d82a7c9857c8196b863a538f5d47f5265
Component: engine
2016-03-23 20:51:48 +01:00
661ca233b2 Fix release.sh script
Use aws instead of s3cmd.
Make sure the release script works with the docker-prepended binary
names.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: dd51e85c050076be09fc7414bda1f261b61e60ad
Component: engine
2016-03-23 11:59:21 -04:00
ce07920e99 Add docker- prefix to runc and containerd binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 009399dc8ed8a4b635b0e229bf07b685e286d8d9
Component: engine
2016-03-23 00:52:16 -04:00
8c7ac04699 Export GOOS and GOARCH in subprocess for tgz
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5ff66748daecb9674b22983b84ac95c76e04ed00
Component: engine
2016-03-22 15:43:06 -07:00
dbc8de7ddc Add function for copy containerd
This adds a function for copying containerd and other binaries as well
as adding a hash for those files.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 78568f2eb54a6455dad566923f3c6f03ac300405
Component: engine
2016-03-22 12:06:56 -07:00
1071163f90 Merge pull request #21003 from riyazdf/hardware-signing-ga
Move hardware signing out of experimental
Upstream-commit: e6d3a9849c96201681915944947a0e5452619929
Component: engine
2016-03-17 14:16:40 -04:00
937fbaecf3 Merge pull request #21131 from estesp/gcc-devmapper-test-broken
Fix gcc compile test with proper flag ordering
Upstream-commit: 3771a1713bac935721ffe2ed7c828a47dbe4924e
Component: engine
2016-03-14 09:46:49 -07:00
e515f9e88b Fix gcc compile test with proper flag ordering
This test for libdevmapper was always silently failing because the
linker never got the `-ldevmapper` information. Putting the flag last
corrects the test.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: e2076453071f9fc82478557919d327c958eec712
Component: engine
2016-03-11 15:08:58 -05:00
86b3710469 use per-check timeouts
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 11d3f7092e38e1e90d926595c5a4ab9ff0da535c
Component: engine
2016-03-11 14:38:52 -05:00
6a7d53836d Move pkcs11 out of experimental, into GA
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 37fa75b3447007bb8ea311f02610bb383b0db77f
Component: engine
2016-03-07 10:07:40 -08:00
d4eaa45a84 Windows CI: Bump timeout for tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6a1ae187d081a5023493ab20fe41ba8a768d62bf
Component: engine
2016-03-04 09:36:46 -08:00
307185d18b Merge pull request #20617 from nalind/journald-pkgconfig
Try to handle changing names for journal packages
Upstream-commit: 36401f20ceb8b689fb619df4f6c7219fe76b521c
Component: engine
2016-03-01 15:38:03 -05:00