Commit Graph

225 Commits

Author SHA1 Message Date
36954599b4 go {build,test}: rm -i option, add go cache volume
Looks like -i (together with DOCKER_INCREMENTAL_BINARY etc)
were used to get faster incremental builds.

Nowdays (since Go 1.10) this is no longer the case, as
go build cache is used [1]. Here's a quote:

> You do not have to use "go test -i" or "go build -i" or
> "go install" just to get fast incremental builds. We will
> not have to teach new users those workarounds anymore.
> Everything will just be fast.

To enable go cache between builds, add a volume for /root/.cache.

[1] https://groups.google.com/forum/#!msg/golang-dev/qfa3mHN4ZPA/X2UzjNV1BAAJ

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit bdcd81d3301a053eefc320de16ac842ec47ed459)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0f190f798f7b9f90bd008fe8fb0fc087ec965642
Component: engine
2019-06-18 17:53:03 +01:00
71a3e53c36 Fix the several typos detected by github.com/client9/misspell
Signed-off-by: Kazuhiro Sera <seratch@gmail.com>
Upstream-commit: 1e49fdcafc6601cd9dd5c46551ee283baa0272ef
Component: engine
2018-08-09 00:45:00 +09:00
197ec1c2ab Add osusergo build tar for static binaries
Go 1.11 includes a fix to os/user to be working in a static binary
(fixing https://github.com/golang/go/issues/23265). The fix requires
`osusergo` build tag to be set for static binaries, which is what
this commit adds (also for containerd).

[v2: sort build tags alphabetically]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 70cdb1c66429582ecfdc5abed67189dd90ab7572
Component: engine
2018-07-19 12:25:46 +03:00
b179a3fc0d Some slight tweaks for the integration test
`arm64` needs get more time duration for the test to finish.

`pty.Start()` opens a file, so the caller should close it explicitly,
else the file I/O can result in unexpected data synchronization issue.

All those changes will not affect the test itself.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 476d7872efb60b1ef1bc7d9d83952f9dbc8f8798
Component: engine
2018-05-21 10:08:27 +08:00
a2b8d3a9e8 pkg: devmapper: dynamically load dm_task_deferred_remove
dm_task_deferred_remove is not supported by all distributions, due to
out-dated versions of devicemapper. However, in the case where the
devicemapper library was updated without rebuilding Docker (which can
happen in some distributions) then we should attempt to dynamically load
the relevant object rather than try to link to it.

This can only be done if Docker was built dynamically, for obvious
reasons.

In order to avoid having issues arise when dlsym(3) was unnecessary,
gate the whole dlsym(3) logic behind a buildflag that we disable by
default (libdm_dlsym_deferred_remove).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 98fe4bd8f1e35f8e498e268f653a43cbfa31e751
Component: engine
2018-02-16 17:23:23 +11:00
9a9cb24385 Remove version file
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1e1ad008db1af4f415b9ef9b8d6d225a09ab42e1
Component: engine
2017-11-01 16:25:03 -04:00
d78181e968 Remove solaris files
For obvious reasons that it is not really supported now.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5a9b5f10cf967f31f0856871ad08f9a0286b4a46
Component: engine
2017-10-24 15:39:34 -04:00
e55d5634bf Add a new entrypoint for CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dbf580be57a4bb854d7ce20d313e3a22ea337be5
Component: engine
2017-09-20 17:26:30 -04:00
56b8d8a2a0 Remove version from bundle path
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bac2447964c8cdfcf35f928841d60310db997c76
Component: engine
2017-09-05 13:38:32 -04:00
0699e6b42a Allows VERSION to be overwritten by env variable
VERSION was hardcoded to be used as the `VERSION` file from the root
directory, this makes it so that you have the option to overwrite this.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 76643025793ca742b1c19bd35cab35c8ff7d3e77
Component: engine
2017-09-01 15:47:15 -07:00
5305a1cd9e Update containerd to 06b9cb35161009dcb7123345749fef02f7cea8e0
This also update:
 - runc to 3f2f8b84a77f73d38244dd690525642a72156c64
 - runtime-specs to v1.0.0

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 45d85c99139bbd16004bbedb7d5bac6a60264538
Component: engine
2017-08-21 12:04:07 -07:00
2b769b8b71 Merge pull request #34362 from kolyshkin/update-libdevmapper
Dockerfile*: bump devmapper library version
Upstream-commit: 31d8d2253ebb77ef7b341606cbdf0e76835e64db
Component: engine
2017-08-14 09:56:43 -04:00
9a9d90f97d Remove test-integration-cli and references to it.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bc82b139955c4a0edb20b070926469cceea0fbbb
Component: engine
2017-08-09 11:02:57 -04:00
43db8c0c15 Introduce test-integration target (and deprecate/freeze test-integration-cli)
This adds a new package `integration` where `engine` integration tests
should live. Those integration tests should not depends on any `cli`
components (except from the `dockerd` daemon for now — to actually
start a daemon).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6b025a8b665f7b976bb2560488ba07f55dbf0fb6
Component: engine
2017-08-09 11:02:57 -04:00
3366bf6a8a Dockerfile*: bump devmapper library version
Let's use latest lvm2 sources to compile the libdevmapper library.

Initial reason for compiling devmapper lib from sources was a need to
have the static version of the library at hand, in order to build
the static dockerd, but note that the same headers/solib are used
for dynamic build (dynbinary) as well.

The reason for this patch is to enable the deferral removal feature.
The supplied devmapper library (and headers) are too old, lacking the
needed functions, so the daemon is built with 'libdm_no_deferred_remove'
build tag (see the check in hack/make.sh). Because of this, even if the
kernel dm driver is perfectly able to support the feature, it can not
be used. For more details and background story, see [1].

Surely, one can't just change the version number. While at it:
 - improve the comments;
 - remove obsoleted URLs;
 - remove s390 and ppc configure updates that are no longer needed;
 - use pkg-config instead of hardcoding the flags (newer lib added
   some more dependencies);

 [1] https://github.com/moby/moby/issues/34298

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c4fde49a5c0198890078e4c5f7566b387884fe0f
Component: engine
2017-08-01 22:08:24 -07:00
3b429c8524 Merge pull request #34176 from bmwiedemann/date
Allow to override build date
Upstream-commit: 7e4f4d15fdb004f9bc6f311704e481f43245bed3
Component: engine
2017-07-28 17:32:29 +01:00
336f19edea Allow to override build date
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Upstream-commit: 760763e9957840f1983a5006f4e66d6920ec496e
Component: engine
2017-07-19 06:20:18 +02:00
189240deb3 Remove test-unit from hack/make
Also remove the test flag from pkg/term and jsut checkuid directly.
Fixed a problem with a pkg/term test that was leaving the terminal in a bad
state.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1fb615599a83f41b449529df24f7e833c727e0ed
Component: engine
2017-07-17 11:39:33 -04:00
766e04b095 More helper hack helper functions to a more appropriate place.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ece4520bf8b3938ef4a078e6826a1682e7fe5495
Component: engine
2017-07-17 11:38:59 -04:00
628a1d1381 remove cli concerns from hack/make
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ea2e4d73c4c753cdc99966e4dfe35143e79564ce
Component: engine
2017-06-21 11:20:05 -04:00
c9bef385b2 Update golang to 1.8
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 470dfd69b3a86d8966f51d3f7237bdb10d6e00e0
Component: engine
2017-05-10 20:06:27 -04:00
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