Commit Graph

475 Commits

Author SHA1 Message Date
Silvin Lubecki 14fcadffb1 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>
2018-01-24 09:17:08 -08:00
Vincent Demeester fbb9de2cfc
Merge pull request #780 from thaJeztah/fix-network-add
Fix --network-add adding duplicate networks
2018-01-22 14:45:58 -08:00
Sebastiaan van Stijn 44a1168ae5
Merge pull request #696 from mlaventure/attach-use-containerwait
attach: Use ContainerWait instead of Inspect
2018-01-20 23:55:16 +01:00
Vincent Demeester 2d29732f40
Mark docker-manifest command as experimental (cli)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-01-18 13:19:33 -08:00
Vincent Demeester 11dfa23a5d
Merge pull request #138 from clnperez/manifest-cmd
Add manifest command
2018-01-18 22:15:49 +01:00
Daniel Nephin fab4762941
Merge pull request #581 from thaJeztah/better-port-range-printing
Improve presentation of published port ranges
2018-01-16 17:16:45 -05:00
Sebastiaan van Stijn 14c62f655a
Merge pull request #808 from ethan-haynes/698-tmpfs-mode-compose
added support for tmpfs-mode in compose file
2018-01-16 20:59:17 +01:00
Daniel Nephin 1620538c49
Merge pull request #755 from kolyshkin/wait
Show container wait error
2018-01-16 14:40:36 -05:00
Kir Kolyshkin 85ddaee5af container.waitExitOrRemoved(): add a test case
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-01-16 10:16:28 -08:00
Ethan Haynes cd69d082ea added support for tmpfs-mode in compose file
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
2018-01-16 10:52:26 -06:00
Ethan Haynes b15362ce32 adding tmpfs field to the compose 3.6v file spec and updating binary
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
2018-01-16 10:50:40 -06:00
Ethan Haynes 2b8cc52409 adding config_schema_v3.6.json and updating binary
Signed-off-by: Ethan Haynes <ethanhaynes@alumni.harvard.edu>
2018-01-16 10:44:08 -06:00
Akim Demaille f83aa7b705 Remove: add missing eol when --force is passed
Signed-off-by: Akim Demaille <akim.demaille@docker.com>
2018-01-16 09:29:53 +01:00
Sebastiaan van Stijn d845b4d36a
golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-13 13:16:34 +01:00
Sebastiaan van Stijn a812995f98
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>
2018-01-11 21:16:37 +01:00
Sebastiaan van Stijn e6ebaf55dd
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>
2018-01-09 20:42:09 +01:00
Christy Perez db6d87216d 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>
2018-01-08 11:12:57 -06:00
Christy Perez 02719bdbb5 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>
2018-01-08 10:43:56 -06:00
Michael Friis 99e3b4cd93 use 'config' over 'configuration file'
Signed-off-by: Michael Friis <friism@gmail.com>
2018-01-05 13:19:53 -08:00
Vincent Demeester e708c900f8
Merge pull request #721 from silvin-lubecki/kube
Add kubernetes support to docker/cli
2018-01-03 17:20:43 +01:00
Silvin Lubecki 18c44e0829 Check and return error while creating kubernetes secret and config maps.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2018-01-03 15:46:19 +01:00
Silvin Lubecki f1b116179f 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>
2018-01-03 10:23:32 +01:00
Silvin Lubecki ad409767bf 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>
2017-12-28 14:40:10 +01:00
Vincent Demeester 5d375b348a Set a global orchestrator flag
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-12-28 14:40:10 +01:00
Sebastiaan van Stijn 70a29b492d
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>
2017-12-27 12:45:42 +01:00
Vincent Demeester 1a2244e384 Error out on orchestrator command that don't support k8s yet
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-12-26 11:46:59 +01:00
Silvin Lubecki ba5d0d8ff5 Move e2e test on version command to unit tests
* Refactor a little version command

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2017-12-26 11:46:59 +01:00
Vincent Demeester f5073f81d2 Update warning
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-12-26 11:45:56 +01:00
Vincent Demeester b5170bde03 Take @nass review into account
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-12-26 11:45:56 +01:00
Vincent Demeester dedd0db51a 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>
2017-12-26 11:45:56 +01:00
Vincent Demeester 0508c09494 Move cli/command/orchestrator to cli/command
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-12-26 11:25:22 +01:00
Vincent Demeester f960d2d5f3 Move /cli/command/stack/kubernetes/api to /kubernetes
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-12-26 11:22:32 +01:00
Vincent Demeester 8417e49792 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>
2017-12-26 11:22:32 +01:00
Vincent Demeester 84fe1a1b5b
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>
2017-12-22 14:48:47 +01:00
Paweł Szczekutowicz a30dd1b6f3 Return errors from client in stack deploy configs
Signed-off-by: Paweł Szczekutowicz <pszczekutowicz@gmail.com>
2017-12-18 21:34:04 +01:00
Kir Kolyshkin 8471742a8a 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>
2017-12-15 14:15:30 -08:00
Daniel Nephin 9da2602f38 Fix external networks
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-12-11 11:29:49 -05:00
Brian Goff 7138d6e301 Sort component details in template
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-12-07 02:04:10 +01:00
Tibor Vass 5f4c5f8bb6 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>
2017-12-07 02:04:10 +01:00
Joffrey F 88bbaca294 Add missing additionalProperties marker on mount definitions
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-06 12:37:38 -08:00
Joffrey F e49f14cf36 Add shm_size property to build configuration in Compose schema
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-06 12:34:12 -08:00
Sebastiaan van Stijn 86653f4d57
Merge pull request #732 from ndeloof/8917
closes #8917 introduce `—workdir` option for docker exec
2017-12-06 10:51:33 -08:00
Nicolas De Loof 8dc88ea7b5
Annotate worker option for 1.35 API
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2017-12-06 17:24:01 +01:00
Nicolas De Loof 591a1273fd
introduce `—workdir` option for docker exec
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2017-12-06 17:24:01 +01:00
Daniel Nephin d0b8aa7701 Support network.name in the compose schema.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-12-06 10:05:24 -05:00
Vincent Demeester 5ed399e588
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>
2017-11-30 09:45:32 +01:00
Sebastiaan van Stijn d921d5cc39
Merge pull request #694 from riyazdf/trust-inspect
docker trust inspect
2017-11-29 11:33:53 -08:00
Riyaz Faizullabhoy a9428285f0 Use default inspect formatting, remove omitempty, update docs
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-11-29 10:52:35 -08:00
Riyaz Faizullabhoy 1eb87cc096 support multiple arguments to trust inspect
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-11-29 10:52:34 -08:00
Riyaz Faizullabhoy cd38d39d0d add docker trust inspect command for JSON viewing
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-11-29 10:52:34 -08:00