Commit Graph

624 Commits

Author SHA1 Message Date
47697dba88 Merge pull request #29218 from yongtang/28884-secret-inspect-follow-up
Move secret name or ID prefix resolving from client to daemon
Upstream-commit: 3c32e1775a174edfc6883a7167326bc91bc2eb24
Component: engine
2017-01-27 13:31:04 -08:00
754408c859 Move secret name or ID prefix resolving from client to daemon
This fix is a follow up for comment:
https://github.com/docker/docker/pull/28896#issuecomment-265392703

Currently secret name or ID prefix resolving is done at the client
side, which means different behavior of API and CMD.

This fix moves the resolving from client to daemon, with exactly the
same rule:
- Full ID
- Full Name
- Partial ID (prefix)

All existing tests should pass.

This fix is related to #288896, #28884 and may be related to #29125.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fa358a87571f9212f91d8fde6696926d76ecca64
Component: engine
2017-01-27 10:40:05 -08:00
7e2571b991 Add [OPTIONS] to usage of plugin disable|push
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: aad095f573e99b69366f46d6da5bc6536f4237f1
Component: engine
2017-01-27 16:17:02 +01:00
9e237a57b2 Set default values for uid and gid to prevent errors when starting a service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 167b3f95b7f659817f8421742ca4078edd42dbaa
Component: engine
2017-01-26 12:00:46 -05:00
dd9f330ae3 Rebase Compose v3.1 schema on the latest v3 schema.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b4f23bbc69f58662f8d94b0492d693e43d523e47
Component: engine
2017-01-26 11:33:15 -05:00
9e92b82db9 Remove secrets as part of stack remove.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f0a5531c46c3fe602b372de434125a3cd046a0b6
Component: engine
2017-01-26 11:33:15 -05:00
f693277e41 Test and fix external secrets in stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b3427e43edc56824f762e964c955b906fa363a3a
Component: engine
2017-01-26 11:33:15 -05:00
5ed83fcbc5 Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6ec84ef76df30663d5728f903b314f4486587135
Component: engine
2017-01-26 11:33:15 -05:00
fc26836a78 Implement secret types for compose file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9419e7df2b54b684bef6c787239a2c92fbb4acda
Component: engine
2017-01-26 11:33:15 -05:00
9fa961acee Add v3.1 schema and support validating multiple version.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 65374488f92512cf34667cb71ea6d62985310f65
Component: engine
2017-01-26 11:33:15 -05:00
0dedd22a73 Merge pull request #30043 from dmcgowan/distribution-reference-update-1
Distribution reference update
Upstream-commit: e9c0de0de65182915d1cd205f06f5c903c20a29f
Component: engine
2017-01-24 20:38:20 -08:00
3a33131bc7 Merge pull request #30291 from yongtang/30279-ps-format
Fix failure in `docker ps --format` when `.Label` has args
Upstream-commit: 42d25de1b75a1f5b0d8369889b00b83e212c1d92
Component: engine
2017-01-24 17:55:52 -08:00
5ce50d238a Merge pull request #30325 from dnephin/add-internal-to-compose-network
Add network.internal to Compose schema
Upstream-commit: 4726fd120334ad5452c53a4f031893543da10e1a
Component: engine
2017-01-24 17:16:08 -08:00
465587cda7 Merge pull request #30378 from mlaventure/fix-negative-size
Ensure proper value is used when computing reclaimable space
Upstream-commit: ee7682ebaedba6025f585c3ab6f0d61513e54e06
Component: engine
2017-01-24 09:24:53 -05:00
c6a1cf9cb8 Merge pull request #29900 from yongtang/29226-network-format-created-at
Add `.CreatedAt` placeholder for `docker network ls --format`
Upstream-commit: 8820266c17beede7d08b6b077383978f3b7b239f
Component: engine
2017-01-24 11:01:37 +01:00
1540000352 Merge pull request #30211 from thaJeztah/fix-content-trust-flags
fix flag descriptions for content-trust
Upstream-commit: 7fed0830f398e704115c7583192f01c058703277
Component: engine
2017-01-23 23:52:11 +01:00
5f10f9f9d8 Merge pull request #29883 from dnephin/update-to-latest-schema
Update compose schema v3
Upstream-commit: eac3e4b5dda3c1d7d4c9031dcd8dc67562bcc0e7
Component: engine
2017-01-23 23:18:31 +01:00
b5ccc2ae09 Ensure proper value is used when computing reclaimable space
When Size was reverted to be equal to VirtualSize, the df command
formatter was not correctly updated to account for the change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: dcc1b4baf6d0eb068010d071bc44daf72b12cd4a
Component: engine
2017-01-23 13:57:20 -08:00
471ffa89e7 Merge pull request #30139 from Microsoft/jjh/sequential
Windows: Use sequential file access
Upstream-commit: 062f2a3eae418c07a9a18661492a1c8beaaed60a
Component: engine
2017-01-23 12:46:06 -08:00
f61d5bb251 Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c98e77c77c5b43bf50e8ae5296b02ce0b47ea188
Component: engine
2017-01-23 10:25:36 -08:00
4f39eed3bd Fix failure in docker ps --format when .Label has args
This fix tries to fix the issue in 30279 where  `docker ps --format`
fails if `.Label` has args. For example:
```
docker ps --format '{{.ID}}\t{{.Names}}\t{{.Label "some.label"}}'
```

The reason for the failure is that during the preprocessing phase
to detect the existance of `.Size`, the `listOptionsProcessor`
does not has a method of `Label(name string) string`.

This results in the failure of
```
template: :1:24: executing "" at <.Label>: Label is not a method but has arguments
```

This fix fixes the issue by adding needed method of `Label(name string) string`.

This fix fixes 30279.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 2cd4ba1e56222a938b2edaa7ad7981c9a2bc248f
Component: engine
2017-01-23 09:31:48 -08:00
4d4ab77f0f Merge pull request #29088 from yongtang/28708-plugin-list-format
Add `--format` flag for `docker plugin ls`
Upstream-commit: 8bb8ac7f788b258ee17473d9f2779341506aed0a
Component: engine
2017-01-23 08:49:28 -08:00
ffebf75329 fix flag descriptions for content-trust
Commit ed13c3abfb242905ec012e8255dc6f26dcf122f6 added flags
for Docker Content Trust. Depending on the `verify` boolean,
the message is "Skip image verification", or "Skip image signing".
"Signing" is intended for `docker push` / `docker plugin push`.

During the migration to Cobra, this boolean got flipped for
`docker push` (9640e3a4514f96a890310757a09fd77a3c70e931),
causing `docker push` to show the incorrect flag description.

This patch changes the flags to use the correct description
for `docker push`, and `docker plugin push`.

To prevent this confusion in future, the boolean argument
is removed, and a `AddTrustSigningFlags()` function is added.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb3c0b246617aecb8ecf9120f07efcf45b94ae09
Component: engine
2017-01-23 14:52:36 +01:00
fa90fa0714 Merge pull request #30272 from AkihiroSuda/fix-cli-json
Fix broken JSON support in cli/command/formatter
Upstream-commit: baecb6f499633b6df87d7e4a0631d9feb714358b
Component: engine
2017-01-23 11:03:18 +01:00
5fa515a0ff Add --format flag for docker plugin ls
This fix tries to address the enhancement discussed in 28735 to add
`--format` for the output of `docker plugin ls`.

This fix
1. Add `--format` and `--quiet` flags to `docker plugin ls`
2. Convert the current implementation to use `formatter`, consistent with
   other docker list commands.
3. Add `pluginsFormat` for config.json.

Related docs has been updated.

Several unit tests have been added to cover the changes.

This fix is related to 28708 and 28735.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1c0d37fa7f04ade13e65aff74ea0495bb846d782
Component: engine
2017-01-20 15:59:44 -08:00
f1f3f030a1 Add missing network.internal.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 408fd20be25c309454503c0b1e1c31914cf87dad
Component: engine
2017-01-20 12:53:19 -05:00
22c718e439 Update Compose schema to match docker-compose.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: de1ffebf19595e061c85727a4c34ac02ad4e934d
Component: engine
2017-01-20 12:36:57 -05:00
027b11b8c3 Remove use of forked reference package for cli
Use resolving to repo info as the split point between the
legitimate reference package and forked reference package.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0421f5173dbdcb4e4eade5267f274302bb6ab97c
Component: engine
2017-01-19 16:04:50 -08:00
9977ce25d8 Fix broken JSON support in cli/command/formatter
How to test (it should not print `{}`, and just returns JSON with the actual data):

   $ docker images --format '{{json .}}'
   $ docker container stats --format '{{json .}}'

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 26013fcdd64221c858022392a1430a6c43eaaa26
Component: engine
2017-01-19 09:51:13 +00:00
b0c7dd934b return error when listNode fails
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 8e04e9902a9739a13e5e824339082cc3d361d097
Component: engine
2017-01-19 14:02:06 +08:00
d6bce40c8a Merge pull request #30218 from kevinetc123/patch-typo
fix a typo error
Upstream-commit: 7d0041f9e5dce58366a3ce09e75d82ce307cf28a
Component: engine
2017-01-19 14:34:19 +09:00
0bc7b63417 correct all the formate to formatter
Signed-off-by: kaiwentan <kaiwentan@harmonycloud.cn>
Upstream-commit: b8155bd5bead29bf116aeea9159563e1a6409c41
Component: engine
2017-01-19 11:26:49 +08:00
140c56ac38 Merge pull request #28925 from daehyeok/ineffassign
Refactoring ineffectual assignments
Upstream-commit: 5eda0c59477a7364878351c3d311cd3a4c6dd28d
Component: engine
2017-01-18 15:01:57 +01:00
2351cc0042 purify error message in cli for create and run command
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 3f1feaf4d66a7a8770a0eab4356106be2a18aacb
Component: engine
2017-01-17 17:21:17 +08:00
c249c5ced8 Don't use AutoRemove on older daemons
Docker 1.13 moves the `--rm` flag to the daemon,
through an AutoRemove option in HostConfig.

When using API 1.24 and under, AutoRemove should not be
used, even if the daemon is version 1.13 or above and
"supports" this feature.

This patch fixes a situation where an 1.13 client,
talking to an 1.13 daemon, but using the 1.24 API
version, still set the AutoRemove property.

As a result, both the client _and_ the daemon
were attempting to remove the container, resulting
in an error:

    ERRO[0000] error removing container: Error response from daemon:
    removal of container ce0976ad22495c7cbe9487752ea32721a282164862db036b2f3377bd07461c3a
    is already in progress

In addition, the validation of conflicting options
is moved from `docker run` to `opts.parse()`, so
that conflicting options are also detected when
running `docker create` and `docker start` separately.

To resolve the issue, the `AutoRemove` option is now
always set to `false` both by the client and the
daemon, if API version 1.24 or under is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0ea7b143b0a8366799c83a955be676aaf1345214
Component: engine
2017-01-15 01:59:57 +01:00
fed9eaa59d Merge pull request #29856 from Microsoft/jjh/warntoout
Windows to Linux build warning to stdout
Upstream-commit: 7d24cc7710f49f1f3caadf15d9eddb7e3b7a5f0d
Component: engine
2017-01-14 16:37:31 -05:00
af2c613c23 Add error checking for hostPort range
This fix catches the case where there is a single container port
and a dynamic host port and will fail out gracefully
Example docker-compose.yml snippet:
    port:
        ports:
            - "8091-8093:8091"
            - "80:8080"

Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
Upstream-commit: 135f8f967488f171fcda6c66d7fa35726edaf19c
Component: engine
2017-01-13 18:05:51 -05:00
fe46c62362 Add SecretUpdate method to client
closes #28678

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update cli/command/service/update_test.go

Fixes test build error:

  secretAPIClientMock does not implement "github.com/docker/docker/client".SecretAPIClient (missing SecretUpdate method)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 77b8465d7e68ca102d7aae839c7b3fe0ecd28398
Component: engine
2017-01-13 09:51:05 -08:00
287ee51be3 Refactoring ineffectual assignments
This patch fixed below 4 types of code line
1. Remove unnecessary variable assignment
2. Use variables declaration instead of explicit initial zero value
3. Change variable name to underbar when variable not used
4. Add erro check and return for ignored error

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 6306019d0bad9c4e60ee437e93f2450dfb0b68c0
Component: engine
2017-01-13 00:27:01 -07:00
07dc948442 Fix ImageSummary.Size value
The prune PR changed the meaning of the file to mean "space on disk
only unique to this image", this PR revert this change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: be20dc15af0cb281bd6d11586cfcc96bd50d12ca
Component: engine
2017-01-12 07:49:22 -08:00
b112b94b43 Improve the error message for extends in stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 46422df4900be14730447045cc1b1da3ebbf1e28
Component: engine
2017-01-11 11:57:24 -05:00
acaf4ba63f Allow swarm init with --availability=drain
This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0f30c644441b3b4150252af1b41db99d4b6e697a
Component: engine
2017-01-10 16:31:51 -08:00
9a5d4b9c8d Allow swarm join with --availability=drain
This fix tries to address the issue raised in 24596 where it was not
possible to join as manager only (`--availability=drain`).

This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

NOTE: Additional pull request for swarmkit and engine-api will
be created separately.

This fix fixes 24596.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a8e7e37aa82d1adac67b05836ea97a06fbdfdbf0
Component: engine
2017-01-10 16:31:51 -08:00
c1d7d93cb3 Few stack deploy network fixes
- Make sure we use the correct network name for external ones.
- Make the default network overridable and only creates networks that
  are used by services — so that default network is only created if a
  service doesn't declare a network.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3191f5809bc1233bbf2103d2432b75cac93567bb
Component: engine
2017-01-10 10:29:09 +01:00
1f4bebfb09 Merge pull request #30005 from dnephin/fix-stack-deploy-resources
Fix parsing resources from compose file for stack deploy.
Upstream-commit: 8563492eefb1653c7e83b539a254446a555961e3
Component: engine
2017-01-09 22:50:01 +01:00
acc7a7c5ca Merge pull request #29918 from dongluochen/service_inspect_pretty
add port PublishMode to service inspect --pretty output
Upstream-commit: d6c8391bf680b1f7995e0390a346f10b114d1990
Component: engine
2017-01-09 22:43:41 +01:00
a164ad0f0e Merge pull request #29802 from thaJeztah/fix-secret-rm-consistency
Update order of '--secret-rm' and '--secret-add'
Upstream-commit: cd82a31edbae37c31212ac8b23180d90735ceab4
Component: engine
2017-01-09 21:34:05 +01:00
ddcbfb5519 Merge pull request #29143 from vdemeester/node-cli-unit-tests
Add some unit tests to the node and swarm cli code
Upstream-commit: 38f766ae0e4b80d452a3825c42a7ac9fee965790
Component: engine
2017-01-09 20:52:23 +01:00
6300d8ca1e Fix parsing resources from compose file for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e3f083530f27bc57fceab684fb3182b79a960e79
Component: engine
2017-01-09 14:22:02 -05:00
ccb8041876 add port PublishMode to service inspect --pretty output
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 5470312d236445b54bb6723f47c0966d3b057658
Component: engine
2017-01-09 10:30:28 -08:00