Commit Graph

654 Commits

Author SHA1 Message Date
f3b1a30e52 make test-integration: use correct dockerd binary
Here's what happens:
1. One runs `make binary` once
2. Days go by...
3. One makes changes to dockerd sources
4. One runs `make test-integration` to test the changes
5. One spends a long time figuring out why on Earth
   those changes in step 3 are ignored by step 4.
6. One writes this patch
7. ...
8. PROFIT!!

OK, so `make test-integration` builds a dockerd binary
in bundles/dynbinary-daemon/, when starts a daemon instance
for testing. The problem is, the script that starts the
daemon sets PATH to try `bundles/binary-daemon/` first,
and `bundles/dynbinary-daemon/` second.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 228bc35e824d09a6f40d60619808462124f0af31)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e9ecd5e486c591979e34782025bb849f7faf8eba
Component: engine
2019-02-19 22:35:50 +01:00
dd03cc8be5 Remove version-checks for containerd and runc
With containerd reaching 1.0, the runtime now
has a stable API, so there's no need to do a check
if the installed version matches the expected version.

Current versions of Docker now also package containerd
and runc separately, and can be _updated_ separately.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c65f0bd13c85d29087419fa555281311091825e7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 054c3c2931cec5dca8bb84af97f1457c343ec02f
Component: engine
2018-10-05 12:35:59 +02:00
1c28fdbba1 hack/make: remove 'docker-' prefix when copying binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 361412c79eeacf11b07871870e875f9e5bce3ea7)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e090646d477f2e7d00aba971bcc187f3af7948a3
Component: engine
2018-09-25 23:09:25 +00:00
b48ad13f28 Remove 'docker-' prefix for containerd and runc binaries
This allows to run the daemon in environments that have upstream containerd installed.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 34eede0296bce6a9c335cb429f10728ae3f4252d)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b3bb2aabb8ed5a8af0a9f48fb5aba3f39af38e0d
Component: engine
2018-09-24 22:35:36 +00:00
8701fc500f Expose license status in Info (#37612)
* Expose license status in Info

This wires up a new field in the Info payload that exposes the license.
For moby this is hardcoded to always report a community edition.
Downstream enterprise dockerd will have additional licensing logic wired
into this function to report details about the current license status.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>

* Code review comments

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>

* Add windows autogen support

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 896d1b1c61a48e2df1a7b4644ddde6ee97db6111
Component: engine
2018-08-17 17:05:21 -07:00
7414934b6c Add ADD/COPY --chown flag support to Windows
This implements chown support on Windows. Built-in accounts as well
as accounts included in the SAM database of the container are supported.

NOTE: IDPair is now named Identity and IDMappings is now named
IdentityMapping.

The following are valid examples:
ADD --chown=Guest . <some directory>
COPY --chown=Administrator . <some directory>
COPY --chown=Guests . <some directory>
COPY --chown=ContainerUser . <some directory>

On Windows an owner is only granted the permission to read the security
descriptor and read/write the discretionary access control list. This
fix also grants read/write and execute permissions to the owner.

Signed-off-by: Salahuddin Khan <salah@docker.com>
Upstream-commit: 763d8392612942ff5c32a35f8bdafd7ae93d3321
Component: engine
2018-08-13 21:59:11 -07:00
63b2aa93fd -buildmode=pie is not supported on Linux on MIPS either
Signed-off-by: Kasper Fabæch Brandt <poizan@poizan.dk>
Upstream-commit: daba5daf4fc76fe530f093125efe094c2dd93e8c
Component: engine
2018-07-31 13:02:01 +02: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
5dc7f8fc9b builder: set buildkit's exported product variable via PRODUCT
This introduces a PRODUCT environment variable that is used to set a constant
at dockerversion.ProductName.

That is then used to set BuildKit's ExportedProduct variable in order to show
useful error messages to users when a certain version of the product doesn't
support a BuildKit feature.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 195919d9d645aa4ab5680a2331c57ff33eb9e5d9
Component: engine
2018-07-16 21:41:54 +00:00
af99f154e1 builder: pass DOCKER_BUILDKIT to enable buildkit in tests
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f6e58ca3c8ed880eb6459fbf38e0014f18c9322c
Component: engine
2018-06-10 10:05:28 -07:00
de438df3a8 Allow to add any args when doing a make run
`make DOCKERD_ARGS=--init binary run` should start the daemon with
`--init` as flags (with any other "automagically" added ones).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d2af0d96e3fbdfec340cb707b795b863411b00e1
Component: engine
2018-06-01 19:19:20 +02:00
d24c1e8528 Remove arch-suffix detection of Dockerfile
Since now we have only one Dockerfile, so the arch-specific suffix
of the Dockerfile is not needed anymore.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 8eb7ed673b687ae17e2c7df5dd40f8081c299bc2
Component: engine
2018-03-12 02:05:37 +00:00
e6062e18f5 Merge pull request #36336 from cpuguy83/split_installers
Split binary installers/commit scripts
Upstream-commit: 49ad3d69a7780e54ace50290d0a1a55c1182a947
Component: engine
2018-02-21 19:20:29 -08:00
f11213a800 Split binary installers/commit scripts
Originally I worked on this for the multi-stage build Dockerfile
changes. Decided to split this out as we are still waiting for
multi-stage to be available on CI and rebasing these is pretty annoying.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b529d1b0936b90ae14d584c73f7332919f8d76b7
Component: engine
2018-02-21 15:39:24 -05:00
10bf273bff Remove explicit DOCKER_API_VERSION from integration env setup
Use the default version because it is used by the client package

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e73d742cd7deee396eac3c97664b40264ee358cb
Component: engine
2018-02-20 17:27:28 -05:00
1c3e1e8db6 Rename integration/util to integration/internal
Both names have no real sense, but one allows to make sure these packages
aren't used outside of `integration`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: af306d149e76b100e08972cda364647bd7bcfe1e
Component: engine
2018-02-10 09:16:32 +01:00
13e5898067 Merge pull request #34369 from cyphar/build-buildmode-pie
*: switch to -buildmode=pie
Upstream-commit: cd3c0057ac28b5601196424597d7fed226948386
Component: engine
2018-01-29 23:54:03 +09:00
5c2e02eb8f Removal of TEST_IMAGE_NAMESPACE
We don't need the test image namespace anymore since we've already
upgrade those images to the latest multi-arch ones.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 662bdb4a5638e56d78e66bb2cb5d7a4a751135c9
Component: engine
2018-01-11 05:16:09 +00:00
6f3ae5f1f6 Merge pull request #35772 from arm64b/multi-arch-manifest-support
Download support of images with multi-arch manifest
Upstream-commit: fda904911d87a2b36e6fdcc048726bb6b593d944
Component: engine
2018-01-03 19:03:33 +01:00
cfc9623c01 Fixed typo DEREPCATED -> DEPRECATED.
Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: 3b80d5789959b790e8f45c984414cc4d2552417b
Component: engine
2017-12-29 06:39:09 -05:00
6f60e78f91 Download support of images with multi-arch manifest
Currently we only support 'application/vnd.docker.distribution.manifest.v2+json'
manifest images download, with more multi-arch images used, we need to support
download images with 'application/vnd.docker.distribution.manifest.list.v2+json'
format(aka "fat manifest"), else we will fail to download those multi-arch ones.

This PR adds 'application/vnd.docker.distribution.manifest.list.v2+json' manifest
support, thus we can download both multi-arch and legacy images.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 0af5db511ed1ed5beab0feb09a2a96347a263410
Component: engine
2017-12-14 05:37:22 +00:00
00a55a319d Fix windows
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: cb8283a6e95f33a93fab0044ca4306cf468faf8c
Component: engine
2017-12-06 23:23:55 +01:00
3916dafe17 api: generalize version information to any platform component
This change adds a Platform struct with a Name field and a general
Components field to the Version API type. This will allow API
consumers to show version information for the whole platform and
it will allow API providers to set the versions for the various
components of the platform.

All changes here are backwards compatible.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9152e63290e4a4e586b811cce39082efc649b912
Component: engine
2017-12-06 23:23:55 +01:00
0db60dff81 graphdriver: custom build-time priority list
Add a way to specify a custom graphdriver priority list
during build. This can be done with something like

  go build -ldflags "-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper"

As ldflags are already used by the engine build process, and it seems
that only one (last) `-ldflags` argument is taken into account by go,
an envoronment variable `DOCKER_LDFLAGS` is introduced in order to
be able to append some text to `-ldflags`. With this in place,
using the feature becomes

  make DOCKER_LDFLAGS="-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper" dynbinary

The idea behind this is, the priority list might be different
for different distros, so vendors are now able to change it
without patching the source code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 17708e72a7ef29fb1d4b03fbded1c5e4c08105fd
Component: engine
2017-11-16 19:43:34 -08:00
8fc8b79463 *: switch to -buildmode=pie
Go has supported PIC builds for a while now, and given the security
benefits of using PIC binaries we should really enable them. There also
appears to be some indication that non-PIC builds have been interacting
oddly on ppc64le (the linker cannot load some shared libraries), and
using PIC builds appears to solve this problem.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 1f4e37cf4bd2f73dc5257d791cc4dba294ddd156
Component: engine
2017-11-11 21:59:49 +11:00
4380d9b1d1 Merge pull request #35363 from yongtang/11012017-Dockerfile.solaris
Remove Dockerfile.solaris reference
Upstream-commit: 64e1d4a1f0081f669fff8ed0ad630b202c0cda8a
Component: engine
2017-11-01 16:36:00 -07:00
b9e1e46d81 Merge pull request #35360 from thaJeztah/fix-autogen-warning
Fix .go-autogen warnings
Upstream-commit: a17bfb78e8c33f67338f480637948f537cb69f40
Component: engine
2017-11-01 15:12:09 -04:00
4d81559763 Remove Dockerfile.solaris reference
Remove Dockerfile.solaris reference in `hack/make/.detect-daemon-osarch`
as `Dockerfile.solaris` has been removed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d157d98a5fbfc98f4adec20ce510b99c795b0d9c
Component: engine
2017-11-01 16:26:29 +00:00
a92483bbdf Fix .go-autogen warnings
The `.integration-test-helpers` script was sourced by `/etc/bash/bash.rc`.
However, the `$SCRIPTDIR` environment variable is set through `hack/make.sh`,
so will not be set when calling the `.integration-test-helpers` script directly.

Before this patch;

    make BIND_DIR=. shell
    ...
    bash: /make/.go-autogen: No such file or directory

After this patch, the warning is no longer printed

Also removed sourcing `.go-autogen` from test-integration and build-integration-test-binary,
as they already sourced `.integration-test-helpers` (which sources
`.go-autogen`).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6d5e468db1f07c12140af0cf36ba0d1a09bb4ca9
Component: engine
2017-11-01 12:03:32 +01:00
0954691f2f Remove packaging scripts
These scripts have not been used for a while now, and should not be used again
because they are for releasing docker, not moby

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: eef85648e43fef2ec73462fd3d734947384cb16e
Component: engine
2017-10-31 18:37:05 -04:00
044d7f995b Update libcontainerd to use containerd 1.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ddae20c032058a0fd42c34c2e9750ee8f6296ac8
Component: engine
2017-10-20 07:11:37 -07:00
68a51d42bd Merge pull request #34941 from dsheets/authz-tests-api-port
integration/plugin/authz: port tests from integration-cli
Upstream-commit: fe33ea9b0e5a295118feee0f46f45d92f8cc6103
Component: engine
2017-10-11 16:15:56 +02:00
63ac4b5569 Skip all testdata in integration
Also skip.IfCondition directly from the test, so that the skip message is correct

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 104c1c68438c5c59ab0e7a5fb2da6bae4ce6d080
Component: engine
2017-10-02 17:02:52 -04:00
4b75060b8c integration/plugin/authz: inline CLI work-alike library
I strongly disagree with the design of this pull request.

Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 1574d91463efd4741c2f6620718abdb624967584
Component: engine
2017-10-02 14:20:59 +01:00
8ebec737fa integration/plugin/authz: port tests from integration-cli
Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 928b0631c96ae5cb0105b3bf42d43ba529a14aa1
Component: engine
2017-10-02 14:20:59 +01: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
58ef7a0132 Fix integration suite and propagate failures
Failures from the integration suite were not propagating to the outter shell
for some reason. Handle the failure with an if exit 1.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 96707bc600747257e82917ca079fa5006d636b2c
Component: engine
2017-09-01 13:07:47 -04:00
39c495c1d1 Remove config tests, which are now unit tests in docker/cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c467a112050d595ca0b48122cd4ce81fcf6cefde
Component: engine
2017-08-18 14:24:52 -04:00
bb626a427e Fix make build-integration-cli-on-swarm
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 2fddf9f6efc155c880dfa689bd7df3a5a31ba459
Component: engine
2017-08-12 06:53:25 +00:00
48f5d911ea Fix exclude list in make.ps1
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e593b72cc9d8a2fd9c7cd98b82ed468dfe3577e2
Component: engine
2017-08-09 11:03:20 -04:00
b63db0a43c move api test client setup to a package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c66c0447efe9c7e7afdcf75b950897c67894256b
Component: engine
2017-08-09 11:02:57 -04:00
e443662141 Protect images in the integration/ suite
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5fa134b9061d0b794e9e5b887a8ea4ee15fecb61
Component: engine
2017-08-09 11:02:57 -04:00
b4b904d49b Cleanup test output, and binaries.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4308e881cc00141a1dd187120d1c4e2106148282
Component: engine
2017-08-09 11:02:57 -04:00
b327efdd99 Add integration suite
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: de46fb736d0e3e41b0f5646b43e0963bcf839baa
Component: engine
2017-08-09 11:02:57 -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
1861ca6314 Merge pull request #33987 from dnephin/cleanup-more-hack
Move test-unit out of hack/make
Upstream-commit: f8c434366e9134a1e2d4c4038e0257952f74cc99
Component: engine
2017-07-27 00:29:13 +02:00
363d00bb4d Add go-autogen to integration tests
Integration test were failing in trial runs for docker-ce 17.07 due to
the lack of go-autogen being sourced in `hack/make.sh`. This re-adds
go-autogen to be sourced for test-integration-cli so that we can
actually run tests without the error found in:
https://github.com/moby/moby/pull/33857

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 3cdd471cac8193c34d8483255065c6c28a7b1645
Component: engine
2017-07-20 11:37:12 -07: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