Commit Graph

399 Commits

Author SHA1 Message Date
2b846c8a06 Merge pull request #28629 from yongtang/28581-secret-create-input
Add `--file` flag for `docker secret create` command
Upstream-commit: 4436a5946d1cc20efb3af5a3d0c56894c02f1a29
Component: engine
2016-12-18 03:04:10 +01:00
8616ae37b9 Merge pull request #29423 from unclejack/api_cli_integ_return
return directly without ifs in remaining packages
Upstream-commit: 21210419447281863f239805ab19248733041a52
Component: engine
2016-12-17 21:30:47 +01:00
0b16fc446e Merge pull request #29003 from dnephin/pkg-compose-transform
Move composefile -> engine api type conversion to `cli/compose/convert`
Upstream-commit: 914a72541fecfc2e4312015befb7200dd05f4462
Component: engine
2016-12-16 23:34:41 +01:00
c9e434865c Move pkg to cli/compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 643fd775edb0a05d649f4d484e966428eb3a6b09
Component: engine
2016-12-16 12:27:31 -05:00
930d936818 Move ConvertService to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 655e48e65309f0191bbbb8b2e9730b6976e148cd
Component: engine
2016-12-16 12:20:07 -05:00
cb4b458233 Move ConvertVolumes to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7685e80fc9cb79206d81757eee071f0244323600
Component: engine
2016-12-16 11:51:13 -05:00
20aacdd131 Move ConvertNetworks to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6b778c96336fe9c0bcfea477092aab8cdfc0c896
Component: engine
2016-12-16 11:51:13 -05:00
148f65373a swarm leave is not only for workers
the "docker swarm leave" command description
mentioned that the command can only be used
for workers, however, the command can also
be used for managers (using the `-f` / `--force`
option).

this patch removes the "(workers only)" part
of the command description.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f89eee5d9d3c01bc6d498fcb1163ec199e6c3078
Component: engine
2016-12-16 15:10:20 +01:00
d363742779 return directly without ifs in remaining packages
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 2c187a24e0003f2f0ab90b85876e668f2b6210d4
Component: engine
2016-12-14 23:28:27 +02:00
8bf34c7522 cli: Pin image to digest using content trust
Implement notary-based digest lookup in the client when
DOCKER_CONTENT_TRUST=1.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d4d6f8c0d0c6cd0ba6dc96ab7a9ed07e1e766074
Component: engine
2016-12-14 10:49:33 -08:00
87aafbf002 cli: Split out GetNotaryRepository and associated functions
Split these into cli/trust so that other commands can make use of them.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 4b8c79f25ee00ca5dfe22271c166938009bda976
Component: engine
2016-12-14 10:49:32 -08:00
e2664ec347 Merge pull request #28943 from vdemeester/publish-long-short-syntax
Remove --port and update --publish for services to support syntaxes
Upstream-commit: 2fe62f2395b966af7f38e442a91c75d042bb3b65
Component: engine
2016-12-14 17:55:48 +01:00
cc92db8852 Merge pull request #29288 from Microsoft/jjh/promptusestdin
Windows: Prompt fix use regular stdin
Upstream-commit: 5665c7364241e451a507a9e8024b6a8b43675527
Component: engine
2016-12-13 21:18:54 +01:00
c3c5d1b1fc Add --file flag for docker secret create command
This fix tries to address the issue raised in 28581 and 28927
where it is not possible to create a secret from a file (only
through STDIN).

This fix add a flag `--file` to `docker secret create` so that
it is possible to create a secret from a file with:
```
docker secret create --file secret.in secret.name
```

or
```
echo TEST | docker secret create --file - secret.name
```

Related docs has been updated.

An integration test has been added to cover the changes.

This fix fixes 28581.
This fix is related to 28927.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c6f0b7f448fac4d037d00f944a7908c60c04dff2
Component: engine
2016-12-13 07:35:45 -08:00
9c84f95c6e Show usage when docker swarm update has no flags
This fix tries to address the issue raised in 24352. Previously,
when `docker swarm update` has no flags, the output is
```
Swarm updated.
```
even though nothing was updated. This could be misleading for
users.

This fix tries to address the issue by adding a `PreRunE` function
in the command so that in case no flag is provided (`cmd.Flags().NFlag() == 0`),
the usage will be outputed instead.

An integration has been added to cover the changes.

This fix fixes 24352.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5aa5a1cb008963ee6a99011b8f7cd1f489e2bc6a
Component: engine
2016-12-13 05:05:04 -08:00
90bc3ba4b5 Merge pull request #29267 from yuexiao-wang/fix-bulid-para
Update the option for docker build
Upstream-commit: 3d52c86d4c8405372445502b2592e8f63132ce99
Component: engine
2016-12-13 08:55:20 +01:00
d619a55e45 Update the option 'network' for docker build
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: cd317282c9b7d4dc68dce8df1d2f84e7a5654e72
Component: engine
2016-12-13 18:18:53 +08:00
93f44feac0 Merge pull request #29196 from aluzzardi/service-ps-output
service ps: Revert output to 1.12 behavior.
Upstream-commit: 91dd29acdcd3e8e1877897e7fc6010005cc9975d
Component: engine
2016-12-12 17:20:45 +01:00
314935f565 Make --publish-rm precedes --publish-add, so that add wins
`--publish-add 8081:81 --publish-add 8082:82 --publish-rm 80
--publish-rm 81/tcp --publish-rm 82/tcp` would thus result in 81 and
82 to be published.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9d4aa3621f226f4167fb7c3585dfe1c37c40472e
Component: engine
2016-12-11 23:14:54 +01:00
97f2808afa Remove --port and update --publish for services to support syntaxes
Add support for simple and complex syntax to `--publish` through the
use of `PortOpt`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 75bf18c9f01d050e5fccab98fb671306c7c5f6d2
Component: engine
2016-12-11 23:14:54 +01:00
a586c34f99 Windows: Prompt fix
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 30b8f084436a2a1d5e8523fcd2c5ea64cc805224
Component: engine
2016-12-09 14:27:53 -08:00
fede611756 Merge pull request #25860 from yongtang/1396-service-update-publish-rm
Return error for incorrect argument of `service update --publish-rm`
Upstream-commit: 032b5b21b603282e613b6d98da1c7cc2b021a924
Component: engine
2016-12-08 20:09:56 +01:00
6e67e38b7d Merge pull request #29020 from wefine/commands_order
Give a order to AddCommands, for better read and maintenance.
Upstream-commit: cefda34773e6fbf68f43135f25c00d756bb8cd1a
Component: engine
2016-12-08 15:13:22 +01:00
3185ae49df Merge pull request #29041 from aaronlehmann/hide-updatestatus
api: Hide UpdateStatus when it is not present
Upstream-commit: e94a40cddaca7b920405a730d29892e49f1be19b
Component: engine
2016-12-08 13:55:13 +01:00
886e681533 Give a order to AddCommands, for easy read and maintenance.
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
Upstream-commit: 6174adc4b391fe3d1e79173a7f351938d0e1edd9
Component: engine
2016-12-08 16:43:14 +08:00
b5155284d2 Merge pull request #29104 from duglin/Issue29084
Fix processing of unset build-args during build
Upstream-commit: dca76ed50a02659ba7ca4e209356f138ff14dc3e
Component: engine
2016-12-07 17:18:55 -08:00
ce009b27d8 Fix processing of unset build-args during build
This reverts 26103.  26103 was trying to make it so that if someone did:
  docker build --build-arg FOO .
and FOO wasn't set as an env var then it would pick-up FOO from the
Dockerfile's ARG cmd.  However, it went too far and removed the ability
to specify a build arg w/o any value. Meaning it required the --build-arg
param to always be in the form "name=value", and not just "name".

This PR does the right fix - it allows just "name" and it'll grab the value
from the env vars if set. If "name" isn't set in the env then it still needs
to send "name" to the server so that a warning can be printed about an
unused --build-arg. And this is why buildArgs in the options is now a
*string instead of just a string - 'nil' == mentioned but no value.

Closes #29084

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: cdb8ea90b04683adb25c8ccd71b6eaedc44b51e2
Component: engine
2016-12-07 07:41:55 -08:00
44c9e8c720 service ps: Revert output to 1.12 behavior.
- Display the ID column
- Do not append the task ID in the name column
- (NEW): Truncate task IDs, unless --no-trunc is specified

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: bbd2018ee19eff5594ae3986bf56fbcd0044699d
Component: engine
2016-12-06 18:52:47 -08:00
7eef41ce9c registry: Remove reference.go
This removes some very old vestigial code that really should have been
removed during the content addressability transition. It implements
something called "reference" but it behaves differently from the actual
reference package. This was only used by client-side content trust code,
and is relatively easy to extricate.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d91ed88365317cd86555e2f54bffa30ec6590dfe
Component: engine
2016-12-06 15:53:21 -08:00
00e81acaa1 Merge pull request #29073 from adshmh/28756-print-checkpoint-name-in-checkpoint-create-command
Print checkpoint id when creating a checkpoint
Upstream-commit: 7f9ba93914a5b9fff7c21cc5cb19de90a9190f35
Component: engine
2016-12-06 11:06:29 +01:00
9603ca0d08 Merge pull request #28896 from yongtang/28884-secret-name-mask-ID
Fix issue where secret ID is masked by name
Upstream-commit: 57d77cc205768624c36b4bd7fb98d9924925087e
Component: engine
2016-12-06 11:05:30 +01:00
92a14fe836 Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
Upstream-commit: 745795ef2e0089c5001e5a2fc7ba8c1ab0234857
Component: engine
2016-12-06 11:03:45 +01:00
4ef31d0696 Handle logging in compose to swarm
Logging configuration was completely ignore when deploy a compose file
to swarm. This fixes it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 806cc1e0f815d7c4e4b7bd4fa537e3d4c3535e23
Component: engine
2016-12-05 15:18:36 +01:00
4d3934c3e5 Merge pull request #28967 from yongtang/28946-support-plugin-docker-inspect
Support plugin type in `docker inspect`
Upstream-commit: 24ffa2fa7751e2f1fbdd7e0d5a640f24e8a5b803
Component: engine
2016-12-04 18:30:38 -08:00
085088f73e Fix issue where secret ID is masked by name
This fix tries to address the issue in 28884 where
it is possible to mask the secret ID by name.

The reason was that searching a secret is based on name.
However, searching a secret should be done based on:
- Full ID
- Full Name
- Partial ID (prefix)

This fix addresses the issue by changing related implementation
in `getCliRequestedSecretIDs()`

An integration test has been added to cover the changes.

This fix fixes 28884

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3638ca4d14bcca9bc924f21314e4a1020cd5172f
Component: engine
2016-12-02 20:24:29 -08:00
35037b78fd Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a6be56b54e871c4e7a6e72881770a64676c27c3c
Component: engine
2016-12-02 20:08:49 -08:00
eaac95defc Add ID field for docker plugin ls
This fix tries to address the enhancement proposed in 28708 to display
ID field for the output of `docker plugin ls`.

This fix add `ID` field to the output of `docker plugin ls`

Related docs has been updated.

This fix fixes 28708.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8a226ed6432a0614b25298fef872c98794f65ba9
Component: engine
2016-12-02 13:42:50 -08:00
8d0b8ac112 Support plugins in docker inspect
This fix tries to address the proposal raised in 28946
to support plugins in `docker inspect`.

The command `docker inspect` already supports
"container", "image", "node", "network", "service", "volume", "task".
However, `--type plugin` is not supported yet at the moment.

This fix address this issue by adding the support of `--type plugin`
for `docker inspect`.

An additional integration test has been added to cover the changes.

This fix fixes 28946.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 90bb2cdb9f15a9b1b9a4e2ea4242882665daac4e
Component: engine
2016-12-02 11:33:29 -08:00
1689338c62 Merge pull request #28789 from yongtang/28735-plugin-inspect-id-or-name
Allow `docker plugin inspect` to search based on ID or name
Upstream-commit: 57ace38103e1c9fc13e40c57b0fc77361e389f54
Component: engine
2016-12-02 08:46:47 -08:00
75273b586a Print checkpoint id when creating a checkpoint
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: f1df2d5a2e563bd38e797e33bce444edd346521c
Component: engine
2016-12-01 23:30:14 -05:00
538d93fdc1 Return error for incorrect argument of service update --publish-rm <TargetPort>
Currently `--publish-rm` only accepts `<TargetPort>` or `<TargetPort>[/Protocol]`
though there are some confusions.

Since `--publish-add` accepts `<PublishedPort>:<TargetPort>[/Protocol]`, some user
may provide `--publish-rm 80:80`. However, there is no error checking so the incorrect
provided argument is ignored silently.

This fix adds the check to make sure `--publish-rm` only accepts `<TargetPort>[/Protocol]`
and returns error if the format is invalid.

The `--publish-rm` itself may needs to be revisited to have a better UI/UX experience,
see discussions on:
https://github.com/docker/swarmkit/issues/1396
https://github.com/docker/docker/issues/25200#issuecomment-236213242
https://github.com/docker/docker/issues/25338#issuecomment-240787002

This fix is short term measure so that end users are not misled by the silently ignored error
of `--publish-rm`.

This fix is related to (but is not a complete fix):
https://github.com/docker/swarmkit/issues/1396

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c4d773cdfe94a8ba4862a0f8df237b0fc31d2337
Component: engine
2016-12-01 17:46:53 -08:00
a68666e468 api: Hide UpdateStatus when it is not present
When UpdateStatus was not present, the empty values of the timestamps
would be present:

        "UpdateStatus": {
            "StartedAt": "0001-01-01T00:00:00Z",
            "CompletedAt": "0001-01-01T00:00:00Z"
        }

To fix this, make the timestamps pointers, so they can be set to nil
when they should not be shown.

Also make UpdateStatus itself a pointer, so an empty object does not
show up when there is no UpdateStatus.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0e70d96a6813704498a3ce9cc2786648c84daa3a
Component: engine
2016-12-01 15:08:41 -08:00
2ac57c6dcf Allow docker plugin inspect to search based on ID or name
This fix tries to address the issue raised in discussion of
PR 28735 where it was not possible to manage plugin based on
plugin ID. Previously it was not possible to invoke
`docker plugin inspect` with a plugin ID (or ID prefix).

This fix updates the implementation of `docker plugin inspect`
so that it is possbile to search based on a plugin name, or a
plugin ID. A short format of plugin ID (prefix) is also possible,
as long as there is no ambiguity.

Previously the check of `docker plugin inspect` was mostly done
on the client side. This could potentially cause inconsistency
between API and CMD. This fix move all the checks to daemon side
so that API and CMD will be consistent.

An integration test has been added to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0ce6e070f7d1e4b1b478d52b4464f8480dbfd9b7
Component: engine
2016-12-01 10:44:17 -08:00
2e1e2b9b86 Add registry-specific credential helper support
Signed-off-by: Jake Sanders <jsand@google.com>
Upstream-commit: 07c4b4124b46be30ea3ac7d114c44c4f911ca182
Component: engine
2016-12-01 10:29:00 -08:00
77750af0f0 Merge pull request #28922 from yuexiao-wang/fix-secret
Fix the inconsistency for secret ls and secrect rm
Upstream-commit: a3be176f139e8fd54b985c5876eb677250890805
Component: engine
2016-12-01 11:29:58 +01:00
54c33a1c13 Fix the use for secret create
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5cef55ba9178604c67d99774526cf055c7d0aafe
Component: engine
2016-12-01 19:48:33 +08:00
cefbd9b7e9 Merge pull request #28885 from vdemeester/revert-service-ps-all
Revert "Add -a option to service/node ps"
Upstream-commit: 53d69aeb74962709464e0888f4a5c755be2c8e4d
Component: engine
2016-11-30 12:02:34 -08:00
7fb4d2bab8 Fix the inconsistency for docker secret
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b4306588e982481c46708c535d5bfc5efdbd4cd8
Component: engine
2016-11-30 17:23:39 +08:00
5ee1b1203e Merge pull request #28876 from vdemeester/28835-better-handling-of-external-networks
stack deploy: handle external network when deploying
Upstream-commit: b8dac5dc995cefbd9f92f5a52a7435ddf4250873
Component: engine
2016-11-29 15:00:35 -08:00
ce99f23b28 Merge pull request #28919 from allencloud/change-secret-remove-in-cli
change secret remove logic in cli
Upstream-commit: 063d5679c5662c260cd7d53efc10da0a835366e0
Component: engine
2016-11-29 15:08:24 +01:00