Commit Graph

2070 Commits

Author SHA1 Message Date
Nishant Totla 5d56800537 Send registry auth token for service deploy
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit a26bdd8607c62e6e736d06e9ec8f0908c4808d74)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:16:16 -07:00
Stephen J Day 6a06d8d94c api/client/service: shorten to volume-opt
`volume-driver-opt` was too verbose for its own existence and the sanity
of those in the vicinity. The much better, sleeker `volume-opt` replaces
it. 7 bytes and a case of carpal tunnel syndrome are saved!

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit a40b5820c91640183b40e0668f6802415e6adc14)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:16:16 -07:00
Sebastiaan van Stijn 33ff331ad7 Rename --bundle to --file
This renames the '--bundle' flag for docker (stack) deploy
to be consistent with 'docker build'.

Note that there's no shorthand '-f' added for now,
because this may be confusing on 'docker stack config',
which also takes a file, and for which we may want to
have a '--format' flag in future.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 06f35262c47629fef78e36daaa2742c2c0d7c3a9)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:44 -07:00
Yi EungJun a3d9a99c0e Fix the usage for `service rm` command
Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
(cherry picked from commit cf61cd3a920809f6a0be44a584f365544acaf1a9)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:44 -07:00
Vincent Demeester 1b131678da Add documentation for stack commands
Also removes the `-f` flags of bundle to follow the single-letter flags
evaluation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 10919e890942cbdaa65f180dbcd475d21b9c6713)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:43 -07:00
Daniel Nephin 0649299908 Dont run man generation as part of test-unit.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 47cca88c8c151ebf3dd25adcf28ac1b2f75c76fb)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:42 -07:00
Daniel Nephin 3430f2e756 Set Long text for volume commands so they can be used to generate man pages.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 25e9b06ac0750396f35d3f52f71c44b1072f0972)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:42 -07:00
Sebastiaan van Stijn 45920009cc Don't automagically add "[OPTIONS]" to usage
This removes the logic to automatically
add [OPTIONS] to the usage output.

The current logic was broken if a command
only has deprecated or hidden flags, and
in many cases put the [OPTIONS] in the
wrong location.

Requiring the usage string to be set
manually gives more predictable results,
and shouldn't require much to maintain.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4f0b5105524649169d765bb94c2806209ab21904)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:41 -07:00
Dong Chen f3fea0ea88 Support node label update.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
(cherry picked from commit e1165cdfd1d666b1d4e041ef6a0d5fd049e041c1)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:26 -07:00
Stephen J Day 71a8ee2f49 swarm: add log driver support for services
Adds log driver support for service creation and update. Add flags
`--log-driver` and `--log-opt` to match `docker run`. Log drivers are
configured per service.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit e778ba2d5b1e5074fe413dffaa365f3d37b175c7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:25 -07:00
John Starks 4d0f6041ad Windows: Always enable VT emulation
Always enable VT output emulation when starting the process so that
non-attaching commands can still output VT codes.

Also remove the version block for using the native console and just rely
on supported flags being present.

Signed-off-by: John Starks <jostarks@microsoft.com>
(cherry picked from commit 4acc2c7499425b9c2521977019d9fe4da73e6af8)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:25 -07:00
Anusha Ragunathan da773af885 Print plugin name on successful install, enable and disable.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 6dca1e6d3f875de7a6652390f65fdb8ec2623e3b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:25 -07:00
allencloud 5fcac2cdfd better command `docker network create -h` output
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit d0081a0f476f91b0dc6b28c480e7c95c06b05ebb)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:24 -07:00
Daniel Nephin cf2b19a72e Only show port name if set.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 909c596fa5956ed02b4708a437a828a2829c9bd5)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:13 -07:00
Daniel Nephin fc3d339109 Fix multi-remove during service update.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 3249c1d0e79f57642b96f6692ffa44f46f15b602)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:59 -07:00
Daniel Nephin fad55b0ea1 Change the add/update flags to include 'add'
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 4c6faa434071b87a55256e86020cb78495e9951d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:59 -07:00
Daniel Nephin 1cf4bd4df7 PR feedback
improve help text for service update remove flags
implement proper merge update of placement flag
more code re-use in update functions using a toRemove set.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit ead1f62abae5e5ad188536a01fb88d55339e3f63)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:59 -07:00
Daniel Nephin b5f1b77a23 Add remove flags for service update
with unit tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit dc33fc1ff433fcc70efc22f5cea9b87c6ec64a3b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:59 -07:00
Aaron Lehmann 32b12ed57a Use spaces, not tabs, to format sample "swarm join" command
Using tabs here seems to cause copy/paste problems in some terminals.
Using spaces is safer.

Fixes #24609

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 6de8fcb2f2baf335fc24e10909078199af528e8d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:59 -07:00
Dong Chen a769e22b70 Fix service inspect --pretty.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
(cherry picked from commit 08ae4e544d5744e975da0f89c4f04baa2b8474f2)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:58 -07:00
Sebastiaan van Stijn a89bd71433 Remove dead code for "inspect --pretty"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4d87f9083bfb3147566997b3f48c4805229f7c94)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:58 -07:00
Daniel Nephin 9f86a9712d Merge service command and args as a string.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 674d227445887ea2f9a0fde6ebb7838bcce58578)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:58 -07:00
Sebastiaan van Stijn 7491ebe00a Remove shorthand flags for "mount", "pretty", and "no-resolve"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7bf0faf42377a91a8535b443201d9ad62326889b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:58 -07:00
Vincent Demeester cda05164ba Remove --command flag for service update
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit e4a024d5902df1d3db8b9fff8865304afa2305e6)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:57 -07:00
Sebastiaan van Stijn ca9805f78d Make labels human readable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ea365e4cb37d037046364773d01a744b1258ce4e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:55 -07:00
Akihiro Suda eb8bbea3d1 Remove "Yes"/"No" and use "true"/"false" consistently in `docker info`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit c6b7bd1aa6b94ab242d6310419f1c3a7964ffa02)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:21 -07:00
johnharris85 c0a787db2b Add support for comma-separated --auto-accept syntax.
Signed-off-by: John Harris <john@johnharris.io>

(cherry picked from commit 8e148827734a94165156adfd0f6d202d28dff142)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-12 15:50:36 -07:00
Qiang Huang 88d82eee4b Remove execution driver
We use containerd and there is no execution driver anymore.

Addresses: https://github.com/docker/docker/issues/24461

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
(cherry picked from commit 1fb1136fecfd761300a38f64ac9178979cc0b270)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-12 15:50:18 -07:00
allencloud 25b235a1b1 return err when stack name does not exist
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 416613f2e54581c62d3efa1c4f0288b6e7d58365)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-12 15:43:39 -07:00
Madhu Venugopal b74b71ecb3 fixes #23983
Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 6a4b21bd863f955d05e5df1e54be4dfcf6889870)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:29 -07:00
Madhu Venugopal 65a256f7a8 Revert "Fixed a few network UI issues in swarm-mode"
This reverts commit 0ce5158a2a9a3f10a62d3c1ea289c55e524cdac5.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 4623276886033aedb4932c3996c7f61e7fc35861)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:29 -07:00
Vincent Demeester f831be849b Updates on cli reference documentation
- Update ps with `--last` flag
- Update commands with current output
- Make sure hugo does not detect the wrong language
- Update usage for `tag` command to be more coherent with the other ones

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit f4cfc6b9830ed236eb588d6a4dddca7455145e70)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:27 -07:00
Aaron Lehmann a00d12a8dd Generate a swarm joining secret if none is specified
The current behavior of `docker swarm init` is to set up a swarm that
has no secret for joining, and does not require manual acceptance for
workers. Since workers may sometimes receive sensitive data such as pull
credentials, it makes sense to harden the defaults.

This change makes `docker swarm init` generate a random secret if none
is provided, and print it to the terminal. This secret will be needed to
join workers or managers to the swarm. In addition to improving access
control to the cluster, this setup removes an avenue for
denial-of-service attacks, since the secret is necessary to even create
an entry in the node list.

`docker swarm init --secret ""` will set up a swarm without a secret,
matching the old behavior. `docker swarm update --secret ""` removes the
automatically generated secret after `docker swarm init`.

Closes #23785

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 7342e42fcecbc243bcb8723b8422879662452017)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:27 -07:00
Vincent Demeester 23be238414 Use "on-failure" for both containers and services
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit a859a336475f39c7b7d7739c58a1dae40df86a86)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:21 -07:00
Brian Goff 843b4a93fe Use newer default values for mounts CLI
In the API:
`Writable` changed to `ReadOnly`
`Populate` changed to `NoCopy`

Corresponding CLI options updated to:
`volume-writable` changed to `volume-readonly`
`volume-populate` changed to `volume-nocopy`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 56f3422468a0b43da7bae7a01762ce4f0a92d9ff)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:30 -07:00
Brian Goff f331f05f9a re-vendor engine-api
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 140ec59db6e413de5025fb8686b97bf80b66c519)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:23 -07:00
Anil Madhavapeddy 0a21d2b8d0 make `docker service --help` text for `--endpoint-mode` more consistent
Previously:

```
      --constraint value             Placement constraints (default [])
      --endpoint-mode string         Endpoint mode(Valid values: vip, dnsrr)
<snip>
      --restart-condition string     Restart when condition is met (none, on_failure, or any)
```

Now:

```
      --constraint value             Placement constraints (default [])
      --endpoint-mode string         Endpoint mode (vip or dnsrr)
<snip>
      --restart-condition string     Restart when condition is met (none, on_failure, or any)
```

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
(cherry picked from commit 2de9585f5ea798cbff23045d9d19ba239d5e5431)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:23 -07:00
Vincent Demeester 6966df5de7 Validate hostname starting from 1.24 API.
In order to keep a little bit of "sanity" on the API side, validate
hostname only starting from v1.24 API version.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 6daf3d2a783fd042e870c8af8bbd19fc28989505)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:19 -07:00
allencloud e8c136169d fix severe fd leak in stack
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 0af04b613220060ef1fc21ca2f1d551f8f868af8)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:15 -07:00
Madhu Venugopal b6349ac163 Fixed a few network UI issues in swarm-mode
* Detect name conflicts on network creation
* Detect and prevent network connect/disconnect for managed containers

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 0ce5158a2a9a3f10a62d3c1ea289c55e524cdac5)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:15 -07:00
Derek McGowan fcdaa2d6b3 Atomically save libtrust key file
The libtrust keyfile which is used to set the "ID" property of a daemon must be generated or loaded on every startup.
If the process crashes during startup this could cause the file to be incomplete causing future startup errors.
Ensure that the file is written atomically to ensure the file is never in an incomplete state.

Fixes #23985

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 9836162446bd0deadecbf0eed38ef3c134754f16)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:15 -07:00
Vincent Demeester bbc85af0bd Allow service and node filter to be name…
… on `docker node tasks` and `docker service tasks` commands.
This changes is mainly server-side (between engine api and
swarmkit). There is just a check in `api/client/service/tasks.go` to
handle the special *self* meaning.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit b0fc5a21f1138f48e0431a550c936e8908d72840)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:15 -07:00
allencloud 58eb74778b fix stdout and stderr in api client
Signed-off-by: allencloud <allen.sun@daocloud.io>

(cherry picked from commit 533bd82e41fee352962cb5ae0a49b9edbdebc25e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:14 -07:00
Tonis Tiigi ef62360342 Mask swarm secrets from daemon logs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 8b8f86aec95ec73881c2dfb6e990784014d61e6e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:14 -07:00
Shoubhik Bose 0e1d691b7f 23837 Added long flag to docker ps for checking latest n containers. Updated to "--last"
Signed-off-by: Shoubhik Bose <sbose78@gmail.com>
(cherry picked from commit 256edc24fc8f32a93a0572e5d05f3ca1389238da)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:24 -07:00
Sebastiaan van Stijn 15dee375d2 Improve timestamp formatting
lowercase the output, to prevent "About" halfway,
and add "ago" to the output, as timestamps are always
in the past.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 04c94a013ccba1690933156830efdc314de67ef8)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:23 -07:00
Sebastiaan van Stijn 67f4f5d2c4 rename desired_state filter to desired-state
For consistency with other filters (such as
"is-official"), this renames the desired_state
filter to "desired-state".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d761719eb4e45fbd6f092f6d0b4eb42206e298f6)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:22 -07:00
Tonis Tiigi f9f7abfffe Add support for external CAs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 11085b2260a78b3248f3e98e0a1e3203431fae22)
2016-07-01 00:40:37 -07:00
Tonis Tiigi 4905c858db Update to new swarmkit/engine-api
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 9b652738363d92fbe6e43b3981cdcc94bdb72c76)
2016-07-01 00:40:37 -07:00
Nishant Totla ae47b00c6c Adding a flag to specify sending of registry auth
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 538bac39d7fe93562922b89e9a294096be48fb59)
2016-07-01 00:40:31 -07:00