Commit Graph

909 Commits

Author SHA1 Message Date
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
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
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
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
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
62eff90f69 Add logdrivers to /info
This is required for swarmkit to be able to filter based on log driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 17abacb8946ed89496fcbf07a0288fafe24cb7b0
Component: engine
2017-04-11 18:07:15 -04:00
7ec6dbcc2e Merge pull request #32059 from seriousben/support-dns-stack-file
add support for dns nameservers and search domains in stack files
Upstream-commit: 8a8c1961b58ef687e4a07002bdf1be4784ff7142
Component: engine
2017-04-11 21:32:52 +02:00
3cad237312 updates for review comments
- runtimeUrl -> type_url
- runtimes -> runtime

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 8c2c69d31ec0ce4a9b125ca3cbf7b04ee81ce579
Component: engine
2017-04-11 14:02:01 -04:00
21134b3d48 filter services by runtime; default to container
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: f71bdc67a21a63b901e484a0650bea36d15eece5
Component: engine
2017-04-11 14:02:01 -04:00
d2aa64e45c Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
Upstream-commit: a258ef58d8a100467d5d948b026a884ebe58eaf4
Component: engine
2017-04-11 13:06:53 +02:00
0bf5e70579 Merge pull request #32496 from tonistiigi/build-target
builder: add an option for specifying build target
Upstream-commit: 18ae574cab9c4eb5183e419b1ca698dd76ed1194
Component: engine
2017-04-10 19:02:21 -07:00
108aa4253e Merge pull request #32462 from dperny/service-logs-general-availability
Remove experimental from service logs
Upstream-commit: 17a3e4511d8f20868a051f10dbedabdce7ea2f9c
Component: engine
2017-04-10 18:30:20 -07:00
6516b7e3d8 Merge pull request #32110 from adshmh/30977-stack-rm-should-accept-multiple-labels
stack rm should accept multiple arguments
Upstream-commit: 3a9572ca14c821ea0cf24dd590f608392e7a6ad1
Component: engine
2017-04-10 18:19:59 -07:00
7254b7d783 Adding support for dns in stack files
Signed-off-by: Benjamin Boudreau <boudreau.benjamin@gmail.com>
Upstream-commit: 6b60a60729e0b22cc74197e5d00d1621435da7f7
Component: engine
2017-04-10 20:46:33 -04:00
a89a2c21c5 builder: add an option for specifying build target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 33e07f41adc0ec96edad5f22bc2cfaec0d26ea58
Component: engine
2017-04-10 16:21:43 -07:00
bdda1a695e Merge pull request #32116 from mkumatag/inspect_template
Adopt text/template in node inspect
Upstream-commit: ec207ce186bff1804f49c456f77fe7d377e63d30
Component: engine
2017-04-10 23:02:26 +02:00
1dfd61e802 Make the CLI show defaults from the swarmkit defaults package
If no fields related to an update config or restart policy are
specified, these structs should not be created as part of the service,
to avoid hardcoding the current defaults.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: bbe1202410a580b8bdb35e7b50e4e4028e530111
Component: engine
2017-04-10 13:41:18 -07:00
3d267a0dc8 Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1d274e9acfe96b98be3ec956636ff4e5c70e98af
Component: engine
2017-04-10 13:41:16 -07:00
24a0a6b6bb Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 306cfecc8c146ea8addb44dd35296808b25916a2
Component: engine
2017-04-10 13:40:45 -07:00
15fc803536 Merge pull request #31236 from tonistiigi/docker-stdin
build: accept -f - to read Dockerfile from stdin
Upstream-commit: 778e32a2fadcf1ccb1819ad6534af5c477585300
Component: engine
2017-04-10 20:14:54 +02:00
e5dfac43c9 Merge pull request #31148 from yongtang/31032-NanoCPU-update
Add `--cpus` support for `docker update`
Upstream-commit: 5b1cae227171a299e41835a4806cd939b984c596
Component: engine
2017-04-10 20:02:15 +02:00
6d75b7a10d Merge pull request #30740 from yongtang/29999-prune-filter-label
Add `label` filter for `docker system prune`
Upstream-commit: 4460312ce1a53316e3c474ab951b85e737a902c5
Component: engine
2017-04-10 19:38:01 +02:00
e6a4499500 Merge pull request #32427 from adshmh/add-unit-tests-to-cli-command-idresolver-package
Added unit tests to the cli/command/idresolver package
Upstream-commit: a5b9d99b9e3db4d85cccd55d0f4c26c9fc37c498
Component: engine
2017-04-10 12:41:09 -04:00
6e350af41d remove --init-path from client
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: a18d103b5ed4ed6ef95b2e4b582872a82022cceb
Component: engine
2017-04-10 16:49:43 +02:00
708ad46cdf Adopt text/template in node inspect
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
Upstream-commit: 5dbd6afb5144a937df73bfe42364e583e789d80d
Component: engine
2017-04-10 17:47:15 +05:30
73fce35ed0 Merge pull request #32062 from aaronlehmann/change-network-attachments
Support service network attachment changes
Upstream-commit: b0831acb09662431ecfed84677e7f5ed54635d52
Component: engine
2017-04-10 12:49:28 +02:00
6633b439bb Add format to the docker system df command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 985a9c7047616885454951e7c8282f3c94f6d6e9
Component: engine
2017-04-10 13:04:03 +03:00
04adcf44c3 Merge pull request #31364 from adshmh/30935-use-encrypted-client-certificate-to-connect-to-a-docker-host
use an encrypted client certificate to connect to a docker daemon
Upstream-commit: 2daa2b894c1cf62936fe55dc8782c486aafaecdd
Component: engine
2017-04-10 10:42:01 +02:00