Commit graph

1256 commits

Author SHA1 Message Date
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 f4cfc6b983)
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 7342e42fce)
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 a859a33647)
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 56f3422468)
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 140ec59db6)
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 2de9585f5e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:23 -07:00
allencloud
e8c136169d fix severe fd leak in stack
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 0af04b6132)
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 b0fc5a21f1)
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 533bd82e41)
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 256edc24fc)
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 04c94a013c)
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 d761719eb4)
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 11085b2260)
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 9b65273836)
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 538bac39d7)
2016-07-01 00:40:31 -07:00
Nishant Totla
d199f78d18 Updating header name and executor
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit af5df117a8)
2016-07-01 00:39:51 -07:00
Nishant Totla
c5ddd5bb7f Passing registry auth token for service create and update
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 93ec5cda55)
2016-07-01 00:39:51 -07:00
Vincent Demeester
1e30b67b4d Fix --filter=desired_state behaviour
Just like `docker service tasks`, we should add `desired_state` filters
only in case there is no provided filters.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 3c194bd2a4)
2016-06-30 17:12:46 -07:00
allencloud
acc31b4448 fix comments and handle err
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit cc054f3195)
2016-06-30 17:12:45 -07:00
Yong Tang
b34706b152 Use HOSTNAME in the output of docker node ls
This fix tries to address an issue raised in #24090 where
the title field of `docker node ls` use NAME instead of
HOSTNAME. Yet the content of this field is actually
hostname.

The fix makes needed changes for the output of
`docker node ls`.

An additional test has been added to cover the change in
this fix.

This fix fixes #24090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 4bc91ceeb7)
2016-06-30 17:12:45 -07:00
Antonio Murdaca
b375ccfee7 fix warn message typos
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit a4143e6756)
2016-06-30 17:12:37 -07:00
allencloud
49981f8327 make cmd short short consistency and change docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 184afb92bf)
2016-06-30 17:11:29 -07:00
Lei Jitang
bb09b3e5f1 Remove dm.no_warn_on_loop_devices in info warning
I think we doesn't provide dm.no_warn_on_loop_devices option
at all. I didn't found any code to handle this option.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 2aa01e0fbc)
2016-06-30 16:58:15 -07:00
Daniel Nephin
0d061f680a Fix mount opts error message.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit c8659d3cc5)
2016-06-30 16:57:31 -07:00
Daniel Nephin
cd0ffa9359 Fix service update of Args
add a unit test

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 07b59ef210)
2016-06-30 16:57:31 -07:00
Dong Chen
6661a20564 Block service mode change.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
(cherry picked from commit 72f7cebfb0)
2016-06-30 16:47:50 -07:00
allencloud
a3b8c1a80e uppercase output in node inspect to keep consistency
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 89582e1a34)
2016-06-30 16:47:50 -07:00
Aanand Prasad
b84206157a Update bundle extension
It's now .dab, for Distributed Application Bundle

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
(cherry picked from commit 61e2d4240b)
2016-06-30 16:47:49 -07:00
Brian Goff
5ff054ef51 Fix panic due to nil bind options
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 4c2e1a9cb0)
2016-06-30 16:47:49 -07:00
Alexander Morozov
d985acae68 cli: fix network create usage
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
(cherry picked from commit 159e7341ad)
2016-06-30 16:47:49 -07:00
Tonis Tiigi
80405bef73 Do not show tasks from down nodes as active in ls
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 5d4401d6d7)
2016-06-30 16:47:47 -07:00
orkaa
d4cdc5172c For the lulz! (evalulate -> evaluate)
Signed-off-by: orkaa <orkica@gmail.com>
(cherry picked from commit 1bdbfa5770)
2016-06-30 16:47:45 -07:00
Tonis Tiigi
3d06cd4910 Unify swarm init and update options
Add api side validation and defaults for init and
join requests.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit fb3eb1c27e)
2016-06-30 16:47:44 -07:00
bin liu
6a5a150722 fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
(cherry picked from commit 950073aabb)
2016-06-30 16:47:43 -07:00
nick
62d50a3f13 Fix misspell typos
Signed-off-by: nick <nicholasrusso@icloud.com>
(cherry picked from commit 7135afa79b)
2016-06-30 16:47:43 -07:00
Daniel Nephin
8a93ff1ffb Remove dead code from node update.
Also share mode code between update commands
and use flag constants

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit cacaeab9db)
2016-06-30 16:47:39 -07:00
Daniel Nephin
0641b8ba9c Use flag constants for swarm flag.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit c08a50dbd1)
2016-06-30 16:47:39 -07:00
Daniel Nephin
7b0bb3f92c add more flag constants to service update.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 9d1f3373b3)
2016-06-30 16:47:39 -07:00
Zhang Wei
c40debc362 Make --help information consistent
Other docker command always print "[OPTIONS]" right after `docker
COMMAND`, but `build` and `push` has inconsistent help message.

This commit will fix help information format.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
(cherry picked from commit 0e53976336)
2016-06-30 16:47:37 -07:00
Yong Tang
92ffbd2b52 Fix docker start error with renamed container
This fix tries to fix the issue raised in #23716 where `docker start`
causes an error of `No such container:` if the container has been
renamed before `docker start` returns.

The issue is that `docker start` use container name passed at the
beginning to check for exit code at the end of the `docker start`.

This fix addresses the issue by always use container's `ID` to get
the information during `docker start`.

Additional integration tests have been added to cover this fix.

This fix fixes #23716.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 6e86733b47)
2016-06-30 16:47:37 -07:00
Daniel Nephin
3c35da6029 Add tests for AutoAcceptOption
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit c544649874)
2016-06-18 20:58:24 -07:00
Daniel Nephin
e090e2dbd4 Support a listen addr without a port, and add tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 595e79b805)
2016-06-18 20:58:24 -07:00
Victor Vieux
6b2cd6e843 accept uppercase endpoint mode
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit 8a0c5f1578)
2016-06-18 20:58:24 -07:00
Arnaud Porterie (icecrime)
f1f2461e09 Change docker service update semantics
Change `docker service update` to replace attributes of the target
service rather than augment them. One particular occurrence where the
previous behavior proved problematic is when trying to update a port
mapping: the merge semantics provided no way of removing published
ports, but strictly of adding more.

The utility merge* functions where renamed accordingly to update*.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
(cherry picked from commit 1f8ab93b44)
2016-06-18 20:58:23 -07:00
Arnaud Porterie (icecrime)
944a8f16c7 Improve docker service inspect --pretty
Remove capitalization in placement, and remove spurious `\t`.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
(cherry picked from commit 3c60b7b984)
2016-06-17 13:09:13 -07:00
Vincent Demeester
6eaac7be89 Update plugin command with defaulttag
This way, you don't have to specify the ":latest" tag for some command
and not for others

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit cb321e82db)
2016-06-17 13:09:13 -07:00
Tibor Vass
2ae7330140 plugins: fix usage for plugin commands
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 65ed9daf70)
2016-06-17 13:09:12 -07:00
Tibor Vass
f24e5d79bc plugins: install should not automatically accept all permissions
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 4b70d4561e)
2016-06-17 13:09:12 -07:00
Tonis Tiigi
bbc214fa9b Add newline to promote/demote message
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 3386e3570a)
2016-06-17 13:09:12 -07:00
Anil Madhavapeddy
4b2883fac6 docker swarm: more consistent CLI help
This changes `docker swarm help` to be consistent with capitals
and removes full stops.

Before:

```
Commands:
  init        Initialize a Swarm.
  join        Join a Swarm as a node and/or manager.
  update      update the Swarm.
  leave       Leave a Swarm.
  inspect     Inspect the Swarm
```

After:

```
Commands:
  init        Initialize a Swarm
  join        Join a Swarm as a node and/or manager
  update      Update the Swarm
  leave       Leave a Swarm
  inspect     Inspect the Swarm
```

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
(cherry picked from commit 0ec78739ac)
2016-06-17 13:09:12 -07:00