Commit Graph

266 Commits

Author SHA1 Message Date
0a503dae01 Merge pull request #366 from twistlock/plugable_secrets_backend
Plugable secrets backend
Upstream-commit: 3edf97e5a9
Component: cli
2017-09-18 19:25:15 +02:00
69753f2d25 Merge pull request #513 from shouze/reset-id-pair-during-build-to-avoid-cache-busting
Reset uid/gid to 0 in build context to fix cache busting issues on ADD/COPY
Upstream-commit: 7b77ab5c60
Component: cli
2017-09-13 15:19:26 -04:00
ad105d4aec Use non-detached mode as default for service commands
Commit 330a0035334871d92207b583c1c36d52a244753f added a `--detach=false` option
to various service-related commands, with the intent to make this the default in
a future version (17.09).

This patch changes the default to use "interactive" (non-detached), allowing
users to override this by setting the `--detach` option.

To prevent problems when connecting to older daemon versions (17.05 and below,
see commit db60f25561), the detach option is
ignored for those versions, and detach is always true.

Before this change, a warning was printed to announce the upcoming default:

    $ docker service create nginx:alpine
    saxiyn3pe559d753730zr0xer
    Since --detach=false was not specified, tasks will be created in the background.
    In a future release, --detach=false will become the default.

After this change, no warning is printed, but `--detach` is disabled;

    $ docker service create nginx:alpine
    y9jujwzozi0hwgj5yaadzliq6
    overall progress: 1 out of 1 tasks
    1/1: running   [==================================================>]
    verify: Service converged

Setting the `--detach` flag makes the cli use the pre-17.06 behavior:

    $ docker service create --detach nginx:alpine
    280hjnzy0wzje5o56gr22a46n

Running against a 17.03 daemon, without specifying the `--detach` flag;

    $ docker service create nginx:alpine
    kqheg7ogj0kszoa34g4p73i8q

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0c27355f7b
Component: cli
2017-09-13 12:27:55 +02:00
6e9f643bb2 Reset idPair during build to avoid cache busting
Signed-off-by: Sébastien HOUZÉ <cto@verylastroom.com>
Upstream-commit: 7e407610d4
Component: cli
2017-09-13 02:04:03 +02:00
033298b8f6 Refactor/cleanup of docker info
Some mild refactoring of the docker info command;

- Use `fmt.Fprinln()` instead of `fmt.Fprintf()` where possible
- Rename `fprintfIfNotEmpty()` to `fprintlnNonEmpty()`, and removed
  return variables, because they were not used. `fprintlnNonEmpty()`
  now uses fmt.Fprintln()` instead of `fmt.Fprintf()`, because
  formatting was not used.
- Use `fprintlnNonEmpty()` to get rid of some `if` statements
- Extract printing Swarm-related information to a `printSwarmInfo()` function
- Change `Http Proxy` and `Https Proxy` to `HTTP Proxy` / `HTTPS Proxy`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6f1b510843
Component: cli
2017-09-11 15:13:06 +02:00
30a4e0ab8e Merge pull request #510 from dnephin/add-parse-log-details
Use a local copy of ParseLogDetails
Upstream-commit: aae519d0f6
Component: cli
2017-09-08 11:38:24 -07:00
d7ed53048b Use golden files for tests that expect end-of-line whitespace
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 51587de1c4
Component: cli
2017-09-07 17:50:44 -04:00
0d3330814c Use a local copy of ParseLogDetails
It's being removed from client/

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a747389bf4
Component: cli
2017-09-07 12:50:25 -04:00
3aa4929239 Plugable secret backend
This commit extends SwarmKit secret management with pluggable secret
backends support.
Following previous commits:
1. docker/swarmkit@eebac27434
2. docker/docker@08f7cf0526
Added driver parameter to `docker secret` command.

Specifically:

1. `docker secret create [secret_name] --driver [driver_name]`
2.  Displaying the driver in
```
    $ docker secret ls
    $ docker secret inspect [secret_name]
    $ docker secret inspect [secret_name] -pretty
```

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 0ee9e05d8f
Component: cli
2017-09-07 11:10:44 +03:00
28cf6767d3 Merge pull request #424 from simonferquel/update-vendoring
updated vendoring
Upstream-commit: 5c5cdd0e36
Component: cli
2017-09-05 15:06:09 -04:00
e76adc6a0e Merge pull request #406 from ksouf/issue_37_network_list_test
adding network list test
Upstream-commit: ec99774a85
Component: cli
2017-09-05 11:24:32 -04:00
4bafd44516 updated vendoring
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: a0113c3a44
Component: cli
2017-09-01 19:41:06 -04:00
ee07288be3 Move output of stack rm to stdout
Signed-off-by: French Ben <frenchben@docker.com>

Update for the test to capture the proper removal

Signed-off-by: French Ben <frenchben@docker.com>

Satisfy lint length limit

Signed-off-by: French Ben <frenchben@docker.com>

Updated e2e test

Signed-off-by: French Ben <frenchben@docker.com>
Upstream-commit: bb8f49773c
Component: cli
2017-09-01 14:25:20 -07:00
d48b9a840a Merge pull request #489 from dnephin/fix-container-run
Fix crash in container run after pulling an image
Upstream-commit: d817967647
Component: cli
2017-08-31 18:11:26 -04:00
5ed8076112 Merge pull request #484 from ripcurld0/ps_exit_1
When nothing found in stack exit with exit code 1
Upstream-commit: 5a9bf7f359
Component: cli
2017-08-31 17:13:00 -04:00
264557313d Fix crash in containe run after pulling an image.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a0d8d80250
Component: cli
2017-08-31 17:08:02 -04:00
384ceb07e9 When nothing found in stack exit with exit code 1
To keep on a consistent behaviour such as in docker-service-ps
if docker-stack-ps didn't find a given stack, the command line
should exit with exit code 1.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 79f9af2475
Component: cli
2017-08-30 23:25:36 +03:00
8be8bd8ae1 Merge pull request #477 from dnephin/some-tests-for-container-command
A few tests for container command
Upstream-commit: 8ea02f6f08
Component: cli
2017-08-30 09:38:38 -07:00
811eac4392 Reduce complexity in cli/command/container
Add tests for exec and cleanup existing tests.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e7f90b6b38
Component: cli
2017-08-29 19:25:50 -04:00
ee93512169 Remove test for code not in this repo.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dae1b7112c
Component: cli
2017-08-29 13:19:28 -04:00
6eb6b7d9d2 adding network list test
Signed-off-by: khaled souf <khaled.souf@gmail.com>
Upstream-commit: 15d92a9e03
Component: cli
2017-08-29 16:30:37 +02:00
83dbde2057 Reduce complexity of two formatters
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d318c4112b
Component: cli
2017-08-28 12:49:07 -04:00
7ae4b76cda Merge pull request #471 from cyli/surface-autolock
Include whether the managers in the swarm are autolocked as part of `docker info`
Upstream-commit: 7e52344cd2
Component: cli
2017-08-28 17:46:09 +02:00
6143a4613a Include whether the managers in the swarm are autolocked as part of docker info.
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 3428b78e96
Component: cli
2017-08-25 16:33:46 -07:00
3b7e9c65c0 Merge pull request #367 from kolyshkin/ipcmode
Introduce/document new IPC modes
Upstream-commit: 8ebc03a71f
Component: cli
2017-08-25 09:48:00 +02:00
7313d24a20 Merge pull request #445 from dnephin/add-end-to-end-suite
Add end to end suite
Upstream-commit: 6c3d93bbb6
Component: cli
2017-08-23 16:16:09 -07:00
e11d0e6967 Merge pull request #440 from ripcurld0/search_format
Add --format to docker-search
Upstream-commit: 05308fcec7
Component: cli
2017-08-22 19:10:53 -04:00
19e250d57c Merge pull request #456 from dnephin/add-tests-for-client
Add unit tests for initializing the client
Upstream-commit: 5e1d0289f4
Component: cli
2017-08-22 16:08:36 -07:00
93c266f248 Add --format to docker-search
Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 88cc47ad5c
Component: cli
2017-08-23 01:37:54 +03:00
b8932dcdf4 Merge pull request #463 from dnephin/remove-pkg-testutil
Remove docker/docker/pkg/testutil
Upstream-commit: 79ecfa876b
Component: cli
2017-08-22 13:53:03 -04:00
cd24988c20 support --compose-file - as stdin
Signed-off-by: Marco Mariani <marco.mariani@alterway.fr>
Upstream-commit: 3a0b967c05
Component: cli
2017-08-22 17:55:59 +02:00
ba672661c5 Merge pull request #439 from ripcurld0/fix_image_ls_digest
Show images digests when "{{.Digest}}" is in format
Upstream-commit: 317b735573
Component: cli
2017-08-22 16:17:43 +02:00
01f2e768d7 Use new internal testutil.ErrorContains()
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 846a31aa50
Component: cli
2017-08-22 10:14:25 -04:00
b141cbce57 Move internal/test package out of cli.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b3f843afe2
Component: cli
2017-08-22 10:14:25 -04:00
0b20e1c511 Show images digests when "{{.Digest}}" is in format
This patch fixes the following bug:

Running "docker image ls --digests" will add images digests
to the image table. However, when using "format" to display
images digests all of them are "<none>".

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 83112f6343
Component: cli
2017-08-22 16:55:10 +03:00
243671339d Merge pull request #386 from thaJeztah/fix-image-resolve-detection
Fix image resolve detection
Upstream-commit: 8da1daeefa
Component: cli
2017-08-22 15:05:39 +02:00
31162a9a25 Dropped hyphen in bind mount where appropriate
Signed-off-by: Christophe Vidal <kriss@krizalys.com>
Upstream-commit: 037029414d
Component: cli
2017-08-19 21:14:48 +07:00
43172bf261 Merge pull request #205 from redpanda/rollback
Add 'docker service rollback' subcommand
Upstream-commit: 3c7ede6a68
Component: cli
2017-08-19 15:56:14 +02:00
2e782847eb Add unit tests for initializing the client.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 930f97dd09
Component: cli
2017-08-18 12:49:23 -04:00
cded911aad Add 'docker service rollback' subcommand
Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Implement runRollback to not use runUpdate

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Add version tag and add flag quiet to suppress progress output

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Removed flags from warnDetachDefault

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Used command.Cli interface

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Add detach flag on rollback command

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Create a fakeClient for service commands

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Added unit test for rollback command

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Used command.Cli interface instead of *command.DockerCli in service commands

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Revert "Removed flags from warnDetachDefault"

This reverts commit 3e4f601c8a82cc2599a755dc693409bbc47917fc.

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Fixed test.NewFakeCli instanciation

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Removed unused receiver

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Replaced cli by dockerCli

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Revert "Removed unused receiver"

This reverts commit 604ef7c13df3d019949ca81d992db501114dafce.

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>

Fixed last typo

Signed-off-by: Jimmy Leger <jimmy.leger@gmail.com>
Upstream-commit: 11d471d660
Component: cli
2017-08-16 22:18:36 +02:00
55bd0229fa Replace pkg/testutil/tempfile with gotestyourself/fs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 15837afa77
Component: cli
2017-08-16 14:23:28 -04:00
34fe016d0d Update volume command tests to use the new golden
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 505a0fe45f
Component: cli
2017-08-16 14:23:28 -04:00
a5b8c46809 Update swarm command tests to use the new golden
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3d68aa8416
Component: cli
2017-08-16 14:23:28 -04:00
38bd6cfe47 Update stack and task command tests to new golden
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1dd742eac8
Component: cli
2017-08-16 14:23:28 -04:00
2c6a1a2476 Update service and secret command tests to new golden
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4c62d7288f
Component: cli
2017-08-16 14:23:28 -04:00
79c79c9b8f Update node command tests to the new golden
Also remove some superfluous tests that are now covered by a strict golden.Assert

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0e2bf7420a
Component: cli
2017-08-16 14:23:15 -04:00
c06d7f05e3 Update image command tests to use the new golden
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 75f7bfedf8
Component: cli
2017-08-16 14:20:36 -04:00
5a6dec9ec1 Update config and checkpoint commands to use gotestyourself/golden
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f9007ad7db
Component: cli
2017-08-16 14:19:00 -04:00
66fb82e7e8 Add first e2e test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b5cb5ee446
Component: cli
2017-08-16 10:46:40 -04:00
133a5fd166 Merge pull request #436 from thaJeztah/improve-singular-plural-message
Singularize / pluralize "argument(s)" in error message
Upstream-commit: 3b8cf20a0c
Component: cli
2017-08-14 11:06:25 -04:00