Commit Graph

479 Commits

Author SHA1 Message Date
db1ce9af6b Merge pull request #838 from vdemeester/fix-label-file-behavior
Fix `--label-file` weird behavior
Upstream-commit: 9de1b162fa
Component: cli
2018-01-29 17:32:21 -08:00
aea7a7fc73 Fix --label-file weird behavior
`--label-file` has the exact same behavior as `--env-file`, meaning any
placeholder (i.e. a simple key, no `=` sign, no value), it will get the
value from the environment variable.

For `--label-file` it should just add an empty label.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2b17f4c8a8
Component: cli
2018-01-29 11:08:54 -08:00
37f71b34b7 Merge pull request #804 from thaJeztah/more-annotations
Annotate "stack" commands to be "swarm" and "kubernetes"
Upstream-commit: a46fa0759d
Component: cli
2018-01-26 15:12:09 -05:00
4c8a9a1b98 Using Flags instead of PersistentFlags, as Kubernetes flags seem not to be defined in the "persistent space".
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 14fcadffb1
Component: cli
2018-01-24 09:17:08 -08:00
fe9a519a3b Annotate "stack" commands to be "swarm" and "kubernetes"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 93c36eb228
Component: cli
2018-01-22 15:44:47 -08:00
e3d68b9fea Merge pull request #780 from thaJeztah/fix-network-add
Fix --network-add adding duplicate networks
Upstream-commit: fbb9de2cfc
Component: cli
2018-01-22 14:45:58 -08:00
d093175f6e Merge pull request #696 from mlaventure/attach-use-containerwait
attach: Use ContainerWait instead of Inspect
Upstream-commit: 44a1168ae5
Component: cli
2018-01-20 23:55:16 +01:00
ac28efa249 Mark docker-manifest command as experimental (cli)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2d29732f40
Component: cli
2018-01-18 13:19:33 -08:00
e94c45a5c9 Merge pull request #138 from clnperez/manifest-cmd
Add manifest command
Upstream-commit: 11dfa23a5d
Component: cli
2018-01-18 22:15:49 +01:00
837b878f9d Merge pull request #581 from thaJeztah/better-port-range-printing
Improve presentation of published port ranges
Upstream-commit: fab4762941
Component: cli
2018-01-16 17:16:45 -05:00
35c47edb0e Merge pull request #808 from ethan-haynes/698-tmpfs-mode-compose
added support for tmpfs-mode in compose file
Upstream-commit: 14c62f655a
Component: cli
2018-01-16 20:59:17 +01:00
fd6c5edde8 Merge pull request #755 from kolyshkin/wait
Show container wait error
Upstream-commit: 1620538c49
Component: cli
2018-01-16 14:40:36 -05:00
fcc2e6e315 container.waitExitOrRemoved(): add a test case
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 85ddaee5af
Component: cli
2018-01-16 10:16:28 -08:00
96cd62f939 added support for tmpfs-mode in compose file
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Upstream-commit: cd69d082ea
Component: cli
2018-01-16 10:52:26 -06:00
6480a738eb adding tmpfs field to the compose 3.6v file spec and updating binary
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Upstream-commit: b15362ce32
Component: cli
2018-01-16 10:50:40 -06:00
596eb2d73f adding config_schema_v3.6.json and updating binary
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
Upstream-commit: 2b8cc52409
Component: cli
2018-01-16 10:44:08 -06:00
c4ee004968 Remove: add missing eol when --force is passed
Signed-off-by: Akim Demaille <akim.demaille@docker.com>
Upstream-commit: f83aa7b705
Component: cli
2018-01-16 09:29:53 +01:00
4db79d6583 golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d845b4d36a
Component: cli
2018-01-13 13:16:34 +01:00
5127f79a88 Remove aliases for orchestrator
Prefer "strict" values for orchestrator, as it's
easier to add aliases (if we think it's needed) than
to remove them later.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a812995f98
Component: cli
2018-01-11 21:16:37 +01:00
6979911095 Fix --network-add adding duplicate networks
When adding a network using `docker service update --network-add`,
the new network was added by _name_.

Existing entries in a service spec are listed by network ID, which
resulted in the CLI not detecting duplicate entries for the same
network.

This patch changes the behavior to always use the network-ID,
so that duplicate entries are correctly caught.

Before this change;

    $ docker network create -d overlay foo
    $ docker service create --name=test --network=foo nginx:alpine
    $ docker service update --network-add foo test
    $ docker service inspect --format '{{ json .Spec.TaskTemplate.Networks}}' test
    [
      {
        "Target": "9ot0ieagg5xv1gxd85m7y33eq"
      },
      {
        "Target": "9ot0ieagg5xv1gxd85m7y33eq"
      }
    ]

After this change:

    $ docker network create -d overlay foo
    $ docker service create --name=test --network=foo nginx:alpine
    $ docker service update --network-add foo test
    service is already attached to network foo

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e6ebaf55dd
Component: cli
2018-01-09 20:42:09 +01:00
7a08117e1e manifest tests
create, annotate, & push

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: db6d87216d
Component: cli
2018-01-08 11:12:57 -06:00
d25231dbba add manifest command
Enable inspection (aka "shallow pull") of images' manifest info, and
also the creation of manifest lists (aka "fat manifests").

The workflow for creating a manifest list will be:

`docker manifest create new-list-ref-name image-ref [image-ref...]`
`docker manifest annotate new-list-ref-name image-ref --os linux --arch
arm`
`docker manifest push new-list-ref-name`

The annotate step is optional. Most architectures are fine by default.

There is also a `manifest inspect` command to allow for a "shallow pull"
of an image's manifest: `docker manifest inspect
manifest-or-manifest_list`.

To be more in line with the existing external manifest tool, there is
also a `-v` option for inspect that will show information depending on
what the reference maps to (list or single manifest).

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 02719bdbb5
Component: cli
2018-01-08 10:43:56 -06:00
1bed718e52 use 'config' over 'configuration file'
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 99e3b4cd93
Component: cli
2018-01-05 13:19:53 -08:00
9f589817fd Merge pull request #721 from silvin-lubecki/kube
Add kubernetes support to docker/cli
Upstream-commit: e708c900f8
Component: cli
2018-01-03 17:20:43 +01:00
17341a3ddc Check and return error while creating kubernetes secret and config maps.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 18c44e0829
Component: cli
2018-01-03 15:46:19 +01:00
3e3e540e8d Fix PR comments
- More strict on orchestrator flag
- Make orchestrator flag more explicit as experimental
- Add experimentalCLI annotation on kubernetes flags
- Better kubeconfig error message
- Prefix service name with stackname in ps and services stack subcommands
- Fix yaml documentation
- Fix code coverage ignoring generated code

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f1b116179f
Component: cli
2018-01-03 10:23:32 +01:00
cb8fda044c Activate kubernetes only when experimental cli is enabled
* Refactor tests on version and kubernetes switch
* Fix rebase errors
* Refactor for gocyclo linter

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: ad409767bf
Component: cli
2017-12-28 14:40:10 +01:00
effda473ed Set a global orchestrator flag
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5d375b348a
Component: cli
2017-12-28 14:40:10 +01:00
d1cf6ac921 Add "pid" to unsupported options list
Services do not support custom "pid"-modes (e.g. `--pid=host`), but this
option was ignored silently when deploying a stack.

This patch adds `pid` to the list of unsupported options so that a warning
is printed;

With this patch applied:

    $ docker stack deploy -c docker-compose.yml foobar
    Ignoring unsupported options: pid

    Creating network foobar_default
    Creating service foobar_test

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 70a29b492d
Component: cli
2017-12-27 12:45:42 +01:00
dcfd719f61 Error out on orchestrator command that don't support k8s yet
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1a2244e384
Component: cli
2017-12-26 11:46:59 +01:00
f4626b5de8 Move e2e test on version command to unit tests
* Refactor a little version command

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: ba5d0d8ff5
Component: cli
2017-12-26 11:46:59 +01:00
b5273bceed Update warning
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f5073f81d2
Component: cli
2017-12-26 11:45:56 +01:00
1e23b82bb7 Take @nass review into account
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b5170bde03
Component: cli
2017-12-26 11:45:56 +01:00
baa35d70b2 Refactor stack command
- Define command and subcommands only once
- Use annotations for k8s or swarm specific flags or subcommands

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dedd0db51a
Component: cli
2017-12-26 11:45:56 +01:00
cbbf94a252 Move cli/command/orchestrator to cli/command
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0508c09494
Component: cli
2017-12-26 11:25:22 +01:00
1ebc428804 Move /cli/command/stack/kubernetes/api to /kubernetes
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f960d2d5f3
Component: cli
2017-12-26 11:22:32 +01:00
4b3a19ed1e Add support for kubernetes in docker cli
- Add support for kubernetes for docker stack command
- Update to go 1.9
- Add kubernetes to vendors
- Print orchestrator in docker version command

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: 8417e49792
Component: cli
2017-12-26 11:22:32 +01:00
2a46f74679 Add support for experimental Cli configuration
Allow to mark some commands and flags experimental on cli (i.e. not
depending to the state of the daemon). This will allow more flexibility
on experimentation with the cli.

Marking `docker trust` as cli experimental as it is documented so.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 84fe1a1b5b
Component: cli
2017-12-22 14:48:47 +01:00
3e7449957b Return errors from client in stack deploy configs
Signed-off-by: Paweł Szczekutowicz <pszczekutowicz@gmail.com>
Upstream-commit: a30dd1b6f3
Component: cli
2017-12-18 21:34:04 +01:00
f77854ac3c Show container wait error
If container wait has failed, show an error from the engine
and return an appropriate exit code.

This requires engine changes from https://github.com/moby/moby/pull/34999

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 8471742a8a
Component: cli
2017-12-15 14:15:30 -08:00
29bb8562cc Fix external networks
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9da2602f38
Component: cli
2017-12-11 11:29:49 -05:00
b8234e6bfc Sort component details in template
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7138d6e301
Component: cli
2017-12-07 02:04:10 +01:00
aa9a4c4bff Add platform and its components to docker version output
The Server section of version output is now composed of an Engine
component and potentially more, based on what the /version endpoint
returns.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5f4c5f8bb6
Component: cli
2017-12-07 02:04:10 +01:00
f0f2c2b953 Add missing additionalProperties marker on mount definitions
Signed-off-by: Joffrey F <joffrey@docker.com>
Upstream-commit: 88bbaca294
Component: cli
2017-12-06 12:37:38 -08:00
31d8edcd80 Add shm_size property to build configuration in Compose schema
Signed-off-by: Joffrey F <joffrey@docker.com>
Upstream-commit: e49f14cf36
Component: cli
2017-12-06 12:34:12 -08:00
0aafcdcf36 Merge pull request #732 from ndeloof/8917
closes #8917 introduce `—workdir` option for docker exec
Upstream-commit: 86653f4d57
Component: cli
2017-12-06 10:51:33 -08:00
4a137d3ed6 Annotate worker option for 1.35 API
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 8dc88ea7b5
Component: cli
2017-12-06 17:24:01 +01:00
5deca4bbe1 introduce —workdir option for docker exec
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 591a1273fd
Component: cli
2017-12-06 17:24:01 +01:00
c898dfbd95 Support network.name in the compose schema.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d0b8aa7701
Component: cli
2017-12-06 10:05:24 -05:00
9818aadf77 Add unit tests on config/secret indempotence in stack deploy
Related PR : https://github.com/docker/cli/pull/509

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5ed399e588
Component: cli
2017-11-30 09:45:32 +01:00