Commit graph

251 commits

Author SHA1 Message Date
Sebastiaan van Stijn
4af2555a35 Merge pull request #30290 from vdemeester/carry-pr-27834
Carry #27834 — Do not require `.git` in the build context
2017-02-04 19:19:16 -08:00
Vincent Demeester
617be0ef2b
Bind mount .git 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-02-03 21:00:32 +01:00
Gaël PORTAY
425cd7d1c5 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>
2017-01-27 17:34:38 -05:00
Vincent Demeester
fae6ca2bb4
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>
2017-01-24 14:42:57 +01:00
Justin Cormack
f8119bb7a7 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>
2017-01-18 12:27:21 +00:00
Antonio Murdaca
7b1f77dcbc
hack/make.sh: fix BUILDTIME
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-03 09:09:41 +01:00
John Howard
5e6f8cb4a7 Remove old Windows hack in make.sh
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-16 09:29:38 -08:00
Vincent Demeester
2c342cff79
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>
2016-11-15 16:23:48 +01:00
Alexander Morozov
f2614f2107 project: use vndr for vendoring
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-11-03 15:31:46 -07:00
Daniel Nephin
22033e1003 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>
2016-11-03 14:24:22 -06:00
Qiang Huang
e6866492c4 Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-10-29 15:03:26 +08:00
Alexander Morozov
36f47aa252 Merge pull request #27519 from justincormack/proxy-build
Build docker-proxy from git checkout like other external binaries
2016-10-25 08:54:13 -07:00
Justin Cormack
3996975b08 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>
2016-10-25 13:13:22 +01:00
Kenfe-Mickael Laventure
7781a1bf0f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-24 15:20:01 -07:00
Christopher Jones
f431211631
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>
2016-09-26 12:13:39 -04:00
Michael Crosby
ee3ac3aa66 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>
2016-09-19 17:33:50 -07:00
Brian Goff
4d0275c819 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>
2016-09-06 20:27:28 -04:00
Antonio Murdaca
12e2c2687e
Bump go to 1.7
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-08-21 19:04:15 +02:00
Vincent Demeester
5ec6e11e15
Disable coverage on test-integration-cli
Temporarly remove cover bundle from defaults.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-18 22:12:24 +02:00
Daniel Nephin
1d945a9743 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>
2016-08-05 12:07:28 -04:00
Sebastiaan van Stijn
589bafddf3
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>
2016-07-18 23:15:03 +02:00
Sebastiaan van Stijn
726ef47d5c Merge pull request #23215 from BlackYoup/pkg-config
make.sh: use PKG_CONFIG environment variable if it exists
2016-06-03 15:04:37 +02:00
Brian Goff
9bb54f89ad
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>
2016-06-03 12:08:33 +02:00
Arnaud Lefebvre
20bf00dfa5 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>
2016-06-02 21:53:28 +02:00
John Starks
fa82c0aa10 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>
2016-05-25 11:59:28 +02:00
Amit Krishnan
86d8758e2b Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-23 16:37:12 -07:00
Daniel Nephin
8983d42988 Raise a more relevant error when dockerd is not available on the platform.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-02 11:59:25 -04:00
Daniel Nephin
9e7651db4d 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>
2016-04-22 11:26:01 -04:00
Natanael Copa
355ad33087 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>
2016-04-14 17:30:18 +02:00
Michael Crosby
45fb803316 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>
2016-04-11 12:02:01 -07:00
Tibor Vass
d800be743d Merge pull request #21591 from riyazdf/hardware-signing-non-experimental
move hardware signing out of experimental, remove yubico-piv-tool deps
2016-03-30 00:09:22 -04:00
Riyaz Faizullabhoy
8d18e6b30f move hardware signing out of experimental, remove dependencies to yubico-piv-tool
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-28 14:33:06 -07:00
Tonis Tiigi
477fe4846a 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>
2016-03-26 23:05:55 -07:00
Ken Cochrane
181d2725d7 Added a better message for when we build an unsupported version
Signed-off-by: Ken Cochrane <kencochrane@gmail.com>
2016-03-25 10:09:03 -04:00
cyli
dd33d18045 Revert "Merge pull request #21003 from riyazdf/hardware-signing-ga"
This reverts commit e6d3a9849c, reversing
changes made to d3afe34b51.

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-03-24 21:12:52 -07:00
Vincent Demeester
2164018d82 Remove the verbosity of copy_containerd
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-03-23 20:51:48 +01:00
Tibor Vass
dd51e85c05 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>
2016-03-23 11:59:21 -04:00
Tibor Vass
009399dc8e Add docker- prefix to runc and containerd binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-23 00:52:16 -04:00
Michael Crosby
5ff66748da Export GOOS and GOARCH in subprocess for tgz
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-22 15:43:06 -07:00
Michael Crosby
78568f2eb5 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>
2016-03-22 12:06:56 -07:00
Tibor Vass
e6d3a9849c Merge pull request #21003 from riyazdf/hardware-signing-ga
Move hardware signing out of experimental
2016-03-17 14:16:40 -04:00
David Calavera
3771a1713b Merge pull request #21131 from estesp/gcc-devmapper-test-broken
Fix gcc compile test with proper flag ordering
2016-03-14 09:46:49 -07:00
Phil Estes
e207645307 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)
2016-03-11 15:08:58 -05:00
Brian Goff
11d3f7092e use per-check timeouts
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-03-11 14:38:52 -05:00
Riyaz Faizullabhoy
37fa75b344 Move pkcs11 out of experimental, into GA
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-03-07 10:07:40 -08:00
John Howard
6a1ae187d0 Windows CI: Bump timeout for tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-04 09:36:46 -08:00
Tibor Vass
36401f20ce Merge pull request #20617 from nalind/journald-pkgconfig
Try to handle changing names for journal packages
2016-03-01 15:38:03 -05:00
Tibor Vass
f4a1e3db99 Support TLS remote test daemon
This will allow us to have a windows-to-linux CI, where the linux host
can be anywhere, connecting with TLS.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-25 14:12:17 -05:00
Nalin Dahyabhai
6cdc4ba6cd Try to handle changing names for journal packages
When checking if we have the development files for libsystemd's journal
APIs, check for either 'libsystemd >= 209' and 'libsystemd-journal'.  If
we find 'libsystemd', define the 'journald' tag, which defaults to using
the 'libsystemd.pc' file.  If we find the older 'libsystemd-journal',
define both the 'journald' and 'journald_compat' tags, which causes the
'libsystemd-journal.pc' file to be consulted instead.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
2016-02-23 12:24:27 -05:00
Maxim Ivanov
24152a4231 Fix libdevmapper deferred removal detection
When linking, position of `-l` flags is important since
they muse come _after_ any object files which uses symbols
from a specified library, that is due to --as-needed binutils
ld flag enabled by default

Signed-off-by: Maxim Ivanov <ivanov.maxim@gmail.com>
2016-02-17 23:56:21 +00:00
Jessica Frazelle
9bc771af9d
add validation for generating default secccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-02-08 13:04:52 -08:00
Brian Goff
ae14e6cc0a Merge pull request #19071 from icecrime/incremental_builds
Enable incremental builds
2016-01-27 11:21:01 -05:00
Arnaud Porterie
1445e4db32 Enable incremental builds
Remove the `-a` build flag and introduce `-i` in order to reuse
previously compiled dependencies.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2016-01-26 21:24:44 -08:00
Aleksa Sarai
4357ed4a73 *: purge dockerinit from source code
dockerinit has been around for a very long time. It was originally used
as a way for us to do configuration for LXC containers once the
container had started. LXC is no longer supported, and /.dockerinit has
been dead code for quite a while. This removes all code and references
in code to dockerinit.

Signed-off-by: Aleksa Sarai <asarai@suse.com>
2016-01-26 23:47:02 +11:00
John Howard
5601fc8507 Windows CI: In container logic flaw
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-24 09:22:50 -08:00
Paul Liljenberg
0c7201ee73 Fixes #19614
Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com>
2016-01-24 10:28:18 +01:00
Tibor Vass
cba7ba25f4 Merge pull request #19488 from hypriot/enable-docker-trust-suite-on-arm
Enable DockerTrustSuite for ARM again
2016-01-22 11:23:19 -05:00
Jess Frazelle
e287bef453 Merge pull request #19316 from Microsoft/jjh/incontainererror
Windows: In container build check
2016-01-21 13:44:19 -08:00
John Howard
4dbd612d47 Windows: In container build check
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-21 13:15:23 -08:00
Vincent Demeester
e5bce74592 Remove validate-vendor from default bundles
Because it's triggered another way :)
See https://github.com/docker/leeroy/pull/44

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-01-20 18:29:28 +01:00
Stefan Scherer
acb42c5fab Enable DockerTrustSuite for ARM again
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
2016-01-20 14:58:09 +01:00
Christopher Jones
d12f4babdd Fix test requirement for ARM
Correctly passes the DOCKER_ENGINE_GOARCH env var
to the testing environment

Also fixes logic for skipping a test if on ARM.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-01-19 15:23:46 -05:00
Stefan Scherer
4f339570cb Skip failing tests on ARM to get red/green feedback from Jenkins
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
2016-01-18 17:00:15 +01:00
Phil Estes
557c7cb888 Move userns support out of experimental into master
Adds the `--userns-remap` flag to the master build

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-01-08 15:06:22 -05:00
Vincent Demeester
4c22c566e2 Add a validate-vendor script
Makes sure that if ./hack/vendor.sh has been updated, it has been used
to update the vendor folder.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-01-07 19:57:50 +01:00
Arnaud Porterie
3e298c5928 Rename -dirty to -unsupported
Nightly and unofficial builds of Docker bear the suffix `-dirty` in the
version string. Change this suffix to `-unsupported` to make it explicit
that no support will be provided on such versions, and that it is for
example unnecessary to file an issue for it.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-12-24 09:11:49 -08:00
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
John Howard
c10311bc9a Fix broken Windows CI
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-12-03 10:12:11 -08:00
Zhang Wei
9daca1222a Consolidate time format for API
Consolidate all the API to same time format: RFC3339, and it will be
client's responsibility to present it in more user friendly way.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-12-02 22:40:18 +08:00
Tianon Gravi
ae1fadeb96 Merge pull request #17714 from mikedougherty/cs-release-fixes
Fixes for release scripts
2015-11-23 19:47:10 -08:00
Mike Dougherty
a15b67b1af Fixes for release scripts:
Add a flag to allow keeping bundles around (helps with CI)

Fix several problems in repo make targets

* quote DOCKER_EXPERIMENTAL variable
* pass-through arguments for gpg  provided to dpkg-sig are now quoted
  properly, so passphrases with shell-interpolated symbols can be used
* when determining deb suites, don't rely on 'origin' to be
  github.com/docker/docker

Fix some issues with deb repository creation from scratch

* Don't add empty components to the repository configuration as they
  will cause failure when generating.

Add old docker-engine-cs name to package conflicts

Signed-off-by: Mike Dougherty <mike.dougherty@docker.com>
2015-11-23 17:15:54 -08:00
Michael Crosby
249b3a9479 Merge pull request #17459 from brahmaroutu/Power_Z_CI
Build and test Docker on IBM Power and Z using gccgo. Enable CI on Po…
2015-11-19 15:50:07 -08:00
Tianon Gravi
7f608c391d Prevent the creation of "a.out" at the repo root
Our clever "gcc" invocations were creating a spurious "a.out" file at the root of the repo (which just happened to be in ".gitignore" so we didn't notice it sooner).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-11-17 09:44:36 -08:00
Tianon Gravi
927e1e98b7 Remove "-linkmode external"
We're having to override it in so many places that it no longer seems worthwhile to bother.  On top of that, the reason we did it in the first place was for being able to compile devicemapper statically, which still works after this change (either due to other changes in the way we build, or improvements in Go itself).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-11-15 14:47:48 -08:00
Alexander Morozov
fb77b822ad Merge pull request #17758 from rhatdan/dynbinary
Since default is dynbinary we should test with dynbinary
2015-11-14 10:54:03 -08:00
Dan Walsh
0d47b74a7f Since default is dynbinary we should test with dynbinary
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2015-11-14 06:01:55 -05:00
Srini Brahmaroutu
b1cc78b8f5 Build and test Docker on IBM Power and Z using gccgo. Enable CI on Power and Z.
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-11-14 03:16:45 +00:00
Jessica Frazelle
141369457f
add buildtag pkcs11 to experimental
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-13 13:20:49 -08:00
Tianon Gravi
8b9856dbd7 Merge pull request #17699 from jfrazelle/update-release-script-to-new-process
update release script and release process
2015-11-12 09:51:36 -08:00
Antonio Murdaca
dc41fff56e hack: make.sh: remove not used function
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-11 10:19:03 +01:00
David Calavera
58b270c338 Merge pull request #17431 from vdemeester/hope-it-does-not-broke-everything-again
Another try at dockerversion placeholder for library import
2015-11-09 13:15:50 -08:00
Vincent Demeester
8054a30387 dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-09 19:32:46 +01:00
Lei Jitang
3c4dab51d3 Remove DOCKER_EXECDRIVER env
Since --exec-driver flag has been removed, we don't need environment
DOCKER_EXECDRIVER in integration-cli and Makefile any more.

Signed-off-by: Lei Jitang <leijiang@huawei.com>
2015-11-09 09:17:32 +08:00
David Calavera
3b5fac462d Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-05 17:09:57 -05:00
Jessica Frazelle
d0a4b216a6
update release script and release process
Signed-off-by: Jessica Frazelle <princess@docker.com>
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-04 16:20:04 -08:00
Brian Goff
b78ca243d9 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-27 21:23:53 -04:00
Vincent Demeester
d5cd032a86 dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-27 20:36:07 +01:00
Jessica Frazelle
930b27a86b fix logic because jess is the worst
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-09 22:21:24 -04:00
Jessica Frazelle
ea3afdad61 add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-09 20:50:27 -04:00
Nalin Dahyabhai
e611a189cb Add log reading to the journald log driver
If a logdriver doesn't register a callback function to validate log
options, it won't be usable.  Fix the journald driver by adding a dummy
validator.

Teach the client and the daemon's "logs" logic that the server can also
supply "logs" data via the "journald" driver.  Update documentation and
tests that depend on error messages.

Add support for reading log data from the systemd journal to the
journald log driver.  The internal logic uses a goroutine to scan the
journal for matching entries after any specified cutoff time, formats
the messages from those entries as JSONLog messages, and stuffs the
results down a pipe whose reading end we hand back to the caller.

If we are missing any of the 'linux', 'cgo', or 'journald' build tags,
however, we don't implement a reader, so the 'logs' endpoint will still
return an error.

Make the necessary changes to the build setup to ensure that support for
reading container logs from the systemd journal is built.

Rename the Jmap member of the journald logdriver's struct to "vars" to
make it non-public, and to make it easier to tell that it's just there
to hold additional variable values that we want journald to record along
with log data that we're sending to it.

In the client, don't assume that we know which logdrivers the server
implements, and remove the check that looks at the server.  It's
redundant because the server already knows, and the check also makes
using older clients with newer servers (which may have new logdrivers in
them) unnecessarily hard.

When we try to "logs" and have to report that the container's logdriver
doesn't support reading, send the error message through the
might-be-a-multiplexer so that clients which are expecting multiplexed
data will be able to properly display the error, instead of tripping
over the data and printing a less helpful "Unrecognized input header"
error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
2015-09-11 16:50:03 -04:00
Alexander Morozov
8845eb4345 Remove -lpthread and -ldl from ldflags
There is no need in those flags now when we use amalgamated sqlite3 from
mattn/go-sqlite3.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-09-08 17:01:14 -07:00
Jessica Frazelle
46df9e4ec3 update sqlite3 vendor with fix for static builds
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-07 18:50:56 -07:00
Kir Kolyshkin
15aad5d3e6 make binary: do not ignore unresolved symbols
TL;DR: stop building static binary that may fail

Linker flag --unresolved-symbols=ignore-in-shared-libs was added
in commit 06d0843 two years ago for the static build case, presumably
to avoid dealing with problem of missing libraries.

For the record, this is what ld(1) man page says:

> --unresolved-symbols=method
>    Determine how to handle unresolved symbols.  There are four
>    possible values for method:
> .........
>    ignore-in-shared-libs
>        Report unresolved symbols that come from regular object files,
>        but ignore them if they come from shared libraries.  This can
>        be useful when creating a dynamic binary and it is known that
>        all the shared libraries that it should be referencing are
>        included on the linker's command line.

Here, the flag is not used for its purpose ("creating a dynamic binary")
and does more harm than good. Instead of complaining about missing symbols
as it should do if some libraries are missing from LIBS/LDFLAGS, it lets
ld create a binary with unresolved symbols, ike this:

 $ readelf -s bundles/1.7.1/binary/docker-1.7.1 | grep -w UND
 ........
 21029: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND dlopen
 .........

Such binary is working just fine -- until code calls one of those
functions, then it crashes (for apparently no reason, i.e. it is
impossible to tell why from the diagnistics printed).

In other words, adding this flag allows to build a static binary
with missing libraries, hiding the problem from both a developer
(who forgot to add a library to #cgo: LDFLAGS -- I was one such
developer a few days ago when I was working on ploop graphdriver)
and from a user (who expects the binary to work without crashing,
and it does that until the code calls a function in one of those
libraries).

Removing the flag immediately unveils the problem (as it should):

	/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libsqlite3.a(sqlite3.o):
	In function `unixDlError':
	(.text+0x20971): undefined reference to `dlerror'
	/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libsqlite3.a(sqlite3.o):
	In function `unixDlClose':
	(.text+0x8814): undefined reference to `dlclose'

The problem is, gosqlite package says:

	#cgo LDFLAGS: -lsqlite3

which is enough for dynamic linking, as indirect dependencies (i.e.
libraries required by libsqlite3.so) are listed in .so file and will be
resolved dynamically by ldd upon executing the binary.

For static linking though, one has to list all the required libraries,
both direct and indirect. For libraries with pkgconfig support the
list of required libraries can be obtained with pkg-config:

	$ pkg-config --libs sqlite3 # dynamic linking case
	-lsqlite3
	$ pkg-config --libs --static sqlite3 # static case
	-lsqlite3 -ldl -lpthread

It seems that all one has to do is to fix gosqlite this way:

	-#cgo LDFLAGS: -lsqlite3
	+#cgo pkg-config: sqlite3

Unfortunately, cmd/go doesn't know that it needs to pass --static
flag to pkg-config in case of static linking
(see https://github.com/golang/go/issues/12058).

So, for one, one has to do one of these things:

1. Patch sqlite.go like this:

	-#cgo LDFLAGS: -lsqlite3
	+#cgo pkg-config: --static sqlite3

(this is exactly what I do in goploop, see
https://github.com/kolyshkin/goploop/commit/e9aa072f51)

2. Patch sqlite.go like this:
	-#cgo LDFLAGS: -lsqlite3
	+#cgo LDFLAGS: -lsqlite3 -ldl -lpthread

(I would submit this patch to gosqlite but it seems that
https://code.google.com/p/gosqlite/ is deserted and not maintained,
and patching it here is not right as it is "vendored")

3. Explicitly add -ldl for the static link case.
This is what this patch does.

4. Fork sqlite to github and maintain it there. Personally I am not
ready for that, as I'm neither a Go expert nor gosqlite user.

Now, #3 doesn't look like a clear solution, but nevertheless it makes
the build much better than it was before.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-09-04 13:15:25 -07:00
John Howard
ac120567e8 Windows: Workaround for CI
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-08-05 11:20:30 -07:00
Arnaud Porterie
bc8b8e03b4 Enable validate-lint as part of CI
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-07-22 15:23:34 -07:00
root
b98edced9e Increase timeout to run tests on slow platforms
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-13 21:13:17 +00:00
John Howard
87eae0d659 Add branch and build time to version
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-22 13:00:27 -07:00
Tianon Gravi
9465272c28 Add new "validate-pkg" bundlescript
This helps ensure that `github.com/docker/docker/pkg/...` is actually safe to use in isolation (ie, doesn't import anything from `github.com/docker/docker` except other things from `pkg` or vendored dependencies).

Adding `github.com/docker/docker/utils` to the imports of `pkg/version/version.go`:

```
---> Making bundle: validate-pkg (in bundles/1.7.0-dev/validate-pkg)
These files import internal code: (either directly or indirectly)
 - pkg/version/version.go imports github.com/docker/docker/autogen/dockerversion
 - pkg/version/version.go imports github.com/docker/docker/utils
```

And then removing it again:

```
---> Making bundle: validate-pkg (in bundles/1.7.0-dev/validate-pkg)
Congratulations! "./pkg/..." is safely isolated from internal code.
```

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-06-12 12:28:23 -07:00
Jessie Frazelle
75f63499a0 Merge pull request #12992 from aidanhs/aphs-easy-debug-build
Allow passing DOCKER_DEBUG= to `make`
2015-06-08 15:15:49 -07:00
Phil Estes
d37aad170f Merge pull request #13568 from jfrazelle/fix-release-script-for-experimental
fix release script for experimental
2015-06-01 12:29:45 -04:00