Commit Graph

932 Commits

Author SHA1 Message Date
d659edcaf5 Update logrus to v1.0.1
Fixes case sensitivity issue

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 1009e6a40b295187e038b67e184e9c0384d95538
Component: engine
2017-07-31 13:16:46 -07:00
b13daf9d28 Remove unused functions
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 236a125c3afdee30b739399aaea263c37cb28b04
Component: engine
2017-06-03 15:19:10 -07:00
1fd0a9619a Remove cli/flags package
- Moving the `common*.go` files in `cmd/dockerd` directly (it's the
  only place it's getting used)
- Rename `cli/flags` to `cli/config` because it's the only thing left
  in that package 👼

Now, `integration-cli` does *truly* not depend on `cobra` stuff.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9ff9a91ab7f964f4e5042f94fe22dd50b5c3d832
Component: engine
2017-06-01 13:34:31 -07:00
58ecec6e8e Move cli.Configdir away (in flags).
This makes integration not depend anymore of `cli` and thus not
require `cobra` and other packages to compile.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 71d60ec0eb7eeddc73d2cf63748ab7debe3f06af
Component: engine
2017-05-29 16:22:33 -07:00
8d785cac10 Merge pull request #32587 from dmcgowan/trust-key-config
Expose trust key path in config
Upstream-commit: 577168700200e8e993b2692ef87e05a67783a08c
Component: engine
2017-05-11 21:03:47 +02:00
6481987490 Expose trust key path in config
Allows storing key under any directory. In the case where the
"/etc/docker" directory is not preserved, this file can be
specified to a location where it will be preserved to ensure
the ID does not change across restarts.

Note this key is currently only used today to generate the ID
used in Docker info and for manifest schema v1 pushes. The key
signature and finger on these manifests are not checked or
used any longer for security, deprecated by notary.

Removes old key migration from a pre-release of Docker which put
the key under the home directory and was used to preserve ID used
for swarm v1 after the file moved.

closes #32135

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: e428c824c35e85a02fffee592b79ab7db1a0c4d2
Component: engine
2017-05-10 14:16:27 -07:00
205ed67bbf Remove compose
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: a1aa69433da83a03d3adf039de4a18d0d73be8e1
Component: engine
2017-05-06 10:57:07 +10: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
bd17f42bef Add docker build --iidfile=FILE
This is synonymous with `docker run --cidfile=FILE` and writes the digest of
the newly built image to the named file. This is intended to be used by build
systems which want to avoid tagging (perhaps because they are in CI or
otherwise want to avoid fixed names which can clash) by enabling e.g. Makefile
constructs like:

    image.id: Dockerfile
    	docker build --iidfile=image.id .

    do-some-more-stuff: image.id
    	do-stuff-with <image.id

Currently the only way to achieve this is to use `docker build -q` and capture
the stdout, but at the expense of losing the build output.

In non-silent mode (without `-q`) with API >= v1.29 the caller will now see a
`JSONMessage` with the `Aux` field containing a `types.BuildResult` in the
output stream for each image/layer produced during the build, with the final
one being the end product.  Having all of the intermediate images might be
interesting in some cases.

In silent mode (with `-q`) there is no change, on success the only output will
be the resulting image digest as it was previosuly.

There was no wrapper to just output an Aux section without enclosing it in a
Progress, so add one here.

Added some tests to integration cli tests.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 5894bc1abf8186802d360d20739b57bfffed51df
Component: engine
2017-05-05 16:35:54 +01:00
bf769e943b Merge pull request #32972 from thaJeztah/compose-move-labels-to-3.3
Move "labels" to compose 3.3 format
Upstream-commit: 4662d3e9beab85389a57d12cfe082ba00aabc915
Component: engine
2017-05-05 09:25:43 -04:00
d2eb631302 Merge pull request #32876 from YuPengZTE/devIneffectualAssignment
delete ineffectual assignment
Upstream-commit: fa4b377bbc4329a5716630c98f50790048058c6c
Component: engine
2017-05-03 20:55:57 +02:00
755f9321e1 Refacator pkg/streamformatter
StreamFormatter suffered was two distinct structs mixed into a single struct
without any overlap.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c87d67b0ad788a6a80d1af89488e2d1f22726c34
Component: engine
2017-05-02 17:38:12 -04:00
620f549c31 Move "labels" to compose 3.3 format
Commit bb5dfdb8c5acd48f17498b111db360820a50baec added a
labels option to the docker-compose file format, but
added it to the 3.2 schema.

This patch moves the change to the 3.3 schema

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4f522580f588e9e4667a637c4acb62d221ba9b96
Component: engine
2017-05-02 13:35:48 -07:00
effaed887f Merge pull request #32843 from ehazlett/stack-service-filter
Remove service runtime filter in stack command
Upstream-commit: 1504d51701fedc867a5504b98598bee43311cd8a
Component: engine
2017-05-02 14:10:20 +02:00
8a2cc25685 Merge pull request #32828 from cyli/external-ca-cert
Add the `CACert` parameter to the `ExternalCA` object
Upstream-commit: 25058d9b0c1414a0c7fa1aef5dd1766aaf2e1c30
Component: engine
2017-04-28 10:30:57 -04:00
b5c88cd04e Merge pull request #32504 from dongluochen/healthcheck_duration
do not allow duration less than 1 ms in healthcheck parameters
Upstream-commit: a7519152d9be7a0dd6941d529ea4b83cf4b7f1d4
Component: engine
2017-04-27 23:54:00 -04:00
6d2197f6fd delete ineffectual assignment
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: 5794008b6807270f96b5de70a73fb392e1519ff1
Component: engine
2017-04-28 11:26:38 +08:00
0fd96c2554 Merge pull request #32717 from fcrisciani/data_path
Data path traffic separation option in swarm mode
Upstream-commit: 0307fe1a0bcdc02583a24add41eb783c117bad8c
Component: engine
2017-04-27 13:00:55 -04:00
e7900cc574 Merge pull request #31557 from ripcurld0/add_stack_ls
Add the format option to the docker stack ls command
Upstream-commit: 6559abaf477352dc03725a70c85d0ea9c8d5974e
Component: engine
2017-04-26 19:13:33 -07:00
8fc8babfdf Merge pull request #32564 from dnephin/compose-file-rel-dir
Set Composefile WorkingDir to dirname of the composefile.
Upstream-commit: 22d9eadee2f511c5d39c0458116738e05d5d1e98
Component: engine
2017-04-26 17:30:33 -07:00
17438d5f4c Inroduce SWARM --data-path-addr flag
This new flag will allow the configuration of an interface that
can be used for data path traffic to be isolated from control
plane traffic. This flag is simply percolated down to libnetwork
and will be used by all the global scope drivers (today overlay)

Negative test added for invalid flag arguments

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 8dc8cd4719f165c01c98e7d3ce1d6cea6a8f60b8
Component: engine
2017-04-26 15:33:15 -07:00
bffd287a59 Add the CACert parameter to the ExternalCA object in order to match
swarmkit's API type.  Make sure this parameter gets propagated to
swarmkit, and also add an extra option to the CLI when providing
external CAs to parse the CA cert from a file.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: b0401a71f7479a52b2670346e0d1e97cb68089a4
Component: engine
2017-04-26 10:45:12 -07:00
d22ad9d497 remove service runtime filter in stack command
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 95e6c848b112af982ef28ed12317a027973408e4
Component: engine
2017-04-26 09:11:51 -04:00
d806eb521a Merge pull request #32829 from aaronlehmann/cli-image-tests-corrections
cli: Correct command/image tests for testify
Upstream-commit: 08422650bec3c38936cc3eb950cc87c2d4ad9233
Component: engine
2017-04-26 11:29:11 +02:00
580f2ecac8 Merge pull request #32540 from cpuguy83/add_logdrivers_to_info
Add logdrivers to /info
Upstream-commit: e8abe0a69d0d6838412a63d7170b9b92877ec3a2
Component: engine
2017-04-25 23:25:30 -05:00
b5df2ac4ee Merge pull request #32817 from vdemeester/fix-win-it
Fix docker run -it on windows
Upstream-commit: d4fb626e3694ac7b2f5f4870a9a8068d02585958
Component: engine
2017-04-25 20:10:38 -07:00
c3e28b780f cli: Correct command/image tests for testify
These tests were caught in the crossfire of the transition to testify.
testify has a few subtle differences from the similar custom framework
it replaced:

- Error behaves differently
- Equal takes its arguments in a different order

This PR also takes the opportunity to use a few shorthands from testify,
such as Len, True, and False.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: acc2d5b7d6817dd8b256e4d7f3a5ca1f207e327f
Component: engine
2017-04-25 16:24:07 -07:00
74bc2c5808 move service runtime filter to server
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: bb30ab9b5f8ebbe412148ae380e69af6e3503d34
Component: engine
2017-04-25 15:38:46 -04:00
6d16df6b88 Fix docker run -it on windows
Signed-off-by: Vincent Demeester <vincent@demeester.fr>
Upstream-commit: 8c014db3027b1ddecd42389e24b9c46d5f7a93ae
Component: engine
2017-04-25 18:25:05 +02:00
76d9eb02b7 Add format to docker stack ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 205ec49de9c4f4abb8023d1ad36fdbc92e7ec294
Component: engine
2017-04-25 16:45:30 +03:00
7ee17f3128 Merge pull request #32470 from runcom/remove-init-client
remove --init-path from client
Upstream-commit: e1101b1295f05ef3c6f1a684a51cd508b3c7874c
Component: engine
2017-04-25 10:25:58 +02:00
0f75777a54 Merge pull request #32248 from icapurro/cli-image-tests
Unit tests for cli/command/image package
Upstream-commit: 663f0ba1b2a90dc56e4e03777754dccd3092c7f1
Component: engine
2017-04-24 17:01:26 +02:00
ae1cfbfd19 Merge pull request #32731 from hairyhenderson/one-line-swarm-join-output-32725
Output `docker swarm join` command on a single line when running `docker swarm init`
Upstream-commit: c22b21fede388f0072a5a01b9177bfafefe269cb
Component: engine
2017-04-24 09:53:16 -05:00
0b4ffdab67 Unit tests for cli/commands/image (except build and tag)
Signed-off-by: Ignacio Capurro <icapurrofagian@gmail.com>
Upstream-commit: b2551c619d30f163c3ab8c9ee53cdb09bfbeaa55
Component: engine
2017-04-23 12:27:39 -05:00
178e6f9ebd Merge pull request #32632 from ColinHebert/compose_add_labels_during_build
Add support for labels during build with compose
Upstream-commit: bb5dfdb8c5acd48f17498b111db360820a50baec
Component: engine
2017-04-21 10:16:48 +02:00
ac65b0c3b9 Output docker swarm join on a single line
This avoids issues when copy/pasting between different shells on
different OSes, which may not all support `\` as a continuation
character.

Fixes #32725

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Upstream-commit: 50368e7a0ebc654689e3932dea588612e3496823
Component: engine
2017-04-20 07:18:25 -05:00
f6580aefb9 Set Composefile WorkingDir to dirname of the composefile.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: cad32e0111cec6088cf26cbb122e816fc0a3f6c8
Component: engine
2017-04-17 15:14:58 -04:00
1720321911 Fix formatter unit test (moving to testify)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3f676c1918226966db0bd776284f12fe71a2b957
Component: engine
2017-04-17 17:32:52 +02:00
d44cde780d Merge pull request #32614 from aaronlehmann/testify
Remove pkg/testutil/assert in favor of testify
Upstream-commit: 1eec7b5583662d82c39510e54e050b21ebf11a18
Component: engine
2017-04-17 11:07:08 -04:00
4489cc6ffc Merge pull request #30962 from TheHipbot/30431-implement-format-for-history-with-docs
30431 implement format for history with docs
Upstream-commit: a3ab46361ee91dc99790e84369b4865572bd9f8c
Component: engine
2017-04-16 10:34:41 -07:00
8e695a49da Regenerate schema with the correct libraries
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: bddd9cce40d58d27551e796b9fae515b24eab40e
Component: engine
2017-04-15 13:00:23 +10:00
b9691f7292 Run go generate github.com/docker/docker/cli/compose/schema
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: 0ee58cb3b94ad569f3642009343beac8eda0bacf
Component: engine
2017-04-15 10:57:43 +10:00
8df9b5486d Add support for labels during build with compose
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: 1d1defa399157f1fc246bb5a8772bb1fc4305348
Component: engine
2017-04-15 05:31:28 +10:00
142883d5b3 Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6052f2b3969feadb01662d8e2f30337d9c7f61af
Component: engine
2017-04-14 12:03:21 -07:00
62078c31fe Hide zero-valued timestamps from service JSON
It was possible to see output like this:

        "UpdateStatus": {
            "State": "updating",
            "StartedAt": "2017-04-14T17:10:03.226607162Z",
            "CompletedAt": "1970-01-01T00:00:00Z",
            "Message": "update in progress"
        }

The timestamp fields were already changed to pointers, and left nil if
the timestamp value was zero. However the zero-value of a timestamp from
gRPC is different from the value Go considers to be zero. gRPC uses the
Unix epoch instead of Go's epoch. Therefore, check that the timestamp
does not match the Unix epoch.

Also, add " ago" to the timestamps as shown in "docker service inspect
--pretty", as they are shown as relative times.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 8a27758364a151d9497cbb507463e81898579c37
Component: engine
2017-04-14 10:44:24 -07:00
e9836650c4 Merge pull request #31482 from ripcurld0/add_format_to_system_df
Add format to the docker system df command
Upstream-commit: 0b35ab196546a4de068060f10418cc5416d5b62c
Component: engine
2017-04-13 10:08:11 -07:00
47f6ff572e do not allow duration less than 1 ms in healthcheck parameters
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 5fc912d2c87c1986e830a7d4f6b62bec385e9a14
Component: engine
2017-04-12 10:48:31 -07:00
866adfbbee Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
Upstream-commit: d40a17ffc2f6592396a3dfc0f5ebe396c2107536
Component: engine
2017-04-12 08:21:17 -07:00
1386ad9dee daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
Upstream-commit: 8a7ff5ff746a77e0be601c11540562341b2228c1
Component: engine
2017-04-12 10:33:19 +00:00
b94b999d77 Merge pull request #32030 from ehazlett/any-runtime
Support Swarmkit Generic Task Runtime
Upstream-commit: 3343653edb9a9c152c043de577effda1d528d6c0
Component: engine
2017-04-11 17:53:20 -07:00