Compare commits

...

2694 Commits

Author SHA1 Message Date
29fcd5dfae Merge pull request #81 from andrewhsu/cl
cherry-pick update rpm changelog
2017-06-15 02:46:13 -07:00
9600fb4e78 update rpm changelog
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 659d6015b6bf8ec3c24cf5377f3eda88beed0a10)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-15 09:44:20 +00:00
0f80f28c1a Merge pull request #80 from andrewhsu/rc4
bump VERSION files to 17.06.0-ce-rc4
2017-06-15 01:18:13 -07:00
29e7f7b8c9 bump VERSION files to 17.06.0-ce-rc4
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-15 08:17:14 +00:00
4c2cf22362 Merge pull request #79 from andrewhsu/systemd
cherry-pick Add systemd scripts
2017-06-15 01:13:42 -07:00
afcb08cfb0 Use internal systemd scripts for DEB packaging
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 477d0b1f735f7e243425cd2c5f48e8f216556c2f)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-15 08:10:46 +00:00
46a9d6b041 Use internal systemd scripts for RPM packaging
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit cbfe576e680b19c5f4c992e52bee59f2bc540026)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-15 08:10:33 +00:00
b8c7116a23 Add initial systemd scripts
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 7b31f87ffd8115f8226f68b788f5b36db53981f6)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-15 08:10:17 +00:00
b089783b38 Merge pull request #76 from andrewhsu/pool
cherry-pick container/stream/attach: use pools.Copy
2017-06-14 11:35:08 -07:00
605ffe91cf Merge pull request #75 from aaronlehmann/vendor-swarmkit-bf9b892
Vendor swarmkit bf9b892
2017-06-13 23:23:05 -07:00
eb837fd7bc pkg/pools: add buffer32KPool & use it for copy
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
(cherry picked from commit ba40f4593f79a653f1e3a8b9597b7900fb68a564)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-14 00:20:13 +00:00
475c218fd7 container/stream/attach: use pools.Copy
The use of pools.Copy avoids io.Copy's internal buffer allocation.
This commit replaces io.Copy with pools.Copy to avoid the allocation of
buffers in io.Copy.

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
(cherry picked from commit 014095e6a07748d0e1ce2f759f5c4f4b3783e765)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-14 00:20:13 +00:00
f2eb8b825b Vendor swarmkit bf9b892
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-13 11:37:41 -07:00
7953dbc649 Merge pull request #72 from andrewhsu/rc3
bump VERSION files to 17.06.0-ce-rc3
2017-06-13 00:27:55 -07:00
5c94f3eeda bump VERSION files to 17.06.0-ce-rc3
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-13 07:27:03 +00:00
d96b9b7edf Merge pull request #68 from mlaventure/17.06-rc3-changelog
Update changelog for 17.06.0-ce-rc3
2017-06-13 00:24:51 -07:00
be1ea9771c added changelog entry for swarmkit
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-13 07:21:48 +00:00
5d8e13a06c Merge pull request #71 from andrewhsu/dep-v1
cherry-pick: Disable legacy (v1) registries by default
2017-06-12 23:21:57 -07:00
d611e35db6 Merge pull request #69 from andrewhsu/sk
revendor github.com/docker/swarmkit to ef3c57a
2017-06-12 22:03:36 -07:00
85aaa4f261 Merge pull request #66 from mavenugo/17.06-ln
Vendoring libnetwork 4f5310be349d9299f6cab6d5822312f00cfa965c
2017-06-12 21:01:20 -07:00
56ecfabb9f Merge pull request #70 from tiborvass/revert-tty-changes
Revert tty changes
2017-06-12 20:53:00 -07:00
97a704b2a7 Merge pull request #52 from seemethere/cherry_pick_33335
Check signal is unset before using user stopsignal
2017-06-12 19:24:57 -07:00
a16a6004a8 revendor github.com/docker/swarmkit to 6083c76
To get the changes:
* https://github.com/docker/swarmkit/pull/2234
* https://github.com/docker/swarmkit/pull/2237
* https://github.com/docker/swarmkit/pull/2238

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-13 00:04:15 +00:00
17c2a50117 Update docs, completion scripts for disable-legacy-registry
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2b8f0eef7338f37104464154ba65aef7db3b9703)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-12 23:28:29 +00:00
5e671f7b53 Disable legacy (v1) registries by default
Deprecation of interacting with v1 registries was
started in docker 1.8.3, which added a `--disable-legacy-registry`
flag.

This option was anounced to be the default starting
with docker 17.06, and v1 registries completely
removed in docker 17.12.

This patch updates the default, and disables
interaction with v1 registres by default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 128280013f2ad90520c97b47a787be0db883e870)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-12 23:28:14 +00:00
986443bad2 [cli] vendor: Revert ONCLR and OPOST changes
This reverts to a version of runc without the ONCLR cleared to not cause
a regression with different clients using --tty.

This also reverts the OPOST changes to the term package to support the
initial change.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit a5e83836a49547b2add871bb52cbd8bfedb57114)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-12 23:27:57 +00:00
eaac30972d [engine] Revert ONCLR and OPOST changes
This reverts to a version of runc without the ONCLR cleared to not cause
a regression with different clients using --tty.

This also reverts the OPOST changes to the term package to support the
initial change.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit a5e83836a49547b2add871bb52cbd8bfedb57114)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-12 23:27:48 +00:00
6f00f5603d Merge pull request #59 from seemethere/cherry_pick_33473
Update deprecated.md for removal of --email flag
2017-06-12 15:43:01 -07:00
ad098a7a03 Merge pull request #64 from seemethere/cherry_pick_143
Remove deprecated -e/--email flag from docker login
2017-06-12 15:42:02 -07:00
9c1f95529e Update changelog for 17.06.0-ce-rc3
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-12 11:41:44 -07:00
8c2c3e21a3 Remove "-e" / "--email" from integration tests
This option is no longer supported in docker 17.06,
so should not be used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-12 10:18:49 -07:00
da2d17a18f Merge pull request #65 from seemethere/cherry_pick_33609
Merge pull request #29418 from aboch/p66
2017-06-12 09:27:42 -07:00
8ef3d608d9 Vendoring libnetwork 4f5310be349d9299f6cab6d5822312f00cfa965c
This is a cherry-pick of https://github.com/moby/moby/pull/33634
that brings in https://github.com/docker/libnetwork/pull/1796.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-06-12 09:04:36 -07:00
514d89f021 Merge pull request #55 from andrewhsu/revendor-libnetwork-netlink
revendor libnetwork and netlink in engine component
2017-06-11 10:32:17 -07:00
0189f9d259 Merge pull request #57 from seemethere/cherry_pick_33413
Do not reuse a http.Request after a failure in callWithRetry
2017-06-10 22:10:48 -07:00
ca7df6fe42 Merge pull request #61 from seemethere/cherry_pick_33583
Logging driver should receive same file in start/stop request
2017-06-10 22:09:47 -07:00
47c1b00158 Merge pull request #60 from seemethere/cherry_pick_144
Allow --detach and --quiet flags when using --rollback
2017-06-10 15:48:54 -07:00
f7e9f2cefa Merge pull request #58 from seemethere/cherry_pick_33363
Fix cancelling builder on chunked requests
2017-06-10 15:48:02 -07:00
960ddece48 Merge pull request #62 from seemethere/cherry_pick_33598
daemon: Remove daemon datastructure dump functionality
2017-06-10 14:41:21 -07:00
5a5e9e32bd Merge pull request #63 from seemethere/cherry_pick_33606
Backport 17.05.0-ce changelog to master
2017-06-10 13:41:31 -07:00
eff2539693 Merge pull request #44 from nishanttotla/cpick-cli-121
[cherry-pick] Enable client side digest pinning for stack deploy
2017-06-10 13:29:54 -07:00
e92c400a01 Merge pull request #32 from nishanttotla/cpick-moby-33279-17.06
[cherry-pick] vendor: Ensure service images get default tag and print familiar strings
2017-06-10 13:27:49 -07:00
5d4843baa3 Merge pull request #56 from tiborvass/cli-go1.8
Update golang 1.8.3
2017-06-09 18:28:53 -07:00
cfb8aafe5e Merge pull request #42 from mlaventure/17.06-rc2-changelog
Remove unneeded line in 17.06 CHANGELOG
2017-06-09 18:23:18 -07:00
4e1370233e Merge pull request #13 from mlaventure/chp-moby-33279
Ensure service images get default tag and print familiar strings
2017-06-09 17:58:16 -07:00
091732e350 Merge pull request #29418 from aboch/p66
[1.13.x] Fix buildIpamResources()
(cherry picked from commit 4d2be03b68dd54d8f2307e8b4178ad8ed8d5d343)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 27498a3c60018ea2880a18beec65710fd27971a7)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:38:11 -07:00
1af533909d Remove deprecated -e/--email flag from docker login
The `docker login -e` / `docker login --email` option was deprecated in
Docker 1.11 (https://github.com/moby/moby/releases/tag/v1.11.0) through
aee260d4eb3aa0fc86ee5038010b7bbc24512ae5 (April 2016), and when used has
been outputing a deprecation warning since;

    Flag --email has been deprecated, will be removed in 17.06.

Originally this option was scheduled to be removed in docker 1.13, but
extended to docker 17.06 due to a change in our deprecation policy.

Given that only docker 1.10 and older use this flag (which is EOL, including
for CS versions, as of February 2017), will now be removed.

With this patch, `docker login` will now produce an Error if the flag
is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8b383d2351)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:37:14 -07:00
a014274b80 bump to GA
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 89658bed64c2a8fe05a978e5b87dbec409d57a0f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d94f281d78e85f4c7de6b8347ab95d0afd5b8a8d)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:35:56 -07:00
7b65e51031 bump to rc2
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit c57fdb2a14cfba584686ddad909e3006284d10aa)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b4d36e47c3501541dc66b6336e286b8c11cbcec7)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:35:34 -07:00
ab5798a6f7 daemon: Remove daemon datastructure dump functionality
When sending SIGUSR1 to the daemon, it can crash because of a concurrent
map access panic, showing a stack trace involving dumpDaemon. It appears
it's not possible to recover from a concurrent map access panic. Since
it's important that SIGUSR1 not be a destructive operation, sadly the
best course of action I can think of is to remove this functionality.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit a4c68ee8574c9b8a3309ebebee0d90108042ba61)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:34:45 -07:00
899ed1b641 Logging driver should receive same file in start/stop request
Signed-off-by: Peter Bücker <peter.buecker@gmail.com>
(cherry picked from commit e908e1a357b435d7fab497d51cdd3e58458a0590)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:33:46 -07:00
a9a1a9c7de Merge pull request #43 from cyli/re-vendor-swarmkit
[17.06] Re-vendor swarmkit
2017-06-09 17:32:55 -07:00
5ed0b2e10c Allow --detach and --quiet flags when using --rollback
Commit 78c204ef79 added
(f9bd8ec8b268581f93095c5a80679f0a8ff498bf in the moby repo)
a validation to prevent `--rollback` from being used
in combination with other flags that update the
service spec.

This validation was not taking into account that
some flags only affect the CLI behavior, and
are okay to be used when rolling back.

This patch updates the validation, and adds
`--quiet` and `--detach` to the list of allowed
flags.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f10f29df8d)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:31:40 -07:00
7950a39242 Update deprecated.md for removal of --email flag
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 43239f62bedc4721d27744d21c122622988bb3ae)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:30:43 -07:00
5bd868da90 Fix cancelling builder on chunked requests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 23628bd7efb0aae565cea5ee040e373b0c93fd8d)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:29:44 -07:00
e142124317 Do not reuse a http.Request after a failure in callWithRetry
Closes: #33412

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
(cherry picked from commit 62871ef2fa52b0a2e426c30f36d35a9ba1e92fac)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:28:34 -07:00
0fa9fe7713 Fixing e2e test
Because of cherry-pick from commit
5efcec77170dd6c4087d4f1fb3695c32d94edfb4 into
components/cli/vendor/github.com/docker/docker

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-10 00:27:43 +00:00
69fc734572 Comment out vendoring for docker/docker in components/cli
Because of cherry-pick from commit 5efcec77170dd6c4087d4f1fb3695c32d94edfb4
into components/cli/vendor/github.com/docker/docker

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-10 00:27:43 +00:00
5e405a94e8 Ensure service images get default tag and print familiar strings
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 5efcec77170dd6c4087d4f1fb3695c32d94edfb4)

Conflicts resolved:
components/cli/vendor/github.com/docker/docker/client/service_create.go

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-10 00:27:05 +00:00
897b692e1c Merge pull request #53 from seemethere/cherry_pick_33419
libcontainerd: fix reaper goroutine position
2017-06-09 17:21:17 -07:00
d8fc4f1ad2 Merge pull request #54 from andrewhsu/opost
revert Set OPOST on bsd
2017-06-09 17:17:37 -07:00
af4ae65a0d Merge pull request #51 from seemethere/cherry_pick_33307
Event tests need to wait for events
2017-06-09 16:59:23 -07:00
c8fa12c15c Merge pull request #49 from seemethere/cherry_pick_33464
Do not log the CA config CA signing key in debug mode.
2017-06-09 15:36:06 -07:00
36f4ffb042 Merge pull request #50 from seemethere/cherry_pick_33524
Fix Cache with ONBUILD
2017-06-09 15:34:01 -07:00
0cbae9b2ee Merge pull request #48 from seemethere/cherry_pick_33330
Don't create source directory while the daemon is being shutdown, fix…
2017-06-09 15:33:19 -07:00
dcd1f685c8 Merge pull request #47 from seemethere/cherry_pick_33249
Add container environment variables correctly to the health check
2017-06-09 15:32:27 -07:00
05648d36b5 Merge pull request #46 from seemethere/cherry_pick_cli_162
Handle case of configs on old daemon
2017-06-09 15:31:43 -07:00
e1ebcf33f6 Merge pull request #45 from seemethere/cherry_pick_33578
Service alias should not be copied to task alias
2017-06-09 15:31:00 -07:00
4ea6f802a5 Update golang 1.8.3
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
(cherry picked from commit b38c49411b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-09 22:26:59 +00:00
be7a008421 revendoring netlink in engine component
bumping vendor of vishvananda/netlink to bd6d5de5ccef2d66b0a26177928d0d8895d7f969

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 21:37:15 +00:00
fcd821892e revendoring libnetwork in engine component
bumping vendor of docker/libnetwork to 411846172fb457a6459ea94eb536f91717ee0a04

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 21:27:44 +00:00
76b0c4884b Merge pull request #14 from mlaventure/update-containerd
Update containerd to cfb82a876ecc11b5ca0977d1733adbe58599088a
2017-06-09 14:22:20 -07:00
1f928815e5 Revert "Set OPOST on bsd"
This reverts commit fff42c853a.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 20:55:50 +00:00
ad8c94e585 Revert "[vendor] Set OPOST on bsd"
This reverts commit 972de9a657.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 20:55:49 +00:00
058e676c7f Revert "Comment out vendoring for docker/docker in components/cli"
This reverts commit 8928dccaa6.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 20:55:41 +00:00
11637f7d81 Re-vendor swarmkit to include the following fixes:
- https://github.com/docker/swarmkit/pull/2218
- https://github.com/docker/swarmkit/pull/2215
- https://github.com/docker/swarmkit/pull/2233

Signed-off-by: Ying <ying.li@docker.com>
2017-06-09 13:25:15 -07:00
5965f0216f libcontainerd: fix reaper goroutine position
It has observed defunct containerd processes accumulating over
time while dockerd was permanently failing to restart containerd.
Due to a bug in the runContainerdDaemon() function, dockerd does not clean up
its child process if containerd already exits very soon after the (re)start.

The reproducer and analysis below comes from docker 1.12.x but bug
still applies on latest master.

- from libcontainerd/remote_linux.go:

  329 func (r *remote) runContainerdDaemon() error {
   :
   :      // start the containerd child process
   :
  403     if err := cmd.Start(); err != nil {
  404             return err
  405     }
   :
   :      // If containerd exits very soon after (re)start, it is
possible
   :      // that containerd is already in defunct state at the time
when
   :      // dockerd gets here. The setOOMScore() function tries to
write
   :      // to /proc/PID_OF_CONTAINERD/oom_score_adj. However, this
fails
   :      // with errno EINVAL because containerd is defunct. Please see
   :      // snippets of kernel source code and further explanation
below.
   :
  407     if err := setOOMScore(cmd.Process.Pid, r.oomScore); err != nil
{
  408             utils.KillProcess(cmd.Process.Pid)
   :
   :              // Due to the error from write() we return here. As
the
   :              // goroutine that would clean up the child has not
been
   :              // started yet, containerd remains in the defunct
state
   :              // and never gets reaped.
   :
  409             return err
  410     }
   :
  417     go func() {
  418             cmd.Wait()
  419             close(r.daemonWaitCh)
  420     }() // Reap our child when needed
   :
  423 }

This is the kernel function that gets invoked when dockerd tries to
write
to /proc/PID_OF_CONTAINERD/oom_score_adj.

- from fs/proc/base.c:

 1197 static ssize_t oom_score_adj_write(struct file *file, ...
 1198                                         size_t count, loff_t
*ppos)
 1199 {
   :
 1223         task = get_proc_task(file_inode(file));
   :
   :          // The defunct containerd process does not have a virtual
   :          // address space anymore, i.e. task->mm is NULL. Thus the
   :          // following code returns errno EINVAL to dockerd.
   :
 1230         if (!task->mm) {
 1231                 err = -EINVAL;
 1232                 goto err_task_lock;
 1233         }
   :
 1253 err_task_lock:
   :
 1257         return err < 0 ? err : count;
 1258 }

The purpose of the following program is to demonstrate the behavior of
the oom_score_adj_write() function in connection with a defunct process.

$ cat defunct_test.c

\#include <unistd.h>

main()
{
    pid_t pid = fork();

    if (pid == 0)
        // child
        _exit(0);

    // parent
    pause();
}

$ make defunct_test
cc     defunct_test.c   -o defunct_test

$ ./defunct_test &
[1] 3142

$ ps -f | grep defunct_test | grep -v grep
root      3142  2956  0 13:04 pts/0    00:00:00 ./defunct_test
root      3143  3142  0 13:04 pts/0    00:00:00 [defunct_test] <defunct>

$ echo "ps 3143" | crash -s
  PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
  3143   3142   2  ffff880035def300  ZO   0.0       0      0
defunct_test

$ echo "px ((struct task_struct *)0xffff880035def300)->mm" | crash -s
$1 = (struct mm_struct *) 0x0
                          ^^^ task->mm is NULL

$ cat /proc/3143/oom_score_adj
0

$ echo 0 > /proc/3143/oom_score_adj
-bash: echo: write error: Invalid argument"

---

This patch fixes the above issue by making sure we start the reaper
goroutine as soon as possible.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

(cherry picked from commit 27087eacbf96e6ef9d48a6d3dc89c7c1cff155b4)

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:23:20 -07:00
3910d5b571 Check signal is unset before using user stopsignal
This fixes an issue where if a stop signal is set, and a user sends
SIGKILL, `container.ExitOnNext()` is not set, thus causing the container
to restart.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 114652ab86609e5c0cbfad84f642942b466a0596)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:21:29 -07:00
03d8258b7d Event tests need to wait for events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
(cherry picked from commit 59b2d0473af5155bb31adcc17bc36857ebd13a15)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:19:58 -07:00
1c2ce3d977 Fix Cache with ONBUILD
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit f1ade82d82e6436971c6b7d08eb1da57ed9ba756)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:17:47 -07:00
eb4ef82087 Do not log the CA config CA signing key in debug mode.
Signed-off-by: Ying Li <ying.li@docker.com>
(cherry picked from commit d60f18204978d438d1eb336512576d47991c8ac1)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:16:19 -07:00
d09575fb8f Don't create source directory while the daemon is being shutdown, fix #30348
If a container mount the socket the daemon is listening on into
container while the daemon is being shutdown, the socket will
not exist on the host, then daemon will assume it's a directory
and create it on the host, this will cause the daemon can't start
next time.

fix issue https://github.com/moby/moby/issues/30348

To reproduce this issue, you can add following code

```
--- a/daemon/oci_linux.go
+++ b/daemon/oci_linux.go
@@ -8,6 +8,7 @@ import (
        "sort"
        "strconv"
        "strings"
+       "time"

        "github.com/Sirupsen/logrus"
        "github.com/docker/docker/container"
@@ -666,7 +667,8 @@ func (daemon *Daemon) createSpec(c *container.Container) (*libcontainerd.Spec, e
        if err := daemon.setupIpcDirs(c); err != nil {
                return nil, err
        }
-
+       fmt.Printf("===please stop the daemon===\n")
+       time.Sleep(time.Second * 2)
        ms, err := daemon.setupMounts(c)
        if err != nil {
                return nil, err

```

step1 run a container which has `--restart always` and `-v /var/run/docker.sock:/sock`
```
$ docker run -ti --restart always -v /var/run/docker.sock:/sock busybox
/ #

```
step2 exit the the container
```
/ # exit
```
and kill the daemon when you see
```
===please stop the daemon===
```
in the daemon log

The daemon can't restart again and fail with `can't create unix socket /var/run/docker.sock: is a directory`.

Signed-off-by: Lei Jitang <leijitang@huawei.com>

(cherry picked from commit 7318eba5b2f8bb4b867ca943c3229260ca98a3bc)

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:13:40 -07:00
13934b618c Add container environment variables correctly to the health check
The health check process doesn't have all the environment
varialbes in the container or has them set incorrectly.

This patch should fix that problem.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
(cherry picked from commit 5836d86ac4d617e837d94010aa60384648ab59ea)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:09:40 -07:00
e9b6305e1d Handle case of configs on old daemon
If configs are declared for a service and pointing on an old
daemon, error out properly (instead of "page not found").

If there is no configs declared, don't call convertServiceConfigObjs
to avoid having an error.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit cf5550c426)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:06:34 -07:00
94f4d72c55 Service alias should not be copied to task alias
If a service alias is copied to task, then the DNS resolution on the
service name will resolve to service VIP and all of Task-IPs and that
will break the concept of vip based load-balancing resulting in all the
dns-rr caching issues.

This is a regression introduced in #33130

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 38c15531501578b96d34be5ce7f33a0be6be078f)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 12:55:46 -07:00
765e46f7cc Update containerd to cfb82a876ecc11b5ca0977d1733adbe58599088a
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-09 09:33:50 -04:00
f15c4fd160 Fixing stack deploy tests to not contact registry
Because of cherry-pick from commit
f790e839fc

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-08 15:20:09 -07:00
66d168dd55 Change --no-resolve-image flag to --resolve-image string flag
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit f790e839fc)
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-08 14:25:50 -07:00
59d6ed0a4d Enable client side digest pinning for stack deploy
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 9f1bea2657)
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-08 14:24:57 -07:00
402dd4a9ea Merge pull request #38 from andrewhsu/rc2
bump VERSION files to 17.06.0-ce-rc2
2017-06-06 16:05:18 -07:00
14ff8286f7 Remove unneeded line in 17.06 CHANGELOG
Also update release date

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-06 15:58:28 -07:00
eb1565bba1 Merge pull request #40 from mlaventure/17.06-rc2-changelog
Update 17.06 CHANGELOG with rc2 changes
2017-06-06 15:19:15 -07:00
de513d091d Merge pull request #41 from andrewhsu/update-pack
update with latest changes from docker-ce-packaging
2017-06-06 15:16:36 -07:00
1d4b51cccb Update 17.06 CHANGELOG with rc2 changes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-06 14:50:01 -07:00
b5411da4de Make the hash_files target non interactive
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 097516fc76a2c9acf798dc523326904520ff1fc7)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 21:26:55 +00:00
7239874782 Add file hashing for static files
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit a1b7f6f3407546ff41ed2e0d16d7e1b2a8ac0ef4)

Conflicts:
components/packaging/static/Makefile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 21:26:38 +00:00
18355074d7 Move the hashing of files to its own target
So we can use it at will

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 533a843393bd7c3674074ec9af73c8e666fc7484)

Conflicts:
components/packaging/static/Makefile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 21:24:53 +00:00
1f94b6c7ec set $GOPATH/bin for s390x
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit f6d30c3631abee04aa3586cba36960901f705fe2)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 21:21:03 +00:00
737e92d753 no need for tty
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit ade95a2b6f8a16aa7e6c387dc9c9dd48bba9a672)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 21:20:47 +00:00
97b6afddfe bump VERSION files to 17.06.0-ce-rc2
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 16:54:24 +00:00
00327e2c1c Merge pull request #37 from andrewhsu/gen-man
generate man pages
2017-06-06 02:16:57 -07:00
0dbee88694 generate man pages
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit e14fca86f8230e10d79a7bfae2873a98a16bb44d)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 09:01:36 +00:00
ce44edfbf8 Merge pull request #19 from aluzzardi/revendor-swarmkit
[17.06] Re-vendor SwarmKit to 4b872cfac8ffc0cc7fff434902cc05dbc7612da5
2017-06-06 00:37:05 -07:00
0efdcc403e Re-vendor SwarmKit to 4b872cfac8ffc0cc7fff434902cc05dbc7612da5
Includes:
- docker/swarmkit#2203
- docker/swarmkit#2210
- docker/swarmkit#2212

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 05:55:35 +00:00
8cf591e57d Merge pull request #21 from mavenugo/17.06
Vendoring libnetwork b54433f6459b84eae77892d0d359c1bafb133529
2017-06-05 22:25:27 -07:00
5cfdad44b3 Merge pull request #36 from tiborvass/fix-manpages-script
[cli] fix manpages script
2017-06-05 22:19:24 -07:00
5bb86daf51 [cli] fix manpages script
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 05:05:14 +00:00
9b8ffe709d Merge pull request #25 from mlaventure/chp-moby-33502
Set OPOST on bsd
2017-06-05 21:56:30 -07:00
8928dccaa6 Comment out vendoring for docker/docker in components/cli
Because of cherry-pick from commit 17ec46a24316f59c808c112e3ca46d7c442a785a
into components/cli/vendor/github.com/docker/docker

Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 03:45:20 +00:00
972de9a657 [vendor] Set OPOST on bsd
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 17ec46a24316f59c808c112e3ca46d7c442a785a)

Manually update pkg/term vendoring to match changes in moby

Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 03:42:16 +00:00
9dad38d70a Merge pull request #26 from mlaventure/chp-moby-33500
Fix ONBUILD COPY
2017-06-05 20:24:21 -07:00
699fcc1433 Vendoring libnetwork
This is a 17.06 equivalent cherry-pick of
https://github.com/moby/moby/pull/33463

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 03:18:59 +00:00
40d95168e1 Merge pull request #16 from mavenugo/cli-1706-stack
Host and Bridge network support in docker stack deploy
2017-06-05 19:22:40 -07:00
d236b522c5 Merge pull request #33 from andrewhsu/pkg-update
update with latest from docker-ce-packaging
2017-06-05 18:40:24 -07:00
111c39aff1 Change ARCH to be reflective
Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
(cherry picked from commit 930db40ec8424555612ce70781e94d5cb172aa4c)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 00:02:26 +00:00
c1c839c28b Rename deb dockerfiles to $(uname -m) equivalents
Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
(cherry picked from commit 3f7e423438733fb5f593f666d12714ae2f63fcc9)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 00:02:26 +00:00
f650eb38a6 Update GO_VERSION to 1.8.3 (#8)
Signed-off-by: Eli Uriegas <seemethere101@gmail.com>(cherry picked from commit 121e1c478d94a9be5713e944dde113f8637d6e41)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 00:02:26 +00:00
aa3a4c2846 Add armhf dockerfiles for deb building (#4)
Add armhf dockerfiles for deb building

Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
(cherry picked from commit f0c8cea1b79b049743cd1503f7ac4a34c265f476)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 00:02:26 +00:00
6a52ceebf4 Add DISTRO/SUITE env. variables to the RPM dockerfiles
Signed-off-by: Roberto Gandolfo Hashioka <roberto_hashioka@hotmail.com>
(cherry picked from commit c4a9e41495fac5e4aa72151b80200aa453f65e08)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-06 00:02:26 +00:00
c6dd1afaa6 Merge pull request #24 from tiborvass/man-yaml-scripts
Add scripts and targets for manpages and yamldocs
2017-06-05 16:06:46 -07:00
f148100b07 Add scripts and targets for manpages and yamldocs
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit ff615dbc4d)
2017-06-05 22:51:19 +00:00
8ce2c283f7 Merge pull request #23 from tiborvass/import-man-docs-completion
Import man docs completion
2017-06-05 15:40:42 -07:00
b2dacf38db Merge pull request #8 from mlaventure/chp-moby-33341
Do not clear swarm directory at the begining of swarm init and swarm …
2017-06-05 09:57:27 -07:00
6c636490a3 Merge pull request #22 from mlaventure/chp-cli-136
Fix stack compose bind-mount volumes for Windows
2017-06-05 09:54:06 -07:00
c1f7e41e4e Merge pull request #12 from mlaventure/chp-cli-135
Include stack service configs in service specs
2017-06-05 09:46:58 -07:00
a148bf60af Merge pull request #11 from mlaventure/chp-cli-134
Remove stack configs on stack removal
2017-06-05 09:46:13 -07:00
4910da9ddb Merge pull request #10 from mlaventure/chp-cli-126
Handle a Docker daemon without registry info
2017-06-05 09:45:31 -07:00
9e9c4b52b9 Fix ONBUILD COPY
the source was missing from the second dispatch

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 3f2604157790408acf5ad05c74cebe105f2b6979)
2017-06-05 08:01:05 -07:00
fff42c853a Set OPOST on bsd
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 17ec46a24316f59c808c112e3ca46d7c442a785a)
2017-06-05 07:45:38 -07:00
2bdf7010a1 Merge pull request #7 from mlaventure/chp-moby-33308
remove RuntimeData from cluster and types
2017-06-05 06:10:46 -07:00
46f679cc1d Merge pull request #5 from mlaventure/chp-moby-33311
Adding support for DNS search on RS1
2017-06-05 06:09:52 -07:00
3a237eae5f Merge pull request #4 from mlaventure/chp-moby-33376
Ensure that a device mapper task is referenced until task is complete
2017-06-05 06:09:13 -07:00
8330e07f4a Merge pull request #3 from mlaventure/chp-moby-33365
Update go-winio to v0.4.2
2017-06-05 06:05:37 -07:00
9a732dbff3 Merge pull request #2 from mlaventure/chp-moby-33422
Don't unmount entire plugin manager tree on remove
2017-06-05 05:37:07 -07:00
08cb13b09b Fix stack compose bind-mount volumes for Windows
For stack compose files, use filepath.IsAbs instead of path.IsAbs, for
bind-mounted service volumes, because filepath.IsAbs handles Windows
paths, while path.IsAbs does not.

Signed-off-by: John Stephens <johnstep@docker.com>
(cherry picked from commit 9043d39dea)
2017-06-02 12:01:27 -07:00
09185931e1 Merge pull request #9 from mlaventure/chp-moby-33387
Bump go to go1.8.3
2017-06-02 10:38:59 -07:00
8d44c9a703 Merge pull request #1 from mlaventure/chp-moby-33409
prevent image prune panic
2017-06-02 10:38:26 -07:00
0334cfffff Merge pull request #20 from mlaventure/chp-moby-33474
Use actual cli version for TestConfigHTTPHeader
2017-06-02 10:33:44 -07:00
ae4b9d3f19 Remove old manpage generation dockerfiles and glide config.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d2976d599f
Component: cli
2017-06-02 12:00:23 -04:00
ffaa61dd2d Add missing dependencies to vendor, and fix generation imports
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 875daf0130
Component: cli
2017-06-02 11:12:43 -04:00
7ff65f2f57 Revert docs/yaml removal
This reverts commit 3e911ff825.
Upstream-commit: d2cb97e76d
Component: cli
2017-06-02 00:25:19 +00:00
c00aa61dd9 Import completion scripts, docs, and man pages from docker/docker
Upstream-commit: ca8303e325
Component: cli
2017-06-02 00:17:20 +00:00
a9548340cb Use actual cli version for TestConfigHTTPHeader
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 0b90edc22fa95e04b4d3208a72bb276be699b260)
2017-06-01 17:13:23 -07:00
5cb40a7620 Docs and manual changes
- for service create on node-local networks

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: cccd6379b7
Component: cli
2017-06-02 00:11:05 +00:00
eeb4b8935d Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: a49573e5fb
Component: cli
2017-06-02 00:11:05 +00:00
eee5a1ca7f Document the swarm root CA rotation CLI command.
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: e1cd83f28a
Component: cli
2017-06-02 00:11:05 +00:00
8fabd69470 Add daemon option to push foreign layers
The --allow-nondistributable-artifacts daemon option specifies
registries to which foreign layers should be pushed.  (By default,
foreign layers are not pushed to registries.)

Additionally, to make this option effective, foreign layers are now
pulled from the registry if possible, falling back to the URLs in the
image manifest otherwise.

This option is useful when pushing images containing foreign layers to a
registry on an air-gapped network so hosts on that network can pull the
images without connecting to another server.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
Upstream-commit: 9810554494
Component: cli
2017-06-02 00:11:05 +00:00
1d4d33c8f3 Update the CLI docs to display whether a root rotation is in progress
when viewing system info, and TLS info when displaying node info.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 42ec86ae9b
Component: cli
2017-06-02 00:11:05 +00:00
079ddc4784 docs: add missing cache-from man docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: bc5fca913b
Component: cli
2017-06-02 00:11:05 +00:00
e28d94d143 docs: add docs for build —target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d50472f52b
Component: cli
2017-06-02 00:11:05 +00:00
0e345f3249 Allow checking out any ref in gitutils
Also changes so that shallow fetch is performed
even when a specific ref is specified.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 48ba755c3b
Component: cli
2017-06-02 00:11:05 +00:00
57eca1a73e Document arg before from
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c6e78b9c5f
Component: cli
2017-06-02 00:11:05 +00:00
c564ad3f69 Add support for metrics plugins
Allows for a plugin type that can be used to scrape metrics.
This is useful because metrics are not neccessarily at a standard
location... `--metrics-addr` must be set, and must currently be a TCP
socket.
Even if metrics are done via a unix socket, there's no guarentee where
the socket may be located on the system, making bind-mounting such a
socket into a container difficult (and racey, failure-prone on daemon
restart).

Metrics plugins side-step this issue by always listening on a unix
socket and then bind-mounting that into a known path in the plugin
container.

Note there has been similar work in the past (and ultimately punted at
the time) for consistent access to the Docker API from within a
container.

Why not add metrics to the Docker API and just provide a plugin with
access to the Docker API? Certainly this can be useful, but gives a lot
of control/access to a plugin that may only need the metrics. We can
look at supporting API plugins separately for this reason.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d8e04f68d3
Component: cli
2017-06-02 00:11:05 +00:00
b435b27639 Update bash completion for log driver options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4c0d6698d1
Component: cli
2017-06-02 00:11:05 +00:00
c5eee882f2 Update CLI docs and add opts/config.go
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cf95e198c5
Component: cli
2017-06-02 00:11:05 +00:00
fd113bff72 Add bash completion for new devicemapper storage options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d8dfa04cae
Component: cli
2017-06-02 00:11:05 +00:00
dcbb8fea1b Add bash completion for --health-start-period
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 95fcee5fc6
Component: cli
2017-06-02 00:11:05 +00:00
a7a84c14b2 Improve documentation on the -e flag to the 'run' cli command. The ability to import the current vale of an environment variable by simply naming the variable didn't seem to be documented anywhere. (see opts/env.go)
Signed-off-by: John V. Martinez <jvmatl@gmail.com>
Upstream-commit: a316bc3895
Component: cli
2017-06-02 00:11:05 +00:00
a9810fc663 bash completion for stack deploy --prune
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 62d0309d24
Component: cli
2017-06-02 00:11:05 +00:00
61c68f6c04 fix confusing description of stdout/stdin pipe
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6a767c1711
Component: cli
2017-06-02 00:11:05 +00:00
a23adede8c Remove cmd/docker and other directories in cli/ in accordance with the new Moby project scope
Starting with this commit, integration tests should no longer rely on
the docker cli, they should be API tests instead. For the existing tests
the scripts will use a frozen version of the docker cli with a
DOCKER_API_VERSION frozen to 1.30, which should ensure that the CI remains
green at all times.

To help contributors develop and test manually with a modified docker
cli, this commit also adds a DOCKER_CLI_PATH environment variable to the
Makefile. This allows to set the path of a custom cli that will be
available inside the development container and used to run the
integration tests.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3e911ff825
Component: cli
2017-06-02 00:11:04 +00:00
52384a103d Add docker build --iidfile=FILE
This is synonymous with `docker run --cidfile=FILE` and writes the digest of
the newly built image to the named file. This is intended to be used by build
systems which want to avoid tagging (perhaps because they are in CI or
otherwise want to avoid fixed names which can clash) by enabling e.g. Makefile
constructs like:

    image.id: Dockerfile
    	docker build --iidfile=image.id .

    do-some-more-stuff: image.id
    	do-stuff-with <image.id

Currently the only way to achieve this is to use `docker build -q` and capture
the stdout, but at the expense of losing the build output.

In non-silent mode (without `-q`) with API >= v1.29 the caller will now see a
`JSONMessage` with the `Aux` field containing a `types.BuildResult` in the
output stream for each image/layer produced during the build, with the final
one being the end product.  Having all of the intermediate images might be
interesting in some cases.

In silent mode (with `-q`) there is no change, on success the only output will
be the resulting image digest as it was previosuly.

There was no wrapper to just output an Aux section without enclosing it in a
Progress, so add one here.

Added some tests to integration cli tests.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 0808cf04cb
Component: cli
2017-06-02 00:11:04 +00:00
da440c7a29 Add option to auto-configure blkdev for devmapper
Instead of forcing users to manually configure a block device to use
with devmapper, this gives the user the option to let the devmapper
driver configure a device for them.

Adds several new options to the devmapper storage-opts:

- dm.directlvm_device="" - path to the block device to configure for
  direct-lvm
- dm.thinp_percent=95 - sets the percentage of space to use for
  storage from the passed in block device
- dm.thinp_metapercent=1 - sets the percentage of space to for metadata
  storage from the passed in block device
- dm.thinp_autoextend_threshold=80 - sets the threshold for when `lvm`
  should automatically extend the thin pool as a percentage of the total
  storage space
- dm.thinp_autoextend_percent=20 - sets the percentage to increase the
  thin pool by when an autoextend is triggered.

Defaults are taken from
[here](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production)

The only option that is required is `dm.directlvm_device` for docker to
set everything up.

Changes to these settings are not currently supported and will error
out.
Future work could support allowing changes to these values.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 20bcf49fb6
Component: cli
2017-06-02 00:11:04 +00:00
93047d501f Add no-new-privileg flag
The daemon config for defaulting to no-new-privileges for containers was
added in d7fda019bb7e24f42f8ae1ddecb3fd52df3c48bf, but somehow we
managed to omit the flag itself, but also documented the flag.
This just adds the actual flag.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 297dc42dff
Component: cli
2017-06-02 00:11:04 +00:00
8e8c7a1403 Fix list of experimental features
- Remove duplicate entry
- Fix anchor in link

Signed-off-by: Philipp Gille <philipp.gille@gmail.com>
Upstream-commit: 4dcac12be0
Component: cli
2017-06-02 00:11:04 +00:00
1d760fc60d Update attach.md
added some clarification around why attach can appear hung to some.  issue #1456 on docs

Signed-off-by: gary schaetz <gary@schaetzkc.com>

Updated the documentation to reflect what happens when you use a fragment in
the docker build url parameter.

Signed-off-by: Gary Schaetz <gary@schaetzkc.com>

added markup for commands

Signed-off-by: Gary Schaetz <gary@schaetzkc.com>
Upstream-commit: 80a7f5dec7
Component: cli
2017-06-02 00:11:04 +00:00
69b02c5a33 Add doc for system events and events[Fix #32748]
Signed-off-by: MichaelSpets <michael_spets@hotmail.com>
Upstream-commit: 824c665811
Component: cli
2017-06-02 00:11:04 +00:00
d8cd6f9925 docs/dockerd: correct authz plugin chain semantics
Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 24b6f3cd6e
Component: cli
2017-06-02 00:11:04 +00:00
b2bd413ffa fix some typos for plugin
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 079bc9c7aa
Component: cli
2017-06-02 00:11:04 +00:00
f006cb74fe Deprecate "asynchronous" service create and service update
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7480fcad48
Component: cli
2017-06-02 00:11:04 +00:00
11fe4742fb Clarify --env-file usage with names without values
Signed-off-by: Denis Defreyne <denis@soundcloud.com>
Upstream-commit: d24201d734
Component: cli
2017-06-02 00:11:04 +00:00
e81f095ee1 fix typo in plugins_logging.md
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 542af38ce5
Component: cli
2017-06-02 00:11:04 +00:00
f54540bc34 do not allow duration less than 1 ms in healthcheck parameters
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 1fa8221743
Component: cli
2017-06-02 00:11:04 +00:00
c2585247a2 Add bash completion for stack ls --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 513ea82edd
Component: cli
2017-06-02 00:11:04 +00:00
aa463e4b97 Add bash completion for system df --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3e646fed80
Component: cli
2017-06-02 00:11:04 +00:00
ea8bb1038b fix errors in config
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 852a861b8e
Component: cli
2017-06-02 00:11:04 +00:00
06257c0fd3 Add missing bash completion for docker attach
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 509b7f82b6
Component: cli
2017-06-02 00:11:04 +00:00
e5350e21b4 Remove bash completion for run|create --init-path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 40d3bb4985
Component: cli
2017-06-02 00:11:04 +00:00
2af47ea3bf Add bash completion for history --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 38dcfad556
Component: cli
2017-06-02 00:11:04 +00:00
81790c00c8 Inroduce SWARM --data-path-addr flag
This new flag will allow the configuration of an interface that
can be used for data path traffic to be isolated from control
plane traffic. This flag is simply percolated down to libnetwork
and will be used by all the global scope drivers (today overlay)

Negative test added for invalid flag arguments

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 137a190a79
Component: cli
2017-06-02 00:11:04 +00:00
adb2595ded Update legacy_plugins.md to include HBM authz plugin
Signed-off-by: Julien Kassar <github@kassisol.com>
Upstream-commit: ba5a2dc787
Component: cli
2017-06-02 00:11:04 +00:00
4dee681848 Add format to docker stack ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 5be9e57c51
Component: cli
2017-06-02 00:11:03 +00:00
3412b213bc Clarify where the RUN command runs from
Also, chained/quoted shell does not work

Signed-off-by: Julien Maitrehenry <julien.maitrehenry@me.com>
Upstream-commit: 33fecab492
Component: cli
2017-06-02 00:11:03 +00:00
f495b2a68e remove --init-path from client
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 4977ec1cca
Component: cli
2017-06-02 00:11:03 +00:00
4e3663be74 Remove bogus statement from bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8ea7724f64
Component: cli
2017-06-02 00:11:03 +00:00
7802f53667 Update dockerd.md
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
Upstream-commit: 65cf6dd611
Component: cli
2017-06-02 00:11:03 +00:00
2261e89bcf Add examples of storage-opts and log-opts for the daemon
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
Upstream-commit: d2295d58b2
Component: cli
2017-06-02 00:11:03 +00:00
7e9087ff05 Minor fixups for history CLI reference
This does some minor fix-ups in the CLI reference
for "history", and copies the formattting section to
the man-pages.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 275d8ab8de
Component: cli
2017-06-02 00:11:03 +00:00
de68965d62 Fix markdown indentation level
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8ca20aee9f
Component: cli
2017-06-02 00:11:03 +00:00
28a0a6d2c7 Implements --format option for docker history command by creating a formatter
Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds to history documentation for --format

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds MarshalJSON to historyContext for {{json .}} format

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds back the --human option to history command

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Cleans up formatter around --human option for history, Adds integration test for --format option of history

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Adds test for history formatter checking full table results, Runs go fmt on touched files

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Fixes lint errors in formatter/history

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

Runs go fmt on cli/command/formatter/history.go

Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>

sRemoves integration test for --format option of history

Merges Created and CreatedSince in docker history formatter, Updates docs and tests
Upstream-commit: aa124aee73
Component: cli
2017-06-02 00:11:03 +00:00
8530cbe276 Add format to the docker system df command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 9e2467d474
Component: cli
2017-06-02 00:11:03 +00:00
cc04f0bef8 Bash completion treats service logs as stable
Implements the following new CLI features:
- service logs is no longer experimental
- service logs also accepts task IDs

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 24d7795c2c
Component: cli
2017-06-02 00:11:03 +00:00
6674e3a1f5 Fix bash-completion script.
bash-completion script for 'docker build --network' calls
__docker_plugins, the correct name for this function is
__docker_plugins_bundled.

Closes #32588

Signed-off-by: Corey Farrell <git@cfware.com>
Upstream-commit: 0e75012be1
Component: cli
2017-06-02 00:11:03 +00:00
fb921da04c Update docs of label filter for docker system prune
This fix updates docs of `label` filter for `docker system prune`.

This fix is related to #30740 and #29999, and specifically to comment
https://github.com/docker/docker/pull/30740#issuecomment-293012957.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 40bb4a3b0e
Component: cli
2017-06-02 00:11:03 +00:00
797a7f455c Fix inconsisticy for service logs
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: fcdc75de3e
Component: cli
2017-06-02 00:11:03 +00:00
a0c49cf7f4 Clean docker run -e reference docs
Simplified the docs on how to set environment variables in a
container. Makes it clear that you have three options, and how
to use them.

Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
Upstream-commit: 66cfdff646
Component: cli
2017-06-02 00:11:03 +00:00
256568f159 Add docs for reading Dockerfile from stdin.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 71b0f91129
Component: cli
2017-06-02 00:11:03 +00:00
9e2302a5ae Add Dockerfile reference docs for using ARG in FROM
Also fixed some examples of using `docker build` to clarify that the
positional argument is a directory, not a file.

Also fixed some terminology. Dockerfiles contain instructions, not directives or
commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6e40868ade
Component: cli
2017-06-02 00:11:03 +00:00
af4c3ad361 Make the CLI show defaults from the swarmkit defaults package
If no fields related to an update config or restart policy are
specified, these structs should not be created as part of the service,
to avoid hardcoding the current defaults.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 91ca194713
Component: cli
2017-06-02 00:11:03 +00:00
193605c9b2 Bash completion supports multiple stacks in stack rm
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 50ea10e293
Component: cli
2017-06-02 00:11:03 +00:00
c040c93b7d Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 279bbbab27
Component: cli
2017-06-02 00:11:02 +00:00
3dc1ae6e35 Let graphdrivers declare diff stream fidelity
This allows graphdrivers to declare that they can reproduce the original
diff stream for a layer. If they do so, the layer store will not use
tar-split processing, but will still verify the digest on layer export.
This makes it easier to experiment with non-default diff formats.

Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
Upstream-commit: 4b8712eacb
Component: cli
2017-06-02 00:11:02 +00:00
35af017374 stack rm should accept multiple arguments
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 98bcbcf774
Component: cli
2017-06-02 00:11:02 +00:00
124cf590f2 Merge pull request #31848 from thaJeztah/17.04.0-changelog-updates
[17.04.x] deprecation and changelog updates
(cherry picked from commit f15f5937514c386ace40a43441dddc28337ca12d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0dc44cd964
Component: cli
2017-06-02 00:11:02 +00:00
222458ca3f Add bash completion for node ls --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e3cab9a751
Component: cli
2017-06-02 00:11:02 +00:00
672083e3c3 Implement plugins for logging drivers
Logging plugins use the same HTTP interface as other plugins for basic
command operations meanwhile actual logging operations are handled (on
Unix) via a fifo.

The plugin interface looks like so:

```go
type loggingPlugin interface {
  StartLogging(fifoPath string, loggingContext Context) error
  StopLogging(fifoPath)
```

This means a plugin must implement `LoggingDriver.StartLogging` and
`LoggingDriver.StopLogging` endpoints and be able to consume the passed
in fifo.

Logs are sent via stream encoder to the fifo encoded with protobuf.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 114cc6ca3a
Component: cli
2017-06-02 00:11:02 +00:00
1162d737fe Add bash completion for update --cpus
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0d4b2350fb
Component: cli
2017-06-02 00:11:02 +00:00
963782f121 Add --cpus support for docker update
This fix tries to address the issue raised in 31032 where it was
not possible to specify `--cpus` for `docker update`.

This fix adds `--cpus` support for `docker update`. In case both
`--cpus` and `--cpu-period/--cpu-quota` have been specified,
an error will be returned.

Related docs has been updated.

Integration tests have been added.

This fix fixes 31032.

This fix is related to 27921, 27958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f2933f6ea6
Component: cli
2017-06-02 00:11:02 +00:00
c3b0801303 Added word to documentation
Improved documentation by adding word for better sentence structure.

Signed-off-by: Mike Casas <mkcsas0@gmail.com>
Upstream-commit: 8abc802de9
Component: cli
2017-06-02 00:11:02 +00:00
c16846922d Add docs for named build stages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 29dd51d2a8
Component: cli
2017-06-02 00:11:02 +00:00
cb45fef45d cli: Allow service's networks to be updated
Resolve networks IDs on the client side.

Avoid filling in deprecated Spec.Networks field.

Sort networks in the TaskSpec for update stability.

Add an integration test for changing service networks.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: fc6428390a
Component: cli
2017-06-02 00:11:02 +00:00
91733928a1 clarify docker plugin set docs
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 051ff3b303
Component: cli
2017-06-02 00:11:02 +00:00
bf4beaf856 Add support for update order
This parameter controls the order of operations when rolling out an
update task. Either the old task is stopped before starting the new one,
or the new task is started first, and the running tasks will briefly
overlap.

This commit adds Rollout to the API, and --update-order / --rollback-order
flags to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: e434a91221
Component: cli
2017-06-02 00:11:02 +00:00
429d548d41 Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
Upstream-commit: c5071b94da
Component: cli
2017-06-02 00:11:02 +00:00
30106d6b7c updated Readme.md with fixed deadlinks
Signed-off-by: prertik <prertik@outlook.com>
Upstream-commit: 4273ca3678
Component: cli
2017-06-02 00:11:02 +00:00
150b832bdf cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 6103806802
Component: cli
2017-06-02 00:11:02 +00:00
3139e744d9 Edits to CLI reference
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 95c05a53c6
Component: cli
2017-06-02 00:11:01 +00:00
f46fcd68d4 Add hidden placeholder of .Self for docker node ls --format
This commit adds a hidden placeholder of `.Self` for
`docker node ls --format` so that if the node is the same
as the current docker daemon, then a `*` is outputed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 45f80dccb0
Component: cli
2017-06-02 00:11:01 +00:00
b36d931653 Add --format for docker node ls
This fix tries to address the comment https://github.com/docker/docker/pull/30376#discussion_r97465334
where it was not possible to specify `--format` for `docker node ls`. The `--format` flag
is a quite useful flag that could be used in many places such as completion.

This fix implements `--format` for `docker node ls` and add `nodesFormat` in config.json
so that it is possible to specify the output when `docker node ls` is invoked.

Related documentations have been updated.

A set of unit tests have been added.

This fix is related to #30376.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 477ec9bfdd
Component: cli
2017-06-02 00:11:01 +00:00
4543d90ce0 Escape some double brackets
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 0e86bfb1e0
Component: cli
2017-06-02 00:11:01 +00:00
8905ea0e0f Docs: Add the flag --api-enable-cors to deprecated.md
Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
Upstream-commit: ff44ffc576
Component: cli
2017-06-02 00:11:01 +00:00
b8a1f0d4a7 Add PORTS field for docker service ls (ingress)
This fix is related to 30232 wherw `docker service ls`
does not show `PORTS` information like `docker service ps`.

This fix adds `PORTS` fields for services that publish
ports in ingress mode.

Additional unit tests cases have been updated.

This fix is related to 30232.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 04afeb636e
Component: cli
2017-06-02 00:11:01 +00:00
6d717fcaf7 fix documentation error: volume-opt in service create
Signed-off-by: pacoxu<paco.xu@daocloud.io>
Signed-off-by: pacoxu <paco.xu@daocloud.io>
Upstream-commit: 764c84342d
Component: cli
2017-06-02 00:11:01 +00:00
dc4ce81f2b Synchronous service create and service update
Change "service create" and "service update" to wait until the creation
or update finishes, when --detach=false is specified. Show progress bars
for the overall operation and for each individual task (when there are a
small enough number of tasks), unless "-q" / "--quiet" is specified.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c8e607205f
Component: cli
2017-06-02 00:11:01 +00:00
3fd631d927 Improve bash completion for --log-opt awslogs-create-group
Add completion for the possible values `true`|`false`, correct sort order.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1a9663696d
Component: cli
2017-06-02 00:11:01 +00:00
f09c3fdc31 Add bash completion for secret ls --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 10638a7a3e
Component: cli
2017-06-02 00:11:01 +00:00
4cb2ae0424 Add zsh completion for 'docker {node,service,stack} ps --format'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 5ef17bfc68
Component: cli
2017-06-02 00:11:01 +00:00
cdb0625836 Merge pull request #32265 from breuner/patch-1
Updated legacy_plugins.md to include BeeGFS plugin
(cherry picked from commit d0057bd12dae5276b83e931e9e9ea185c58486a2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 82f097e8d5
Component: cli
2017-06-02 00:11:01 +00:00
0965592358 Clarify meaning of docker attach
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 05bc162dc4
Component: cli
2017-06-02 00:11:01 +00:00
80eee6383e Add conflict check for flags, and update deprecation versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 356d08b14c
Component: cli
2017-06-02 00:11:01 +00:00
c7388169b9 Deprecate --graph flag; Replace with --data-root
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 804858fc6f
Component: cli
2017-06-02 00:11:01 +00:00
9fe583a7b5 Add support for --type=secret in docker inspect
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 578a431fb3
Component: cli
2017-06-02 00:11:01 +00:00
5ade5c44d6 provide examples
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 2bc240c0f2
Component: cli
2017-06-02 00:11:01 +00:00
02fcc93a88 Add bash completion for secret ls --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c6875037bb
Component: cli
2017-06-02 00:11:01 +00:00
34a6afcc71 fix inconsistency for
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 9bd9b918be
Component: cli
2017-06-02 00:11:00 +00:00
93d2fdc531 Delete extraneous H1 title
Signed-off-by: JimGalasyn <jim.galasyn@docker.com>
Upstream-commit: 64704a2a80
Component: cli
2017-06-02 00:11:00 +00:00
e804e2fa1d Updated push.md with progress bar info
Signed-off-by: Ian Philpot <ian.philpot@microsoft.com>
Upstream-commit: d5e7e1c70c
Component: cli
2017-06-02 00:11:00 +00:00
ba598c6bca Update docs for experimental features
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2e9e71f59a
Component: cli
2017-06-02 00:11:00 +00:00
3257e02aa9 [docs] Fix incorrect docker inspect example
Fixed incorrect `docker inspect` example in docs.
Verify by running the old and new commands.

fixes #31900

Signed-off-by: David Xia <dxia@spotify.com>
Upstream-commit: 5840993e1c
Component: cli
2017-06-02 00:11:00 +00:00
c4a039752b make secret ls support filters in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4903dd2ca2
Component: cli
2017-06-02 00:11:00 +00:00
31de8f75fc Fix indenting in table of contents
Fixes #30841. The "filter" section had the wrong header size, which
caused sections following it to have the wrong indentation in the
right-side table of contents.

Signed-off-by: Greg Pflaum <gpflaum@users.noreply.github.com>
Upstream-commit: a616b0c305
Component: cli
2017-06-02 00:11:00 +00:00
6af7feccba specify max size for secret in doc
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 87f6e631ea
Component: cli
2017-06-02 00:11:00 +00:00
232ce24f41 Add details for inspect command usage
Signed-off-by: Eric G. Noriega <egnoriega@users.noreply.github.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3c6718905c
Component: cli
2017-06-02 00:11:00 +00:00
95fb350c65 Add cli reference docs for root-level commands
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b8d3480fc0
Component: cli
2017-06-02 00:11:00 +00:00
62bec22353 Update "man" of docker-run
Signed-off-by: mapk0y <mapk0y@gmail.com>
Upstream-commit: 06428a4955
Component: cli
2017-06-02 00:11:00 +00:00
9f1816c866 Add zsh completion for 'docker network ls --filter scope'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 91d886adc4
Component: cli
2017-06-02 00:11:00 +00:00
fdceadb4d7 Add missing zsh completion for 'docker plugin ls'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 51a4fbbf1f
Component: cli
2017-06-02 00:11:00 +00:00
ce0ae547ae refine docs to describe experimental feature docker build --squash
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: ab4ce19224
Component: cli
2017-06-02 00:11:00 +00:00
18a997b49c Allow user to modify ingress network
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: bf7ba6964b
Component: cli
2017-06-02 00:11:00 +00:00
4cadaa01c4 Windows: Remove --credentialspec flag
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: a10f63f0ce
Component: cli
2017-06-02 00:11:00 +00:00
c4bcd559a8 update 3 old docs about secret in docs/reference/commandline/
Signed-off-by: uhayate <uhayate.gong@daocloud.io>
Upstream-commit: da2f4802b6
Component: cli
2017-06-02 00:10:59 +00:00
3823a21d86 Add bash completion for network ls --filter scope
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d9a648caed
Component: cli
2017-06-02 00:10:59 +00:00
1624cade76 Add --filter scope=swarm|local for docker network ls
This fix tries to address the request in 31324 by adding
`--filter scope=swarm|local` for `docker network ls`.

As `docker network ls` has a `SCOPE` column by default,
it is natural to add the support of `--filter scope=swarm|local`.

This fix adds the `scope=swarm|local` support for
`docker network ls --filter`.

Related docs has been updated.

Additional unit test cases have been added.

This fix fixes 31324.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6f22676f0b
Component: cli
2017-06-02 00:10:59 +00:00
e95348fabd Add zsh completion for 'docker service ls --filter mode'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 9be3a2cec8
Component: cli
2017-06-02 00:10:59 +00:00
c2401dd7de Add zsh completion for 'docker secret ls --format'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 396925bab0
Component: cli
2017-06-02 00:10:59 +00:00
1629ef044b Add zsh completion for 'docker service {create,update} --rollback-*'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4cb6ab4eb5
Component: cli
2017-06-02 00:10:59 +00:00
bb72ecdf9a Add zsh completion for 'docker logs --no-task-ids --no-trunc'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: a7af767c0d
Component: cli
2017-06-02 00:10:59 +00:00
1116d4a8b0 Add zsh completion for 'docker service {create,update} --stop-signal'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 7931960ded
Component: cli
2017-06-02 00:10:59 +00:00
26034416e6 Add zsh completion for 'docker network inspect --verbose'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 80482d7f96
Component: cli
2017-06-02 00:10:59 +00:00
759c5407ed Add zsh completion for 'docker build --add-host'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 9a46875a95
Component: cli
2017-06-02 00:10:59 +00:00
37fbe0e3bd Add zsh completion for 'docker service {create,update} --placement-pref'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 0e6eb9976b
Component: cli
2017-06-02 00:10:59 +00:00
8d5753a63e Add pid host support
Tested using global-net-plugin-ipc which sets PidHost in config.json.

Plugins might need access to host pid namespace. Add support for that.
Tested using aragunathan/global-net-plugin-ipc which sets "pidhost" in
config.json. Observed using `readlink /proc/self/ns/pid` that plugin and
host have the same ns.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: c9f1050226
Component: cli
2017-06-02 00:10:59 +00:00
fa8eda09f4 Add support in plugin config for accessing host ipc namespace.
Plugins might need access to host ipc namespace. A good usecase is
a volume plugin running iscsi multipath commands that need access to
host kernel locks.
Tested with a custom plugin (aragunathan/global-net-plugin-full) that's
built with `"ipchost" : true` in config.json. Observed using
`readlink /proc/self/ns/ipc` that plugin and host have the same ns.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 9111051d98
Component: cli
2017-06-02 00:10:59 +00:00
f6d633583d remove the duplicate line from doc and rebase with master for 'example of ADD and COPY with special characters file name'
Signed-off-by: Foysal Iqbal <foysal.iqbal.fb@gmail.com>
Upstream-commit: 35cc51b4f6
Component: cli
2017-06-02 00:10:59 +00:00
3fb8760688 Add note regarding Windows VOLUME limitations
Signed-off-by: John Maguire <jmaguire@duosecurity.com>
Upstream-commit: b3da704154
Component: cli
2017-06-02 00:10:59 +00:00
edbe4f6509 Update system df docs to call out performance implications
Signed-off-by: Wayne Song <wsong@docker.com>
Upstream-commit: 865b35703b
Component: cli
2017-06-02 00:10:59 +00:00
05ecc5fd4d Ignore built-in allowed build-args in image history
Removes the build-args from the image history if they are in the
BuiltinAllowedBuildArgs map unless they are explicitly defined in an ARG
instruction.

Signed-off-by: Dave Tucker <dt@docker.com>
Upstream-commit: 84e63b3abb
Component: cli
2017-06-02 00:10:59 +00:00
71e8f665b9 Documentation for bind mount consistency flags.
Signed-off-by: Jeremy Yallop <yallop@docker.com>
Upstream-commit: a7c4324c47
Component: cli
2017-06-02 00:10:58 +00:00
7132065ceb Add reference filter to the list of available filters
The `reference` filter is documented in the file, but is not present
in the list of available filters.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d42d6b7939
Component: cli
2017-06-02 00:10:58 +00:00
9d0fc67762 modify docker plugin sshfs entrypoint
Signed-off-by: Jimmy Song <rootsongjc@gmail.com>
Upstream-commit: 3e4d1cacf4
Component: cli
2017-06-02 00:10:58 +00:00
45b7775c97 Add format to secret ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 33166e3364
Component: cli
2017-06-02 00:10:58 +00:00
f9360e39d0 Bash completion for docker node update completes only one node
`docker node update` accepts only one node.
Before this change, bash completion would complete additional nodes.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bd1c58ccaf
Component: cli
2017-06-02 00:10:58 +00:00
85f1d4b553 Fix 'Specify a Dockerfile (-f)' heading in Engine CLI Docs.
Signed-off-by: Ricardo N Feliciano <FelicianoTech@gmail.com>
Upstream-commit: 30b0334917
Component: cli
2017-06-02 00:10:58 +00:00
cb9f0f940b Fix zsh-completion for containers in status 'created'
This patch makes sure that containers in the created-stated are
counted as stopped containers. Otherwise if you create a container,
don't run it and type: "docker rm ", followed by pressing tab in zsh, it won't show up.

Signed-off-by: Nikolas Garofil <nikolas.garofil@uantwerpen.be>
Signed-off-by: Nikolas Garofil <nikolas@garofil.be>
Upstream-commit: 7150d7328c
Component: cli
2017-06-02 00:10:58 +00:00
aab4ed70ae Improve bash completion for docker rm
`docker rm` can delete containers in state=created, too.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1c56dfab6f
Component: cli
2017-06-02 00:10:58 +00:00
10bab1af16 Merge pull request #31875 from toolchainX/patch-2
update service-create.md
(cherry picked from commit 0f1ee840143b230259544dbfc03205dafcd285ad)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8dd6f6d342
Component: cli
2017-06-02 00:10:58 +00:00
74ed308aa5 Add bash completion for service ls --filter mode
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d9192b85d5
Component: cli
2017-06-02 00:10:58 +00:00
248439d169 Add bash completion for node|service|stack ps --format
Also add `--quiet|-q` where it was missing.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 36f5fc7909
Component: cli
2017-06-02 00:10:58 +00:00
a402058f93 Add bash completion for network inspect --verbose
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 977e1238ec
Component: cli
2017-06-02 00:10:58 +00:00
9989aea9fd Fix typo in sample output
Changed `ICONTAINER ID` to `CONTAINER ID`.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
Upstream-commit: ea6ba69639
Component: cli
2017-06-02 00:10:58 +00:00
eb0bef3819 misleading default for --update-monitor duration
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: ffd24bd8e8
Component: cli
2017-06-02 00:10:58 +00:00
2049ccb8d4 Support --filter mode=global|replicated for docker service ls
This fix tries to address the request in 31325 by adding
`--filter mode=global|replicated` to `docker service ls`.

As `docker service ls` has a `MODE` column by default, it is natural
to support `--filter mode=global|replicated` for `docker service ls`.

There are multiple ways to address the issue. One way is to pass
the filter of mode to SwarmKit, another way is to process the filter
of mode in the daemon.

This fix process the filter in the daemon.

Related docs has been updated.

An integration test has been added.

This fix fixes 31325.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d43b0f1269
Component: cli
2017-06-02 00:10:58 +00:00
d857ffda7d docs: added support for CLI yaml file generation
Signed-off-by: French Ben <frenchben@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 6fe11272d3
Component: cli
2017-06-02 00:10:58 +00:00
e1322682e0 docs: remove outdated reference to updating /etc/hosts
Starting with docker 1.10, docker no longer uses
/etc/hosts for service discovery, but uses an
embedded DNS server. This patch removes a reference
to the old (pre 1.10) behavior.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: afe91a5120
Component: cli
2017-06-02 00:10:58 +00:00
7c4a2f84cd Add --prune to stack deploy.
Add to command line reference.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9888942fbc
Component: cli
2017-06-02 00:10:58 +00:00
79b127dadd Update bash completion for docker service logs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 145bb0218d
Component: cli
2017-06-02 00:10:57 +00:00
e1a7a667a3 Fix fish autocompletion with custom ps output
In the docker config.json, if `psFormat` or `imagesFormat` is set to a
non-standard format, it breaks autocompletion.

This fixes the issue by using a custom format.

Signed-off-by: Chris Gibson <chris@chrisg.io>
Upstream-commit: 25654c4e13
Component: cli
2017-06-02 00:10:57 +00:00
7ef9528844 Remove docs for dockerd --no-new-privileges
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 48332a6aeb
Component: cli
2017-06-02 00:10:57 +00:00
8be15cc17b Add bash completion for topology-aware scheduling
- bash completion for `docker service create --placement-pref`
- bash completion for `docker service update --placement-pref-{add,rm}`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f50f5f8944
Component: cli
2017-06-02 00:10:57 +00:00
03b30a9925 Enhance network inspect to show all tasks, local & non-local, in swarm mode
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: 84ccb00486
Component: cli
2017-06-02 00:10:57 +00:00
55f899c468 Fix markdown in references for Kramdown
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 1f531be8ab
Component: cli
2017-06-02 00:10:57 +00:00
4a4c095ddf Fix bash completion for service constraints
- Remove bash completion for `service update --constraint`
- Add bash completion for `service update --constraint-{add,rm}`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 380be7f725
Component: cli
2017-06-02 00:10:57 +00:00
224077d070 Fix directive example to match description
The description claims the directive is appearing after a comment but
the sample Dockerfile has the directive appear after an instruction.
Changed the ordering of the lines to match the example's description.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
Upstream-commit: 558b8923ab
Component: cli
2017-06-02 00:10:57 +00:00
f439e07413 Improve bash completion for create|run --stop-signal
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fa5297b853
Component: cli
2017-06-02 00:10:57 +00:00
326047d6b9 Add bash completion for service create|update --stop-signal
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f6f45c14ec
Component: cli
2017-06-02 00:10:57 +00:00
15aa8d05a4 Fix typo in run.md documentation
Signed-off-by: John Laswell <john.n.laswell@gmail.com>
Upstream-commit: beacad8f6c
Component: cli
2017-06-02 00:10:57 +00:00
710021bc2f Update vlan-networks.md
Some small changes to get the examples so that they run without error for me.
Improve consistency of presentation of the examples.
Fix some typos

Signed-off-by: kevinfeyrer <kevin.feyrer@btinternet.com>

Update vlan-networks.md

Restore "ip" accidentally removed

Signed-off-by: kevinfeyrer <kevin.feyrer@btinternet.com>

Update vlan-networks.md

Change prompt from container "$$" to host "$"

Signed-off-by: kevinfeyrer <kevin.feyrer@btinternet.com>

Update vlan-networks.md

Some changes suggested by cpuguy83 and thaJeztah

Signed-off-by: kevinfeyrer <kevin.feyrer@btinternet.com>
Upstream-commit: dd34522fa8
Component: cli
2017-06-02 00:10:57 +00:00
bab7965433 Fix description of docker run|create --stop-signal in help message
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2fcb361c55
Component: cli
2017-06-02 00:10:57 +00:00
985040a0a9 added listing for Nimble Storage's volume plugin
Signed-off-by: Keith Hudgins <greenman@greenman.org>

updated nimble plugin url
Upstream-commit: 01468292d6
Component: cli
2017-06-02 00:10:57 +00:00
2a91e4f93d Incorporated feedback from review
Signed-off-by: Boris Pruessmann <boris@pruessmann.org>
Upstream-commit: 6f4f45a134
Component: cli
2017-06-02 00:10:57 +00:00
e6b3880a3d Improved aarch64 build
- Added 'golint', 'yamllint', and 'swagger'
- Fixed man/Dockerfile.aarch64 by bootstrapping Go 1.7.5

Signed-off-by: Boris Pruessmann <boris@pruessmann.org>
Upstream-commit: 39b2f9dd8f
Component: cli
2017-06-02 00:10:57 +00:00
d740c90562 Add support for command aliases to bash completion of docker volume
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 77cdc06233
Component: cli
2017-06-02 00:10:57 +00:00
eeef5fa0fb Improve bash completion for service create|update --update-failure-action
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0f47a7b1ef
Component: cli
2017-06-02 00:10:57 +00:00
09b39a76f1 Add bash completion for service create|update --rollback-*
Also remove wrong completion for `docker service create --rollback`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0ada299b10
Component: cli
2017-06-02 00:10:56 +00:00
33d9e6294f Add support for rollback flags
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 33ae729456
Component: cli
2017-06-02 00:10:56 +00:00
43638de628 Add support for the "rollback" failure action
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 8271c2a624
Component: cli
2017-06-02 00:10:56 +00:00
efe7f44fd5 fix some typos from module contrib to man
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: f5fc4c26f3
Component: cli
2017-06-02 00:10:56 +00:00
951746da22 Topology-aware scheduling
This adds support for placement preferences in Swarm services.

- Convert PlacementPreferences between GRPC API and HTTP API
- Add --placement-pref, --placement-pref-add and --placement-pref-rm to CLI
- Add support for placement preferences in service inspect --pretty
- Add integration test

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0248b4df54
Component: cli
2017-06-02 00:10:56 +00:00
e63c8ee73b Improve POSIX compatibility of bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9f967c7050
Component: cli
2017-06-02 00:10:56 +00:00
0d542318dc update deprecation dates
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 04731761bc
Component: cli
2017-06-02 00:10:56 +00:00
4a9d19fc63 Update index.md
Signed-off-by: Wang Jie <wangjie5@chinaskycloud.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c9f862eaf
Component: cli
2017-06-02 00:10:56 +00:00
a39ef73c0d Bash completion for docker service ps completes only one service
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 85db624317
Component: cli
2017-06-02 00:10:56 +00:00
fec035ef1b remove Jekyll tags from CLI reference
These Markdown files are now embedded in a YAML
file for templating in the documentation, and
these special markers are no longer needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8e7dd976f8
Component: cli
2017-06-02 00:10:56 +00:00
ded0855252 Add --stop-signal for service create and service update
This fix tries to address the issue raised in 25696 where
it was not possible to specify `--stop-signal` for `docker service create`
and `docker service update`, in order to use special signal to stop
the container.

This fix adds `--stop-signal` and update the `StopSignal` in `Config`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 25696.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e9457714cf
Component: cli
2017-06-02 00:10:56 +00:00
bad34967bc Hide aliases in bash completion of docker node|service
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9f2d9da271
Component: cli
2017-06-02 00:10:56 +00:00
03bbd2f84a Remove incorrect duplicate phrase from build.md
A phrase from the "Text files" section in build.md was incorrectly duplicated under the "Tarball contexts" section.

Signed-off-by: Peter Jaffe <pjaffe@nevo.com>
Upstream-commit: 3a9b35dfa4
Component: cli
2017-06-02 00:10:56 +00:00
bcb5191002 Service creation using network plugin filters.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 93344b57f3
Component: cli
2017-06-02 00:10:56 +00:00
6d2c16f8fd Add bash completion for docker build --add-host
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a584bd3b1a
Component: cli
2017-06-02 00:10:56 +00:00
d9e38bf671 Add --add-host for docker build
Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
Upstream-commit: 174d9f0097
Component: cli
2017-06-02 00:10:56 +00:00
ff678e443c Fix bash completion for docker service ps --filter node
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 09b2383b91
Component: cli
2017-06-02 00:10:56 +00:00
6ad7098f18 Add completion for --filter desired-state=shutdown
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0ec2d368a8
Component: cli
2017-06-02 00:10:56 +00:00
e0bd29f9ac Add bash completion for missing filters of docker node ls
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 170fa8ca4c
Component: cli
2017-06-02 00:10:55 +00:00
0e004eba24 Activate bash completion for Windows executable
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bf0f159175
Component: cli
2017-06-02 00:10:55 +00:00
1e8d9e0c5e Clarify why hosts in daemon.json does not work
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e66bc57039
Component: cli
2017-06-02 00:10:55 +00:00
dba622ebee Delete dots to align with other commands description
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: 21f6dce0a0
Component: cli
2017-06-02 00:10:55 +00:00
a7d5248d4a [Docs] Add docs for stating stopped containers
This commit adds docs with example showing `docker stats` stopped
containers.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 12053f480b
Component: cli
2017-06-02 00:10:55 +00:00
2cc38cf538 fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: 6f3f9e384c
Component: cli
2017-06-02 00:10:55 +00:00
6669309a99 add rollback explanation to docker service update command document
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: 1869390de8
Component: cli
2017-06-02 00:10:55 +00:00
e62d9d7004 Fix whitespace error.
Signed-off-by: Andrew McDonnell <bugs@andrewmcdonnell.net>
Upstream-commit: 5140cef92a
Component: cli
2017-06-02 00:10:55 +00:00
400bf05854 Add daemon flag to set no_new_priv as default for unprivileged containers.
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: 218740abc7
Component: cli
2017-06-02 00:10:55 +00:00
bc16584b47 Add --format to docker service ps
This fix tries to address the issue raised in 27189 where
it is not possible to support configured formatting stored in
config.json.

Since `--format` was not supported in `docker service ps`,
the flag `--format` has also been added in this fix.

This fix
1. Add `--format` to `docker service ps`
2. Add `tasksFormat` to config.json
3. Add `--format` to `docker stack ps`
4. Add `--format` to `docker node ps`

The related docs has been updated.

An integration test has been added.

This fix fixes 27189.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1328bb4440
Component: cli
2017-06-02 00:10:55 +00:00
d75af760e9 why there are so many mistakes in our repo (up to /cmd)
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 8279870a1f
Component: cli
2017-06-02 00:10:55 +00:00
a1fc8b3905 Add example for --device-cgroup-rule to create reference
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: dd6886657d
Component: cli
2017-06-02 00:10:55 +00:00
4ddd044359 Fix some Liquid errors
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: f36bcf1acd
Component: cli
2017-06-02 00:10:55 +00:00
53eb368255 Add zsh completion for docker log options 'max-buffer-size|mode'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 8c14c4f001
Component: cli
2017-06-02 00:10:55 +00:00
5c08d35278 Update plugin_volume apidocs for v2
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 38ac6860eb
Component: cli
2017-06-02 00:10:55 +00:00
be42fef480 Add plugin socket related debug docs.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: ab7522c939
Component: cli
2017-06-02 00:10:55 +00:00
e990a45379 Fix bash completion for start --checkpoint
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f004bb9cf9
Component: cli
2017-06-02 00:10:55 +00:00
aa0cc42243 Add zsh completion for 'docker service logs' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 924aff0cd4
Component: cli
2017-06-02 00:10:55 +00:00
14c4467684 Add zsh completion for 'docker checkpoint' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 6108385baa
Component: cli
2017-06-02 00:10:54 +00:00
07f5778f94 Add zsh completion for missing 'docker plugin' commands and options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: d5c236ca20
Component: cli
2017-06-02 00:10:54 +00:00
b41c5d712a Fix useless trailing backslash in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: a93d410af7
Component: cli
2017-06-02 00:10:54 +00:00
f7828d31ba Add cache invalidation in zsh completion when the DOCKER_HIDE_LEGACY_COMMANDS envvar changes
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 8691d0dd68
Component: cli
2017-06-02 00:10:54 +00:00
b62be1dbab Convert script shebangs from "#!/bin/bash" to "#!/usr/bin/env bash"
This is especially important for distributions like NixOS where `/bin/bash` doesn't exist, or for MacOS users who've installed a newer version of Bash than the one that comes with their OS.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: e6a4e7507c
Component: cli
2017-06-02 00:10:54 +00:00
f742188241 Add bash completion for docker plugin upgrade
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f2aab00321
Component: cli
2017-06-02 00:10:54 +00:00
2d75a5d4da Fix bash completion for --log-opt mode
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: af095f572e
Component: cli
2017-06-02 00:10:54 +00:00
a725b24df3 Add zsh completion for 'docker {service ls,stack services} --format'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f8462e533e
Component: cli
2017-06-02 00:10:54 +00:00
5198d702bc Add zsh completion for 'docker {ps,service ls} --filter expose|publish'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: d36a82bcaf
Component: cli
2017-06-02 00:10:54 +00:00
b90b87733a Add zsh completion for 'dockerd --default-shm-size'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: e4c858dba4
Component: cli
2017-06-02 00:10:54 +00:00
282cc0b3cb Add zsh completion for 'docker build --squash'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 58ef5d4760
Component: cli
2017-06-02 00:10:54 +00:00
0efa0b9b49 fix typo
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: 225c67f074
Component: cli
2017-06-02 00:10:54 +00:00
914cef8159 Add missing link in deprecated.md
This fix adds a missing link in deprecated.md
```
Deprecated In Release: [v1.13.0]...
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ecc4938091
Component: cli
2017-06-02 00:10:54 +00:00
e120edc8e0 Add zsh completion for 'docker swarm unlock|unlock-key' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: acff7d285d
Component: cli
2017-06-02 00:10:54 +00:00
ae910fdbcf Add zsh completion for missing 'docker swarm init|update' options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 620247aab4
Component: cli
2017-06-02 00:10:54 +00:00
07b8086695 Define bridge networks
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 022d972c38
Component: cli
2017-06-02 00:10:54 +00:00
dde4ebbb22 add expose and publish filter in swagger.yml and CLI docs for docker/master
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1507e86ada
Component: cli
2017-06-02 00:10:54 +00:00
714b8afe3a add missing filter type and sort filter type in alphabets
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4113925b25
Component: cli
2017-06-02 00:10:53 +00:00
020523b38b Standardized formatting of CLI reference commands
Command name should be a H1

Only Description, Examples, and Related Commands should be H2

Changed 'Related information' heading to 'Related commands' since 99% it is only linking commands

Added some examples where relevant

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: ddadd3db49
Component: cli
2017-06-02 00:10:53 +00:00
a34431061a Removed unused image
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: cf4b3715ed
Component: cli
2017-06-02 00:10:53 +00:00
021a712fcb Add info about the relationship between swarm leave and node rm
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: c2893a6e1c
Component: cli
2017-06-02 00:10:53 +00:00
de4235c225 update events related doc and swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: d84da237bf
Component: cli
2017-06-02 00:10:53 +00:00
7805da2f23 Add plugin debug docs.
Doc fix for #30761

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: c76dcd33f7
Component: cli
2017-06-02 00:10:53 +00:00
f0550de5d1 Improve bash completion for docker plugin enable|disable
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 221d15877d
Component: cli
2017-06-02 00:10:53 +00:00
a4e4b607e4 Update API history and man page for --filter expose/publish
This fix updates API history and man page for
`docker ps --filter expose/publish`, from the feedback:
https://github.com/docker/docker/pull/27557#issuecomment-276832876

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d77db0bd9a
Component: cli
2017-06-02 00:10:53 +00:00
2a1922b8e3 Add bash completion for docker ps --filter expose|publish
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f1cef9c7ab
Component: cli
2017-06-02 00:10:53 +00:00
1284543723 Add bash completion for docker plugin ls --filter
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f26c735282
Component: cli
2017-06-02 00:10:53 +00:00
fd7bb178af Remove --init-path mention
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
Upstream-commit: b380c2eb63
Component: cli
2017-06-02 00:10:53 +00:00
5a52b7e76e Document --init flag for docker run
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
Upstream-commit: f571b363e6
Component: cli
2017-06-02 00:10:53 +00:00
b40caaa6d6 Update docker stack experimental notes
Update command usage and help.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 705f7ad7d2
Component: cli
2017-06-02 00:10:53 +00:00
8d23e38798 added ppc64le and s390x fixes for manpages
Fixes manpages for p and z by downloading a specific version
of go instead of relying on the distro version.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: d39215cbaa
Component: cli
2017-06-02 00:10:53 +00:00
5842bb356f Fix grammatical error in swarm_leave.md
Correct this sentence so it reads correctly. "to on a manager" should be
"on a manager".

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: e6889bf41b
Component: cli
2017-06-02 00:10:53 +00:00
7fdb8e3901 remove musl-dev in man/Dockerfile.armhf
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: ff9b736d52
Component: cli
2017-06-02 00:10:53 +00:00
ed74cb5919 use precompiled go from google, needs debian to work
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: a39f753e56
Component: cli
2017-06-02 00:10:52 +00:00
ed59737443 from golang:1.7.5-alpine for docker-manpage-dev
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 6d4b51d1a9
Component: cli
2017-06-02 00:10:52 +00:00
35aa1f008a Add bash completion for {stack services,service ls} --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f7e0aa39fa
Component: cli
2017-06-02 00:10:52 +00:00
a754ae967d Updated dockerd docs with note about user namespaces
Signed-off-by: Lewis Daly <lewisdaly@me.com>

Updated uid/gid reference to be more canonical - and signed commit

Signed-off-by: Lewis Daly <lewisdaly@me.com>

Editorial suggestion

I tried my hand at rewriting this a bit for readability. Can you please verify that the facts are correct, especially about the permission changes? You can feel free to squash my commit with yours so that it's signed. You'll need to pull the change from your fork to work on it locally.

Editorial suggestion

I tried my hand at rewriting this a bit for readability. Can you please verify that the facts are correct, especially about the permission changes? You can feel free to squash my commit with yours so that it's signed. You'll need to pull the change from your fork to work on it locally.
Upstream-commit: 50d1d4ecba
Component: cli
2017-06-02 00:10:52 +00:00
6a8ef9223f Make propagated mount persist outside rootfs
This persists the "propagated mount" for plugins outside the main
rootfs. This enables `docker plugin upgrade` to not remove potentially
important data during upgrade rather than forcing plugin authors to hard
code a host path to persist data to.

Also migrates old plugins that have a propagated mount which is in the
rootfs on daemon startup.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: df4e570ff4
Component: cli
2017-06-02 00:10:52 +00:00
c2e799fae6 Add docker plugin upgrade
This allows a plugin to be upgraded without requiring to
uninstall/reinstall a plugin.
Since plugin resources (e.g. volumes) are tied to a plugin ID, this is
important to ensure resources aren't lost.

The plugin must be disabled while upgrading (errors out if enabled).
This does not add any convenience flags for automatically
disabling/re-enabling the plugin during before/after upgrade.

Since an upgrade may change requested permissions, the user is required
to accept permissions just like `docker plugin install`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 02677bc06e
Component: cli
2017-06-02 00:10:52 +00:00
8a781f7442 Add bash completion for dockerd --default-shm-size
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1d032d8b1e
Component: cli
2017-06-02 00:10:52 +00:00
5a9900c580 Refactor use of shared completion functions
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5288b7e7fd
Component: cli
2017-06-02 00:10:52 +00:00
c4b571e726 Windows: Unify workdir handling
Signed-off-by: John Howard <jhoward@microsoft.com>

Working directory processing was handled differently for Hyper-V and Windows-Server containers, as annotated in the builder documentation (updated in this PR). For Hyper-V containers, the working directory set by WORKDIR was not created. This PR makes Hyper-V containers work the same as Windows Server containers (and the same as Linux).

Example (only applies to Hyper-V containers, so not reproducible under CI environment)
Dockerfile:
FROM microsoft/nanoserver
WORKDIR c:\installer
ENV GOROOT=c:\installer
ADD go.exe .
RUN go --help
Running on Windows Server 2016, using docker master without this change, but with daemon set to --exec-opt isolation=hyperv as it would be for Client operating systems.
PS E:\go\src\github.com\docker\docker> dockerd -g c:\control --exec-opt isolation=hyperv
time="2017-02-01T15:48:09.657286100-08:00" level=info msg="Windows default isolation mode: hyperv"
time="2017-02-01T15:48:09.662720900-08:00" level=info msg="[graphdriver] using prior storage driver: windowsfilter"
time="2017-02-01T15:48:10.011588000-08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-02-01T15:48:10.016655800-08:00" level=info msg="Loading containers: start."
time="2017-02-01T15:48:10.460820000-08:00" level=info msg="Loading containers: done."
time="2017-02-01T15:48:10.509859600-08:00" level=info msg="Daemon has completed initialization"
time="2017-02-01T15:48:10.509859600-08:00" level=info msg="Docker daemon" commit=3c64061 graphdriver=windowsfilter version=1.14.0-dev
First with no explicit isolation:
PS E:\docker\build\unifyworkdir> docker build --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 7e0f41d08204
Removing intermediate container 236c7802042a
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in 8ea5237183c1
 ---> 394b70435261
Removing intermediate container 8ea5237183c1
Step 4/5 : ADD go.exe .
 ---> e47401a1745c
Removing intermediate container 88dcc28e74b1
Step 5/5 : RUN go --help
 ---> Running in efe90e1b6b8b
container efe90e1b6b8b76586abc5c1dc0e2797b75adc26517c48733d90651e767c8463b encountered an error during CreateProcess: failure in a Windows system call: The directory name is invalid. (0x10b) extra info: {"ApplicationName":"","CommandLine":"cmd /S /C go --help","User":"","WorkingDirectory":"C:\\installer","Environment":{"GOROOT":"c:\\installer"},"EmulateConsole":false,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}
PS E:\docker\build\unifyworkdir>
Then forcing process isolation:
PS E:\docker\build\unifyworkdir> docker build --isolation=process --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 350c955980c8
Removing intermediate container 8339c1e9250c
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in bde511c5e3e0
 ---> b8820063b5b6
Removing intermediate container bde511c5e3e0
Step 4/5 : ADD go.exe .
 ---> e4ac32f8902b
Removing intermediate container d586e8492eda
Step 5/5 : RUN go --help
 ---> Running in 9e1aa235af5f
Cannot mkdir: C:\installer is not a directory
PS E:\docker\build\unifyworkdir>
Now compare the same results after this PR. Again, first with no explicit isolation (defaulting to Hyper-V containers as that's what the daemon it set to) - note it now succeeds 😄
PS E:\docker\build\unifyworkdir> docker build --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> 4f319f301c69
Removing intermediate container 61b9c0b1ff6f
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in c464a1d612d8
 ---> 96a26ab9a7b5
Removing intermediate container c464a1d612d8
Step 4/5 : ADD go.exe .
 ---> 0290d61faf57
Removing intermediate container dc5a085fffe3
Step 5/5 : RUN go --help
 ---> Running in 60bd56042ff8
Go is a tool for managing Go source code.

Usage:

        go command [arguments]

The commands are:

        build       compile packages and dependencies
        clean       remove object files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         run go tool fix on packages
        fmt         run gofmt on package sources
        generate    generate Go files by processing source
        get         download and install packages and dependencies
        install     compile and install packages and dependencies
        list        list packages
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

        c           calling between Go and C
        buildmode   description of build modes
        filetype    file types
        gopath      GOPATH environment variable
        environment environment variables
        importpath  import path syntax
        packages    description of package lists
        testflag    description of testing flags
        testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

The command 'cmd /S /C go --help' returned a non-zero code: 2
And the same with forcing process isolation. Also works 😄
PS E:\docker\build\unifyworkdir> docker build --isolation=process --no-cache .
Sending build context to Docker daemon  10.1 MB
Step 1/5 : FROM microsoft/nanoserver
 ---> 89b8556cb9ca
Step 2/5 : WORKDIR c:\installer
 ---> f423b9cc3e78
Removing intermediate container 41330c88893d
Step 3/5 : ENV GOROOT c:\installer
 ---> Running in 0b99a2d7bf19
 ---> e051144bf8ec
Removing intermediate container 0b99a2d7bf19
Step 4/5 : ADD go.exe .
 ---> 7072e32b7c37
Removing intermediate container a7a97aa37fd1
Step 5/5 : RUN go --help
 ---> Running in 7097438a54e5
Go is a tool for managing Go source code.

Usage:

        go command [arguments]

The commands are:

        build       compile packages and dependencies
        clean       remove object files
        doc         show documentation for package or symbol
        env         print Go environment information
        fix         run go tool fix on packages
        fmt         run gofmt on package sources
        generate    generate Go files by processing source
        get         download and install packages and dependencies
        install     compile and install packages and dependencies
        list        list packages
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

        c           calling between Go and C
        buildmode   description of build modes
        filetype    file types
        gopath      GOPATH environment variable
        environment environment variables
        importpath  import path syntax
        packages    description of package lists
        testflag    description of testing flags
        testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

The command 'cmd /S /C go --help' returned a non-zero code: 2
PS E:\docker\build\unifyworkdir>
Upstream-commit: 93a4f88991
Component: cli
2017-06-02 00:10:52 +00:00
b802dfee3e add endpoint mode a default value
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 2726013423
Component: cli
2017-06-02 00:10:52 +00:00
3f713f4c69 Add bash completion for {dockerd,docker run} --log-opt max-buffer-size|mode
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e49d13fc02
Component: cli
2017-06-02 00:10:52 +00:00
301a68b5ae Add markdown for man page of docker plugin ls
This fix adds markdown for man page of `docker plugin ls`,
based on https://github.com/docker/docker/pull/28627#issuecomment-276731752

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6686179ff5
Component: cli
2017-06-02 00:10:52 +00:00
89a3d2f832 Add --format to docker service ls
This fix tries to improve the display of `docker service ls`
and adds `--format` flag to `docker service ls`.

In addition to `--format` flag, several other improvement:
1. Updates `docker stacks service`.
2. Adds `servicesFormat` to config file.

Related docs has been updated.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7d3b3fda0d
Component: cli
2017-06-02 00:10:52 +00:00
f08bf3eff7 Make markdown for man pages of docker container ... consistent
This fix updates the markdown for man pages of `docker container ...`
so that they are consistent. The changes are based on feedback:
https://github.com/docker/docker/pull/30645#discussion_r99020188
https://github.com/docker/docker/pull/30645#discussion_r99020304

1. Use `H2 (##)` as needed
2. Use unrpiviledged prompt (`$`) instead of (`#`)

This PR convers files under man/src/container/*.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b8b156f343
Component: cli
2017-06-02 00:10:52 +00:00
2b3dc2cecc reference/commandline: small tfix
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: e000321b1d
Component: cli
2017-06-02 00:10:52 +00:00
69fb91c724 Add bash completion for docker checkpoint
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a4ce26ba47
Component: cli
2017-06-02 00:10:52 +00:00
d0dc5b7b7d Update opts.MemBytes to disable default, and move docker run/create/build to use opts.MemBytes
This fix made several updates:
1. Update opts.MemBytes so that default value will not show up.
   The reason is that in case a default value is decided by daemon,
   instead of client, we actually want to not show default value.
2. Move `docker run/create/build` to use opts.MemBytes for `--shm-size`
   This is to bring consistency between daemon and docker run
3. docs updates.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d75f24fd9d
Component: cli
2017-06-02 00:10:52 +00:00
a83525f5e9 Add daemon option --default-shm-size
This fix fixes issue raised in 29492 where it was not
possible to specify a default `--default-shm-size` in daemon
configuration for each `docker run``.

The flag `--default-shm-size` which is reloadable, has been
added to the daemon configuation.
Related docs has been updated.

This fix fixes 29492.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 205ebd8d30
Component: cli
2017-06-02 00:10:52 +00:00
1397dfc743 Add capability filter to docker plugin ls
This fix adds `--filter capability=[volumedriver|authz]` to `docker plugin ls`.

The related docs has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ecfe6ab218
Component: cli
2017-06-02 00:10:51 +00:00
ef13b91211 Add --filter enabled=true for docker plugin ls
This fix adds `--filter enabled=true` to `docker plugin ls`,
as was specified in 28624.

The related API and docs has been updated.

An integration test has been added.

This fix fixes 28624.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: dd745df384
Component: cli
2017-06-02 00:10:51 +00:00
fa673da1ce Add publish and expose filter for docker ps --filter
This fix tries to address the enhancement proposal raised in
27178 for filtering based on published or exposed ports of
`docker ps --filter`.

In this fix, two filter options, `publish` and `expose` have
been added to take either `<port>[/<protocol>]` or `<from>-<to>[/<protocol>]`
and filtering on containers.

An integration test has been added to cover the changes.

This fix fixes 27178.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: aeda99b195
Component: cli
2017-06-02 00:10:51 +00:00
6ff57bcab1 Add example for device-cgroup-rule to man
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 48fdaee058
Component: cli
2017-06-02 00:10:51 +00:00
daeec5c32c Allow adding rules to cgroup devices.allow on container create/run
This introduce a new `--device-cgroup-rule` flag that allow a user to
add one or more entry to the container cgroup device `devices.allow`

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: e9ad0f345f
Component: cli
2017-06-02 00:10:51 +00:00
7b73b7fd1c Fix for https://github.com/docker/docker.github.io/issues/1413
Signed-off-by: John Mulhausen <john@docker.com>
Upstream-commit: 706bbd52f0
Component: cli
2017-06-02 00:10:51 +00:00
bf0951b225 Provide password to volume create command
* Depending on the host configuration between the docker engine and the remote host we wish to mount using sshfs, a password may be required.
* Confirmed syntax for optional parameter with @vieux
* Verified change works as desired with engine running on Ubuntu host and mounting a volume from a file system on a Mac.

Signed-off-by: David Williamson <david.williamson@docker.com>
Upstream-commit: b8df00a4b4
Component: cli
2017-06-02 00:10:51 +00:00
3f499863f0 Fix syntax in example
Signed-off-by: Jeroen Franse <jeroenfranse@gmail.com>
Upstream-commit: 9fcf59f2e2
Component: cli
2017-06-02 00:10:51 +00:00
207d59a349 Update bash and zsh completion for service create/update --read-only
This commit updates bash and zsh completion for flag `--read-only`
in `service create/update`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 2fade897b9
Component: cli
2017-06-02 00:10:51 +00:00
2a7cf7b5d0 Add --read-only for service create and service update
This fix tries to address the issue raised in 29972 where
it was not possible to specify `--read-only` for `docker service create`
and `docker service update`, in order to have the container's root file
system to be read only.

This fix adds `--read-only` and update the `ReadonlyRootfs` in `HostConfig`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 29972.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8235af9772
Component: cli
2017-06-02 00:10:51 +00:00
f4f2477d26 Add docs for service create based on plugins.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 79479e040f
Component: cli
2017-06-02 00:10:51 +00:00
bc0808e976 Add bash completion for docker service logs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bdf88a6e67
Component: cli
2017-06-02 00:10:51 +00:00
f164989143 Update bash and zsh completion for aws-create-group
This commit updates bash and zsh completion for aws-create-group.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a4acd7887f
Component: cli
2017-06-02 00:10:51 +00:00
b865fb6b6b Add [OPTIONS] to usage of plugin disable|push
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5027bc6596
Component: cli
2017-06-02 00:10:51 +00:00
cf17bf7d66 Use native call for listing plugins in bash completion
`docker plugin ls` now has `--format`, so there is no more need for
postprocessing raw `docker plugin ls` output with `awk` any more.
This will make generation of plugin lists robust against changes
in `docker plugin ls` output.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f38bb95619
Component: cli
2017-06-02 00:10:51 +00:00
eeddb767f3 Fix json format of plugin
Signed-off-by: Janonymous <janonymous.codevulture@gmail.com>
Upstream-commit: 7953201f9d
Component: cli
2017-06-02 00:10:51 +00:00
7951ee4996 Rename helper function in bash completion for consistency
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a88fb3678d
Component: cli
2017-06-02 00:10:50 +00:00
c3c790c8f5 Hide bash completion for docker run|create|build --isolation on non-windows
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3494343b71
Component: cli
2017-06-02 00:10:50 +00:00
2368812ef3 Add windows specific bash completion for docker run|create
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d9dbe8b6f6
Component: cli
2017-06-02 00:10:50 +00:00
edbd133210 Docs: Be more clear when specifying valid formats for strings
- Use the word letter rather than character to refer to letters ;) when trying to specify that only letters and numbers can be used, and not ANY character...
- Small corrections

Fixes #29821

Signed-off-by: Timothy Hobbs <timothy@hobbs.cz>
Upstream-commit: 46c619655f
Component: cli
2017-06-02 00:10:50 +00:00
dcf35f6526 update incorrect url in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0705425584
Component: cli
2017-06-02 00:10:50 +00:00
6c66c6e604 Fix bash completion for completing nodes
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5f791f6b6a
Component: cli
2017-06-02 00:10:50 +00:00
00e39ec8eb Add zsh completion for multiple service for 'docker service ps'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4577834e8c
Component: cli
2017-06-02 00:10:50 +00:00
fe2c8c26f0 Add docs for run|create --init|--init-path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: da15de5f1b
Component: cli
2017-06-02 00:10:50 +00:00
06c63bc763 Add bash completion for run|create --init-path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 128549e354
Component: cli
2017-06-02 00:10:50 +00:00
9481afb436 Add zsh completion for 'docker plugin install --alias'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 3cb11c99b3
Component: cli
2017-06-02 00:10:50 +00:00
cbeff7a5e3 Add bash completion for docker swarm unlock|unlock-key
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 24bf7b830a
Component: cli
2017-06-02 00:10:50 +00:00
531d371078 Add missing options to bash completion for docker swarm init|update
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a91e0c5b33
Component: cli
2017-06-02 00:10:50 +00:00
602e1bb569 Fix bash completion for docker service update
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1a5f49057c
Component: cli
2017-06-02 00:10:50 +00:00
c1334d9a27 Improve bash completion for docker run --cap-{add,drop}
Docker has several capabilities enabled by default and some not.
It seems natural to follow this distinction in --cap-add and
--cap-drop.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 75d90a8a18
Component: cli
2017-06-02 00:10:50 +00:00
ce90228a83 Fixed secret creation usage during service create in docs
Using source, the following error is made:
invalid field in secret request: src

Signed-off-by: Michael Irwin <mikesir87@gmail.com>
Upstream-commit: 6e6d6edd08
Component: cli
2017-06-02 00:10:50 +00:00
94ff9946b0 Fix bash completion for docker plugin ls
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4489f4ab10
Component: cli
2017-06-02 00:10:50 +00:00
8e35845b73 Add .CreatedAt placeholder for docker network ls --format
This fix tries to add a placeholder `.CreatedAt` for Go
format template in `docker network ls --format`.

While working on 29226, I noticed that it is not possible to
display network's creation time in `docker network ls`, with or
without `--format`.

We are able to find the timestamp through `docker network inspect` though.

However, as we allows networks to be pruned based on the timestamp
(see 29226), showing the timestamp in `docker network ls --format`
would be much useful now.

This fix adds the `.CreatedAt` placeholder for `docker network ls --format`.
The default output was not changed for `docker network ls --format`.

A test case for unit tests has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e541799eed
Component: cli
2017-06-02 00:10:50 +00:00
56fed66072 Add bash completion for docker service ps --filter node
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 046aa9aa23
Component: cli
2017-06-02 00:10:50 +00:00
8b1001e0f8 plugins: add example docs for a rexray plugin
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f75cb34afa
Component: cli
2017-06-02 00:10:49 +00:00
0de396aa6c fix flag descriptions for content-trust
Commit ed13c3abfb242905ec012e8255dc6f26dcf122f6 added flags
for Docker Content Trust. Depending on the `verify` boolean,
the message is "Skip image verification", or "Skip image signing".
"Signing" is intended for `docker push` / `docker plugin push`.

During the migration to Cobra, this boolean got flipped for
`docker push` (9640e3a4514f96a890310757a09fd77a3c70e931),
causing `docker push` to show the incorrect flag description.

This patch changes the flags to use the correct description
for `docker push`, and `docker plugin push`.

To prevent this confusion in future, the boolean argument
is removed, and a `AddTrustSigningFlags()` function is added.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8d43f5593a
Component: cli
2017-06-02 00:10:49 +00:00
c8f6d866c3 Add zsh completion for 'dockerd --init' and 'docker {create,run} --init'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f7efcbbaa1
Component: cli
2017-06-02 00:10:49 +00:00
8569ad5ae6 Add bash completion for newly added options to "docker plugin ls"
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: e41d3a22ce
Component: cli
2017-06-02 00:10:49 +00:00
e5776e6e26 Add --format flag for docker plugin ls
This fix tries to address the enhancement discussed in 28735 to add
`--format` for the output of `docker plugin ls`.

This fix
1. Add `--format` and `--quiet` flags to `docker plugin ls`
2. Convert the current implementation to use `formatter`, consistent with
   other docker list commands.
3. Add `pluginsFormat` for config.json.

Related docs has been updated.

Several unit tests have been added to cover the changes.

This fix is related to 28708 and 28735.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d36dd6541a
Component: cli
2017-06-02 00:10:49 +00:00
db8a8c022f remove indent from .dockerignore example
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: e65d4d2907
Component: cli
2017-06-02 00:10:49 +00:00
9ff6593d35 Merge pull request #30329 from johndmulhausen/patch-2
Fixing formatting errors in Run refdoc

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: dd05de1e6a
Component: cli
2017-06-02 00:10:49 +00:00
07072a8984 Add zsh completion for 'docker swarm --availability'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: ad214d7a79
Component: cli
2017-06-02 00:10:49 +00:00
c11bc343aa Add zsh completion for 'docker {container,image,network,system} prune --filter'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 8cd8ceedf6
Component: cli
2017-06-02 00:10:49 +00:00
e8296f67cc Fix some typos
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: b5758e62de
Component: cli
2017-06-02 00:10:49 +00:00
c7b3f20a8e Add bash completion for dockerd --init and docker run|create --init
Fixes #30263

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0e8ea8a2b6
Component: cli
2017-06-02 00:10:49 +00:00
227539bc5c Update run.md ENV docs
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8c24f5d5e7
Component: cli
2017-06-02 00:10:49 +00:00
7770eceb62 Complete the options for 'docker plugin install'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: b6aba94144
Component: cli
2017-06-02 00:10:49 +00:00
e1562c94a9 Add bash completion for build --squash
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f58ef83a2c
Component: cli
2017-06-02 00:10:49 +00:00
ac6e5621fd Add bash completion for container|image|network prune --filter until
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 347c066e0d
Component: cli
2017-06-02 00:10:49 +00:00
91d650a72a Fix treatment of DOCKER_HIDE_LEGACY_COMMANDS in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: cce9425a74
Component: cli
2017-06-02 00:10:49 +00:00
b777b51905 Add bash completion for plugin install --disable-content-trust
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ad4e1a9c61
Component: cli
2017-06-02 00:10:49 +00:00
10c83e10b1 Honour $DOCKER_HIDE_LEGACY_COMMANDS in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: aa4b0f065b
Component: cli
2017-06-02 00:10:48 +00:00
6cadd5ebe4 Clarify cp documentation behaviour with trailing "/."
Issue #30082 demonstrated that their is possible confusion with the "/."
where the tailing "." can appear to be merely punctuation within the
document rather than a highly pertinent part of `SRC_PATH`.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 4db608f186
Component: cli
2017-06-02 00:10:48 +00:00
c96feef15a Add bash completion for swarm join --availability
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3b59097abd
Component: cli
2017-06-02 00:10:48 +00:00
2e4253af5c Allow swarm init with --availability=drain
This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4a16aa2ece
Component: cli
2017-06-02 00:10:48 +00:00
a1ee3c9125 Allow swarm join with --availability=drain
This fix tries to address the issue raised in 24596 where it was not
possible to join as manager only (`--availability=drain`).

This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

NOTE: Additional pull request for swarmkit and engine-api will
be created separately.

This fix fixes 24596.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f4d26add25
Component: cli
2017-06-02 00:10:48 +00:00
ad57980f55 plugins: rename DeviceCreation to AllowAllDevices
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 8c3f18ca6d
Component: cli
2017-06-02 00:10:48 +00:00
d44562c7fe add port PublishMode to service inspect --pretty output
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 3988259bcb
Component: cli
2017-06-02 00:10:48 +00:00
1da5f6bd38 remove -f on secret create and unify usage with other commands
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 20954b356b
Component: cli
2017-06-02 00:10:48 +00:00
fdbe44297c Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fdd6879b68
Component: cli
2017-06-02 00:10:48 +00:00
6b26f65e63 explain since format and give examples
Signed-off-by: tronicum <tronicum@user.github.com>
Upstream-commit: 915a5a3c57
Component: cli
2017-06-02 00:10:48 +00:00
baa324abc0 fix volume ls filter driver
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1f494501f2
Component: cli
2017-06-02 00:10:48 +00:00
8832918e96 Fix incorrect alias and URL
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 70d63dce63
Component: cli
2017-06-02 00:10:48 +00:00
4fbe81294a keep network option consistent between network connect and run
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6337d3724e
Component: cli
2017-06-02 00:10:48 +00:00
ae3f860511 Provide correct command imformation and URL
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 30f009076e
Component: cli
2017-06-02 00:10:48 +00:00
0209697d2c Add bash completion for plugin names
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fbfe077b1e
Component: cli
2017-06-02 00:10:48 +00:00
6b942cd096 Fix "zsh/_docker"
Signed-off-by: Yunxiang Huang <hyxqshk@vip.qq.com>
Upstream-commit: bd5bced8d1
Component: cli
2017-06-02 00:10:48 +00:00
6793285077 small secret doc update
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 67da1ed340
Component: cli
2017-06-02 00:10:48 +00:00
33e61adc59 Tidy --isolation wording
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 36274c35d5
Component: cli
2017-06-02 00:10:47 +00:00
d1a9a33820 support registry mirror config reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6c3e0ba560
Component: cli
2017-06-02 00:10:47 +00:00
6e8e4af103 Update docker daemon to dockerd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6dcebccc46
Component: cli
2017-06-02 00:10:47 +00:00
7632076475 replace no-remove by sample-volume-plugin in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 63aa05d3f7
Component: cli
2017-06-02 00:10:47 +00:00
633a71429a Read long description from a file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5bd015e2d9
Component: cli
2017-06-02 00:10:47 +00:00
3bfda246fa Support multiple services on bash completion for docker service ps
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ce569fd836
Component: cli
2017-06-02 00:10:47 +00:00
4cff8fc505 update plugins in docs and correct things in index.md
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: a004c15df0
Component: cli
2017-06-02 00:10:47 +00:00
69c512fa5b Support multiple service IDs on "docker service ps"
This fix tries to address issue raised in 25228 to support
multiple service IDs on `docker service ps`.

Multiple IDs are allowed with `docker service ps ...`, and
related documentation has been updated.

A test has been added to cover the changes.

This fix fixes 25228.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0645bd841e
Component: cli
2017-06-02 00:10:47 +00:00
542d3a8cbd Update reference document for secret and stack
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 1471f8013b
Component: cli
2017-06-02 00:10:47 +00:00
094303a355 Fix usage message of plugin inspect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6c5145d074
Component: cli
2017-06-02 00:10:47 +00:00
407d116751 Add bash completion for plugin disable --force
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0e0cb6498c
Component: cli
2017-06-02 00:10:47 +00:00
f949dc0d1d Fix bash completion for plugin enable|disable
`docker plugin enable` and `docker plugin disable` only
accept one plugin.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 70d8efd001
Component: cli
2017-06-02 00:10:47 +00:00
2362df6877 document DOCKER_HIDE_LEGACY_COMMANDS env-var
The `DOCKER_HIDE_LEGACY_COMMANDS` environment
variable was added in a7c8bcac2ba60d6dd25a1157085d9245bed556ce
but not documented.

This adds the variable to the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8d4ea9f2cf
Component: cli
2017-06-02 00:10:47 +00:00
28f7d73273 Complete the document content
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 7957741105
Component: cli
2017-06-02 00:10:47 +00:00
81eac9ebfb update URL of plugins_graphdriver.md in experimental/README.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: aba799a996
Component: cli
2017-06-02 00:10:47 +00:00
c7464dd765 Reference new DigitalOcean plugin (Closes #29729)
Signed-off-by: Ovidio Mallo <ovidio.mallo@gmail.com>
Upstream-commit: b839363db9
Component: cli
2017-06-02 00:10:47 +00:00
c005f02b03 Update the field 'CONTAINER ID' for docker ps
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6f6cd51db6
Component: cli
2017-06-02 00:10:47 +00:00
9a4c188913 fix some typos
Signed-off-by: zhenghenghuo <zhenghenghuo@zju.edu.cn>

try to pass test

Signed-off-by: zhenghenghuo <zhenghenghuo@zju.edu.cn>

try to pass the test

Signed-off-by: zhenghenghuo <zhenghenghuo@zju.edu.cn>
Upstream-commit: a724a5d8c9
Component: cli
2017-06-02 00:10:46 +00:00
46ae0221fe Update 'ID' field for 'docker plugin ls'
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: fcb3a0e88b
Component: cli
2017-06-02 00:10:46 +00:00
101c8b0a0e Remove docker stack ps -a to match removal of docker service/node ps -a
In #28507 and #28885, `docker service/node ps -a` has been removed so that
information about slots are show up even without `-a` flag.

The output of `docker stack ps` reused the same output as `docker service/node ps`.
However, the `-a` was still there. It might make sense to remove `docker stack ps -a`
as well to bring consistency with `docker service/node ps`.

This fix is related to #28507, #28885, and #25983.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7e5ce47599
Component: cli
2017-06-02 00:10:46 +00:00
10b208e016 Update the manuals of docker and dockerd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b193004923
Component: cli
2017-06-02 00:10:46 +00:00
bebc564050 Update the index of docker command line
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 348a7520c9
Component: cli
2017-06-02 00:10:46 +00:00
7dc9264d52 Add bash completion for plugin install --alias
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b78f47ca4a
Component: cli
2017-06-02 00:10:46 +00:00
f79865561d Cleanup bash completion for service create|update
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 73a5149c50
Component: cli
2017-06-02 00:10:46 +00:00
9bff074ec1 Add 'volume prune' to the volume commands index
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 93ca1a3122
Component: cli
2017-06-02 00:10:46 +00:00
94c8461a3d Moves graphdriver plugn docs out of experimental
Also updates some of the structures being sent so plugins are getting
all the new options.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a59544ff3d
Component: cli
2017-06-02 00:10:46 +00:00
0a588f27d2 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: b5b3dd4c6b
Component: cli
2017-06-02 00:10:46 +00:00
9488b60ad6 Enforce zero plugin refcount during disable.
When plugins have a positive refcount, they were not allowed to be
removed. However, plugins could still be disabled when volumes
referenced it and containers using them were running.

This change fixes that by enforcing plugin refcount during disable.
A "force" disable option is also added to ignore reference refcounting.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: e31e2d5bd4
Component: cli
2017-06-02 00:10:46 +00:00
96451aedeb followup to incorporate review comments per previous reviews on PR#29561
incorporated review comments

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Upstream-commit: 40f445d605
Component: cli
2017-06-02 00:10:46 +00:00
3000095596 Add missing "--default-runtime" flag in manpage
Add missing flag and more descriptions in manpage.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: ef5fb30f61
Component: cli
2017-06-02 00:10:46 +00:00
b768cd6312 Clarify what docker diff shows
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: fbb21b0191
Component: cli
2017-06-02 00:10:46 +00:00
34f384e6dd Add the link for swarm reference document
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 9d27f13dd8
Component: cli
2017-06-02 00:10:46 +00:00
661f4003fc Change tls to TLS
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 0a6612f03f
Component: cli
2017-06-02 00:10:46 +00:00
1e4ad9ea7d Improve bash completion for bundled plugins
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 388c8f8a30
Component: cli
2017-06-02 00:10:46 +00:00
2998f50108 Add Fuxi Volume Plugin to the docs
Signed-off-by: Hongbin Lu <hongbin034@gmail.com>
Upstream-commit: 08ba19c291
Component: cli
2017-06-02 00:10:45 +00:00
67af87398f some punctuation errors and a verb form error
Signed-off-by: Xinbo Weng <xihuanbo_0521@zju.edu.cn>
Upstream-commit: e3d6fbd44f
Component: cli
2017-06-02 00:10:45 +00:00
ec418efe9e duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
Upstream-commit: 22b1d28bde
Component: cli
2017-06-02 00:10:45 +00:00
2382f08b14 updates to d4win description per review comments
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Upstream-commit: 0be1dede62
Component: cli
2017-06-02 00:10:45 +00:00
4c1c7e3c26 updates to glossary re: d4mac, d4win, toolbox per user request
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Upstream-commit: 205d49dfa0
Component: cli
2017-06-02 00:10:45 +00:00
c462ad6f63 Fix misleading default for --replicas
This fix tries to address the issue raised in 29291 where
the output of `--replicas` in `service create/update`:
```
      --replicas uint                    Number of tasks (default none)
```
is misleading. User might incorrectly assume the number of replicas
would be `0` (`none`) by default, while the actual default is `1`.

The issue comes from the fact that some of the default values are
from daemon and it is not possible for client to find out the default
value.

In this case, it might be better to just simply not displaying `(default none)`.

This fix returns "" for `Uint64Opt` so that `(default none)` is hidden.

In addition to `--replicas`, this fix also changes
`--restart-delay`, `--restart-max-attempts`, `--stop-grace-period`,
`--health-interval`, `--health-timeout`, and `--restart-window`
in a similiar fashion.

New Output:
```
      --health-interval duration         Time between running the check (ns|us|ms|s|m|h)
      --health-timeout duration          Maximum time to allow one check to run (ns|us|ms|s|m|h)
...
      --replicas uint                    Number of tasks
...
      --restart-delay duration           Delay between restart attempts (ns|us|ms|s|m|h)
      --restart-max-attempts uint        Maximum number of restarts before giving up
      --restart-window duration          Window used to evaluate the restart policy (ns|us|ms|s|m|h)
...
      --stop-grace-period duration       Time to wait before force killing a container (ns|us|ms|s|m|h)
```

The docs has been updated. Note the docs for help output of `service create/update`
is out of sync with the current master. This fix replace with the update-to-date
help output.

This fix fixes 29291.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 87b4281f62
Component: cli
2017-06-02 00:10:45 +00:00
d30480f44f correct some words
Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

Update ISSUE-TRIAGE.md

Signed-off-by: vicky <395658237@qq.com>
Upstream-commit: 1b85eea07d
Component: cli
2017-06-02 00:10:45 +00:00
73b9490c31 field NAMES ommitted after docker ps in commit.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 41d0180f2a
Component: cli
2017-06-02 00:10:45 +00:00
16f46460cc update docs about --oom-score-adj
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 175d21838a
Component: cli
2017-06-02 00:10:45 +00:00
097129d37e Remove bash completion for deprecated docker daemon
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5997147397
Component: cli
2017-06-02 00:10:45 +00:00
57b5fdb41c Add docker-update description ommited in docker.1.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: f03fd566f6
Component: cli
2017-06-02 00:10:45 +00:00
70afe5fd31 Remove --all|-a from docker node ps reference
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7a9de26c6e
Component: cli
2017-06-02 00:10:45 +00:00
8ddacc9277 [docs,man] Fixed typo (#29516)
Signed-off-by: Michael Käufl <docker@c.michael-kaeufl.de>
Upstream-commit: b9c6e9ef21
Component: cli
2017-06-02 00:10:45 +00:00
defa099008 Remove bash completion for docker node ps --all|-a
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8e57564708
Component: cli
2017-06-02 00:10:45 +00:00
c530b42113 Add --file flag for docker secret create command
This fix tries to address the issue raised in 28581 and 28927
where it is not possible to create a secret from a file (only
through STDIN).

This fix add a flag `--file` to `docker secret create` so that
it is possible to create a secret from a file with:
```
docker secret create --file secret.in secret.name
```

or
```
echo TEST | docker secret create --file - secret.name
```

Related docs has been updated.

An integration test has been added to cover the changes.

This fix fixes 28581.
This fix is related to 28927.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c8f99f00d2
Component: cli
2017-06-02 00:10:45 +00:00
83531e1695 update experimental/README.md
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: fd0957a407
Component: cli
2017-06-02 00:10:45 +00:00
7f47625faa swarm leave is not only for workers
the "docker swarm leave" command description
mentioned that the command can only be used
for workers, however, the command can also
be used for managers (using the `-f` / `--force`
option).

this patch removes the "(workers only)" part
of the command description.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0d964441e9
Component: cli
2017-06-02 00:10:45 +00:00
5b8e4af26b Fix inconsistency for pause and unpause
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: dd1e172adb
Component: cli
2017-06-02 00:10:45 +00:00
b68c5d52fe Add the whole related information for node
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: a3246c7c3d
Component: cli
2017-06-02 00:10:44 +00:00
21013bc0e4 Add the link for service logs
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 932211ddc7
Component: cli
2017-06-02 00:10:44 +00:00
84477efeb4 fix typo in reference for service create
Signed-off-by: Trapier Marshall <trapier.marshall@docker.com>
Upstream-commit: e1eea7b951
Component: cli
2017-06-02 00:10:44 +00:00
e0a7ab71aa Add docs for docker network create --attachable
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a325d3ea2a
Component: cli
2017-06-02 00:10:44 +00:00
dfec30521c Make bash completion for docker stack deploy --bundle-file experimental
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ea5be8f75f
Component: cli
2017-06-02 00:10:44 +00:00
77de2eabdc Remove --port and update --publish for services to support syntaxes
Add support for simple and complex syntax to `--publish` through the
use of `PortOpt`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b837f7456d
Component: cli
2017-06-02 00:10:44 +00:00
1d2468df13 Update the manual for docker wait
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: fe9be95dec
Component: cli
2017-06-02 00:10:44 +00:00
cdc8c82fea Update reference docs for service ps
commit bbd2018ee19eff5594ae3986bf56fbcd0044699d
changed the output format of `docker service ps`.

this patch updates the reference docs
to match the updated output format.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: baea245377
Component: cli
2017-06-02 00:10:44 +00:00
668d35e913 Fix the incorrect option name
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 4df2866d4e
Component: cli
2017-06-02 00:10:44 +00:00
9f81289a72 stack_config.md not exist and delete it
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: d408f74d07
Component: cli
2017-06-02 00:10:44 +00:00
6c42c738d3 deprecate "top-level" network information in NetworkSettings
When inspecting a container, `NetworkSettings` contains top-level
information about the default ("bridge") network;

`EndpointID`, `Gateway`, `GlobalIPv6Address`, `GlobalIPv6PrefixLen`,
`IPAddress`, `IPPrefixLen`, `IPv6Gateway`, and `MacAddress`.

These properties are deprecated in favor of per-network properties in
`NetworkSettings.Networks`. These properties were already "deprecated" in
docker 1.9, but kept around for backward compatibility.

Refer to [#17538](https://github.com/docker/docker/pull/17538) for further
information.

This officially deprecates these properties, and marks them
for removal in 1.16

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 96d5009f10
Component: cli
2017-06-02 00:10:44 +00:00
a8153231ae Update the option 'network' for docker build
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 378a9d816b
Component: cli
2017-06-02 00:10:44 +00:00
bd7f8f8f9e remove old media type compat for plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 5bfa17e58b
Component: cli
2017-06-02 00:10:44 +00:00
5f243da8df fix some broken contents links
Signed-off-by: Qinglan Peng <qinglanpeng@zju.edu.cn>

fix-contents-links

Signed-off-by: Qinglan Peng <qinglanpeng@zju.edu.cn>
Upstream-commit: 2d40fc55b8
Component: cli
2017-06-02 00:10:44 +00:00
09cfe3454c docs: fix description of docker swarm update --help
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
Upstream-commit: 967a6bf70d
Component: cli
2017-06-02 00:10:44 +00:00
9012475dbc docs: fix description of docker swarm join --help
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
Upstream-commit: b81f7aba37
Component: cli
2017-06-02 00:10:44 +00:00
f865a2ecbe replace env description with args in extend config
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 2373288938
Component: cli
2017-06-02 00:10:44 +00:00
ecdd598b2a Add bash completion for docker inspect --type plugin
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0c3697d499
Component: cli
2017-06-02 00:10:43 +00:00
1ac48acf56 Add zsh completion for 'docker inspect --type=plugin' and other missing ones
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f25ad6e8b7
Component: cli
2017-06-02 00:10:43 +00:00
47e77de42d plugins: container-rootfs-relative paths
Legacy plugins expect host-relative paths (such as for Volume.Mount).
However, a containerized plugin cannot respond with a host-relative
path. Therefore, this commit modifies new volume plugins' paths in Mount
and List to prepend the container's rootfs path.

This introduces a new PropagatedMount field in the Plugin Config.
When it is set for volume plugins, RootfsPropagation is set to rshared
and the path specified by PropagatedMount is bind-mounted with rshared
prior to launching the container. This is so that the daemon code can
access the paths returned by the plugin from the host mount namespace.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5a84f77819
Component: cli
2017-06-02 00:10:43 +00:00
6f86448579 fix some version information
Signed-off-by: Qinglan Peng <qinglanpeng@zju.edu.cn>
Upstream-commit: 1ca2bb4e0b
Component: cli
2017-06-02 00:10:43 +00:00
857189b456 Add credential helper documentation
Signed-off-by: Jake Sanders <jsand@google.com>
Upstream-commit: 5ee07f7a96
Component: cli
2017-06-02 00:10:43 +00:00
c7e1b80d2b add SCOPE field content for docker network ls
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 6cc17b6549
Component: cli
2017-06-02 00:10:43 +00:00
6d94bbc890 Add zsh completion for 'docker network create --attachable'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b94c1ab634
Component: cli
2017-06-02 00:10:43 +00:00
f87af12250 Add bash completion for docker network create --attachable
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d77a7ca0c1
Component: cli
2017-06-02 00:10:43 +00:00
23d5be4a21 Fix bash completion for `docker service create|update
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b6365dc413
Component: cli
2017-06-02 00:10:43 +00:00
acf1bf74f9 Add bash completion for secret management
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6afaa9c01f
Component: cli
2017-06-02 00:10:43 +00:00
a857a44bbf Add bash completion for docker version --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 45a292bc44
Component: cli
2017-06-02 00:10:43 +00:00
3beb7410fd Fix a spelling mistake in the docs.
Signed-off-by: Chris Gavin <chris@chrisgavin.me>
Upstream-commit: 0a75b0264f
Component: cli
2017-06-02 00:10:43 +00:00
1573881706 Add ID field for docker plugin ls
This fix tries to address the enhancement proposed in 28708 to display
ID field for the output of `docker plugin ls`.

This fix add `ID` field to the output of `docker plugin ls`

Related docs has been updated.

This fix fixes 28708.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 21b9ce971e
Component: cli
2017-06-02 00:10:43 +00:00
a5a4a6d8b1 Allow docker plugin inspect to search based on ID or name
This fix tries to address the issue raised in discussion of
PR 28735 where it was not possible to manage plugin based on
plugin ID. Previously it was not possible to invoke
`docker plugin inspect` with a plugin ID (or ID prefix).

This fix updates the implementation of `docker plugin inspect`
so that it is possbile to search based on a plugin name, or a
plugin ID. A short format of plugin ID (prefix) is also possible,
as long as there is no ambiguity.

Previously the check of `docker plugin inspect` was mostly done
on the client side. This could potentially cause inconsistency
between API and CMD. This fix move all the checks to daemon side
so that API and CMD will be consistent.

An integration test has been added to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5d6468af96
Component: cli
2017-06-02 00:10:43 +00:00
e316264926 Add bash completion for experimental docker deploy
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5b7c564969
Component: cli
2017-06-02 00:10:43 +00:00
0cb48c811d Allow selective activation of experimental features in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e0659770b3
Component: cli
2017-06-02 00:10:43 +00:00
7cef2520f3 rectify several wrong URLs in branch of man
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: ae2c5f63e5
Component: cli
2017-06-02 00:10:43 +00:00
f0cf23a7f8 Fix the inconsistency for docker secret
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 021d177ed1
Component: cli
2017-06-02 00:10:43 +00:00
fd4925ee0d Add more types to bash completion of docker inspect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c310a10969
Component: cli
2017-06-02 00:10:42 +00:00
bf80e1d186 modify some urls related to reference path
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: bfa5aeec42
Component: cli
2017-06-02 00:10:42 +00:00
a467c69c26 Revert "Add bash completion for docker service ps --all"
This reverts commit 188d2fac57d63888f08531adc46aa3349e3b4f3a.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c7fe3a1685
Component: cli
2017-06-02 00:10:42 +00:00
f8a989f686 Revert "Add -a option to service/node ps"
This reverts commit 139fff2bf0ebe12b61871ba8ec8be8d51c2338db.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5ee218987d
Component: cli
2017-06-02 00:10:42 +00:00
f60e8dbe1d cli: remove --mount from docker run
This commit reverts 273eeb813c1db0f42c2ad5e053972eeb00907568 (#26825).
For the discussion so far, please refer to #28527.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: a5053dce24
Component: cli
2017-06-02 00:10:42 +00:00
cc1ac47c15 Add zsh completion for 'docker stack' subcommand
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 0bdfdf3779
Component: cli
2017-06-02 00:10:42 +00:00
95d254a316 Add bash completion for docker stack
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bc1a16b866
Component: cli
2017-06-02 00:10:42 +00:00
6762d081eb Give the correct location for plugin documentation
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: ca700dfb33
Component: cli
2017-06-02 00:10:42 +00:00
58d2d0498d Windows: Note about volumes in run
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 64a17b65c3
Component: cli
2017-06-02 00:10:42 +00:00
9bc2b4dd44 Fix some format errors
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: e248501799
Component: cli
2017-06-02 00:10:42 +00:00
ecf6047eb5 Modify the link for config.json
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 4abd9ea9a9
Component: cli
2017-06-02 00:10:42 +00:00
eb04210a4f Document publishing a UDP port
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 4f414e56d4
Component: cli
2017-06-02 00:10:42 +00:00
9d6e16b26b update plugin example
Signed-off-by: Victor Vieux <victorvieux@gmail.com>

cleanup whitespace formatting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b82e761088
Component: cli
2017-06-02 00:10:42 +00:00
2aa00fd89f Added and example of using --format with docker images
Docker-DCO-1.1-Signed-off-by: William Henry <whenry@redhat.com> (github: ipbabble)

Signed-off-by: William Henry <whenry@redhat.com>
Upstream-commit: 9fa1e6637b
Component: cli
2017-06-02 00:10:42 +00:00
94ebef2849 Fix instances of doubled words
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: d2ff281196
Component: cli
2017-06-02 00:10:42 +00:00
b3d421b217 Fix copypaste error 'is-automated'
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 4c71c95e34
Component: cli
2017-06-02 00:10:42 +00:00
7b298b591a Fix some redirect loops and problems
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: d5b3df0c2f
Component: cli
2017-06-02 00:10:42 +00:00
e9d0b48318 Add bash completion for plugin API
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 174194cbe3
Component: cli
2017-06-02 00:10:42 +00:00
0fb89a4b6a Modify reponame to PLUGIN and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: f93df409b4
Component: cli
2017-06-02 00:10:41 +00:00
78fa1e6bc3 Remove docker stack config commandline reference doc
`docker stack config` command does not exists anymore, removing it
from the command reference documentation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 30f5338c8e
Component: cli
2017-06-02 00:10:41 +00:00
676c6b6639 Add aliases and options to docker stack ls docs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7e37dd4329
Component: cli
2017-06-02 00:10:41 +00:00
211a0054ef fix more according to the actual output of 'docker swarm init --help'
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
Upstream-commit: bd6d56c796
Component: cli
2017-06-02 00:10:41 +00:00
957972b662 fix description of 'docker swarm init'
Signed-off-by: Kei Ohmura <ohmura.kei@gmail.com>
Upstream-commit: 2e2b706917
Component: cli
2017-06-02 00:10:41 +00:00
fe9a20e2a3 Fix a description of 'docker run [-a]'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 43a8f3b028
Component: cli
2017-06-02 00:10:41 +00:00
e09e4782f0 Add bash completion for docker service {create,update} host options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 78bada43a2
Component: cli
2017-06-02 00:10:41 +00:00
3fe6f140a8 modify invalid url in plugins_network.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: be6e3311f2
Component: cli
2017-06-02 00:10:41 +00:00
4cd5f70633 support src in --secret
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 8628703ce6
Component: cli
2017-06-02 00:10:41 +00:00
e95c1665fd fix the mistake of present
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 4b2c41c1b8
Component: cli
2017-06-02 00:10:41 +00:00
9638064966 Add zsh completion for 'docker service update --hostname'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 2d48b3f9ac
Component: cli
2017-06-02 00:10:41 +00:00
e26a9844a0 Add a short flag for docker stack deploy
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c41fa83e4d
Component: cli
2017-06-02 00:10:41 +00:00
c48c65a097 Add bash completion for docker service update --hostname
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 12858eb8d4
Component: cli
2017-06-02 00:10:41 +00:00
6b8c97466e Allow hostname to be updated on service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f31ed0b125
Component: cli
2017-06-02 00:10:41 +00:00
29ae5e081e Fix some syntax error
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 4b3c9059a9
Component: cli
2017-06-02 00:10:41 +00:00
acac183c62 Update docs of docker network ls --filter
Currently the help output of `docker network ls --filter` is:
```
Options:
  -f, --filter value   Provide filter values (i.e. 'dangling=true') (default [])
  ...
```
This caused confusion as only the following filters are supported at the moment:
 - `driver`
 - `type`
 - `name`
 - `id`
 - `label`

This fix update the help output of `docker network ls --filter` and `network_ls.md`.
The `dangling=true` description has been replace to:
```
Options:
  -f, --filter filter   Provide filter values (i.e. 'driver=bridge')
  ...
```

This fix fixes 28786.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 405fe721cc
Component: cli
2017-06-02 00:10:41 +00:00
4a1fdf9cf7 Add options for docker plugin enable and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: eff40eda38
Component: cli
2017-06-02 00:10:40 +00:00
430522a380 28600: Docs: network connect for container in Created/Stopped state
Signed-off-by: dattatrayakumbhar04 <dattatraya.kumbhar@gslab.com>
Upstream-commit: 1f2128a8c5
Component: cli
2017-06-02 00:10:40 +00:00
0788178552 Fixes typo 'bin-mounts'
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 22478663c2
Component: cli
2017-06-02 00:10:40 +00:00
b37d8d1de7 update secret command
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: afe0b2988c
Component: cli
2017-06-02 00:10:40 +00:00
ca2113e23f Update docker info cli reference documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0202ece8e1
Component: cli
2017-06-02 00:10:40 +00:00
3c062149b3 Update plugin enable cli reference documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7792b0d382
Component: cli
2017-06-02 00:10:40 +00:00
3d9b37f417 Move docker stack docs out of experimental
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d16010d737
Component: cli
2017-06-02 00:10:40 +00:00
9ebeff0e6c Update docs to reflect no longer displaying secret digest or size.
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 50674ba5f6
Component: cli
2017-06-02 00:10:40 +00:00
faac82a415 plugins: misc fixes
Rename variable to reflect manifest -> config renaming
Populate Description fields when computing privileges.
Refactor/reuse code from daemon/oci_linux.go

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b70edf410d
Component: cli
2017-06-02 00:10:40 +00:00
8fdb1bb909 Add concurrent uploads/downloads section
Document and link to the concurrent uploads/downloads daemon option.

Signed-off-by: Jacob Tomlinson <jacob@tom.linson.uk>
Upstream-commit: ddf22952a0
Component: cli
2017-06-02 00:10:40 +00:00
74de856edc Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 2cfcc8a8fa
Component: cli
2017-06-02 00:10:40 +00:00
aa5b82f8c4 add note that windows does not support managed plugins
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e0ce0361ba
Component: cli
2017-06-02 00:10:40 +00:00
71bca31df5 Fix typo in docs (Copmose)
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6b8588ab94
Component: cli
2017-06-02 00:10:40 +00:00
6b535bc2c3 Add zsh completion for 'docker image ls --filter reference'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f3c9cdadd3
Component: cli
2017-06-02 00:10:40 +00:00
e520b24e1f Add zsh completion for 'dockerd --userland-proxy-path'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b47e3d3adf
Component: cli
2017-06-02 00:10:40 +00:00
5751a326a2 Add bash completion for docker build --network
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5b6fdb11a8
Component: cli
2017-06-02 00:10:40 +00:00
e6484ce0e7 Add bash completion for docker images --filter reference
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: cb0862f411
Component: cli
2017-06-02 00:10:40 +00:00
db80752229 Add documentation about templating support on…
… services creation/update.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 594b69d1ff
Component: cli
2017-06-02 00:10:40 +00:00
2f98c46572 Update service ps reference for "--no-trunc"
The "--no-trunc" option toggles between showing/hiding
digests.

This updates the reference to show this difference.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3e4a6ba39b
Component: cli
2017-06-02 00:10:39 +00:00
03051a233c cli: Add valid suffixes for remaining duration options
A recent PR added `(ns|us|ms|s|m|h)` to the descriptions of some
duration options, but not all. Add it to the remaining options for
consistency.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 53ef5c34c0
Component: cli
2017-06-02 00:10:39 +00:00
c35b88c72e Update deprecation notes about v1 registry
Adds section about the hub deprecating the v1 protocol.
Adds note about intent to disable by default and remove support.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 672d8cf4e9
Component: cli
2017-06-02 00:10:39 +00:00
0d57e2c399 Update cli reference for docker {,stack} deploy
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 17398ca0c3
Component: cli
2017-06-02 00:10:39 +00:00
e2ee18f556 Add bash completion for dockerd --userland-proxy-path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d1071533a6
Component: cli
2017-06-02 00:10:39 +00:00
6464ebb77a Clarify that ipmasq rules are not added when iptables is false
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: d6d3f5144c
Component: cli
2017-06-02 00:10:39 +00:00
0dcf74fa3b fix typo
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1ce4af2038
Component: cli
2017-06-02 00:10:39 +00:00
7456ec0c6e Change the docker-tag usage text to be clearer
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: c4776804f4
Component: cli
2017-06-02 00:10:39 +00:00
ff493cde21 Update images cli reference with reference filter
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f28c79766c
Component: cli
2017-06-02 00:10:39 +00:00
c8586e1312 Edits to plugin docs after building authz plugin
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 6393eac011
Component: cli
2017-06-02 00:10:39 +00:00
ee6097675a Update stats cli reference documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d22558eb16
Component: cli
2017-06-02 00:10:39 +00:00
481c891999 Update docs for docker info for most recent changes.
This fix updates docs for `docker info` for most recent changes.
It also made several chagnes:
1. Replace 0.12.0-dev to 0.13.0 for api docs v1.24.
2. Replace 0.13.0-dev to 0.13.0 for api docs v1.25

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 241694402f
Component: cli
2017-06-02 00:10:39 +00:00
aae06b66cd Add zsh completion for 'docker system df'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b1948be830
Component: cli
2017-06-02 00:10:39 +00:00
29bd09e6d2 Revert reference docs for ambient capabilities
This feature was reverted for docker 1.13
in c5251f7116e3d9095a7169fc31bd170dff997c2e,
so removing the documentation as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f2573a87ed
Component: cli
2017-06-02 00:10:39 +00:00
c7b13334f3 man/docker: wrap lines consistently
Quite a few changes, as it seems like previous wrapping was done
manually, so it's all over the place.

As noted in #28424

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
Upstream-commit: 87b3ad76c9
Component: cli
2017-06-02 00:10:39 +00:00
26ee03e8d4 Modify serial number and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 0524cec07b
Component: cli
2017-06-02 00:10:39 +00:00
3076995a97 Remove inexistent link and add related links
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: d3cc65298a
Component: cli
2017-06-02 00:10:39 +00:00
c35d629328 Planned 1.13 deprecation: email from login
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1256e6743b
Component: cli
2017-06-02 00:10:39 +00:00
9d670c8fad Updated daemon documentation to clarify that live-restore is not suppoted on windows
Review comment implementation

Signed-off-by: bbayani <bhumikabayani@gmail.com>
Upstream-commit: 00f00e726e
Component: cli
2017-06-02 00:10:38 +00:00
06dc99005c man page: consistent indents for flag descriptions
Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
Upstream-commit: 0ceda7965d
Component: cli
2017-06-02 00:10:38 +00:00
b945d55997 fix the wrong title with docker swarm
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 4e56bb4f48
Component: cli
2017-06-02 00:10:38 +00:00
f3c30dce8d Add zsh completion for 'docker image build --network'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4225bbc8b1
Component: cli
2017-06-02 00:10:38 +00:00
ac3c599a1a Add docs for plugin push
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 8a7b4d591a
Component: cli
2017-06-02 00:10:38 +00:00
4ef0d45d74 Remove duplicated document
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 75aeaad241
Component: cli
2017-06-02 00:10:38 +00:00
c80f1d61bd Add zsh completion for 'docker service' DNS settings
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 937c0e3fb6
Component: cli
2017-06-02 00:10:38 +00:00
17e2c4ef4a Add zsh completion for 'docker service {create,update} --secret'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: d9de308caa
Component: cli
2017-06-02 00:10:38 +00:00
fbcac7bead Add bash completion for managing ports in services
Bash completion for

- `docker service create --port`
- `docker service update --port-{add,rm}`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c9afee3afa
Component: cli
2017-06-02 00:10:38 +00:00
89fa0b58ba Add zsh completion for the new 'docker secret' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 0f6fa225d1
Component: cli
2017-06-02 00:10:38 +00:00
8d1de69765 Update bash completion dns-options-add/rm -> dns-option-add/rm
In 28186, `dns-options-add/rm` has been changed to `dns-option-add/rm`
in `docker service create/update`, for the purpose of consistency.

This fix updates bash completion to remove extra `s`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 653c6d8467
Component: cli
2017-06-02 00:10:38 +00:00
431f9773df Fix a small typo in docs/deprecated.md
A small typo in `docs/deprecated.md`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a4abb8d39f
Component: cli
2017-06-02 00:10:38 +00:00
c0d69c15cb Add bash completion for DNS settings in services
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5e47e48ff8
Component: cli
2017-06-02 00:10:38 +00:00
76b7581484 Add bash completion for docker service ps --all
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fc7c7b1358
Component: cli
2017-06-02 00:10:38 +00:00
1a05c79390 Add zsh completion for 'docker service {create --port, update --port-{add,rm}}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4b3dd70b54
Component: cli
2017-06-02 00:10:38 +00:00
1cc3e47b3d Add zsh completion for 'docker image build --cache-from'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: fd70b3c283
Component: cli
2017-06-02 00:10:38 +00:00
501f6061eb Add bash completion for docker build --cache-from
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7c22a4d86c
Component: cli
2017-06-02 00:10:38 +00:00
a3738ca83f Fix bash completion for docker ps --filter is-task
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5890dd64eb
Component: cli
2017-06-02 00:10:37 +00:00
5116256089 Add bash completion for docker daemon --seccomp-profile
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7fd207836d
Component: cli
2017-06-02 00:10:37 +00:00
53560b46da Add reference filter and deprecated filter param…
… for `docker images`.

This deprecates the `filter` param for the `/images` endpoint and make a
new filter called `reference` to replace it. It does change the CLI
side (still possible to do `docker images busybox:musl`) but changes the
cli code to use the filter instead (so that `docker images --filter
busybox:musl` and `docker images busybox:musl` act the same).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e17ee80404
Component: cli
2017-06-02 00:10:37 +00:00
a7e49d8d7b Update docs/deprecated.md for 1.13
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: b70107a951
Component: cli
2017-06-02 00:10:37 +00:00
3d516f9c2e Add --with-registry-auth for stack deploy
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 13fe886540
Component: cli
2017-06-02 00:10:37 +00:00
e121aaca83 Remove redundant parameter and fix typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 0b24403d99
Component: cli
2017-06-02 00:10:37 +00:00
914e0a35ac move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 410d4ce7ae
Component: cli
2017-06-02 00:10:37 +00:00
aacf361c84 Add flag --host to service create and --host-add/--host-rm to service update
This fix tries to address 27902 by adding a flag `--host`
to `docker service create` and `--host-add/--host-rm` to
`docker service update`, so that it is possible to
specify extra `host:ip` settings in `/etc/hosts`.

This fix adds `Hosts` in swarmkit's `ContainerSpec` so that it
is possible to specify extra hosts during service creation.

Related docs has been updated.

An integration test has been added.

This fix fixes 27902.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9cda7c331e
Component: cli
2017-06-02 00:10:37 +00:00
292484cb57 service logs reference documentation
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 2d85970a8c
Component: cli
2017-06-02 00:10:37 +00:00
547c076109 cli: Change autolock flag description
This change incorporates feedback from @thaJeztah in the PR that added
the autolock flag. It changes the descriptions to be different for
"swarm init" and "swarm update" so that the boolean nature so that the
purpose of the flag in both contexts is clearer.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0e93a16289
Component: cli
2017-06-02 00:10:37 +00:00
4bade530ac change node ls and service ls api and docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c6ea37860f
Component: cli
2017-06-02 00:10:37 +00:00
5116612e8a update swagger and docs
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 8342baa829
Component: cli
2017-06-02 00:10:37 +00:00
0480a7a148 Add zsh completion for 'docker {node rm,swarm leave} -f'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 63545ecf95
Component: cli
2017-06-02 00:10:37 +00:00
be3bff6967 Add zsh completion for 'docker daemon --seccomp-profile'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 071348d392
Component: cli
2017-06-02 00:10:37 +00:00
1a5e1fa61d Add zsh completion for 'docker service {create,update} --tty'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: e3f47c4a55
Component: cli
2017-06-02 00:10:37 +00:00
1a51c21e82 Add zsh completion for 'docker service create --hostname'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 6073e433cd
Component: cli
2017-06-02 00:10:37 +00:00
37a618fa53 Add zsh completion for 'docker {run,create} --cpus'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 09cb462754
Component: cli
2017-06-02 00:10:37 +00:00
707a0677d1 Add zsh completion for new prune commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f2e2ba5d43
Component: cli
2017-06-02 00:10:36 +00:00
42b0828b16 Add zsh completion for 'docker system' subcommands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 9af599ffc5
Component: cli
2017-06-02 00:10:36 +00:00
2b025b2eb9 rename plugin manifest
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: fdfcbe778a
Component: cli
2017-06-02 00:10:36 +00:00
890a070951 Add --dns-option to docker run and hide --dns-opt
This fix is a follow up to #27567 based on:
https://github.com/docker/docker/pull/27567#issuecomment-259295055

In #27567, `--dns-options` has been added to `service create/update`,
together with `--dns` and `--dns-search`. The `--dns-opt` was used
in `docker run`.

This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide
`--dns-opt`. It is still possible to use `--dns-opt` with
`docker run/create`, though it will not show up in help output.

This fix change `--dns-options`to --dns-option` for `docker service create`
and `docker service update`.

This fix also updates the docs and bash/zsh completion scripts.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ebacbb50ae
Component: cli
2017-06-02 00:10:36 +00:00
9cadd92dfa update network ls docs to add SCOPE
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: bf622eddc1
Component: cli
2017-06-02 00:10:36 +00:00
0b30168718 opts/mount: add tmpfs-specific options
added following options:

 * tmpfs-size
 * tmpfs-mode

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: ad1fe309ec
Component: cli
2017-06-02 00:10:36 +00:00
94a025b367 Add plugin create functionality.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: c55cadb8ce
Component: cli
2017-06-02 00:10:36 +00:00
1ce351cb56 Document autolock/unlock/unlock-key
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d9b0fa75c1
Component: cli
2017-06-02 00:10:36 +00:00
c29abad86f Show peer nodes in network inspect for swarm overlay networks
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: 44cf733827
Component: cli
2017-06-02 00:10:36 +00:00
58a839ab9c Add bash completion for docker {node rm,swarm leave} -f
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e64c21b045
Component: cli
2017-06-02 00:10:36 +00:00
cf013fa7bb support labels for secrets upon creation; review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 6231e4899c
Component: cli
2017-06-02 00:10:36 +00:00
d328fe3c72 secrets: support simple syntax --secret foo
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: a5875e1a56
Component: cli
2017-06-02 00:10:36 +00:00
f1e73fbc24 secrets: use explicit format when using secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 32a96e4fa4
Component: cli
2017-06-02 00:10:36 +00:00
a5adcda0d8 doc review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: f0026b6e12
Component: cli
2017-06-02 00:10:36 +00:00
3dcc71e152 docs: update cli reference for secret usage
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

docs: minor update to service create usage

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 2161bbf176
Component: cli
2017-06-02 00:10:36 +00:00
dc89d7cac6 add short flag for force
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9c9e10b0ca
Component: cli
2017-06-02 00:10:36 +00:00
dc9be3e076 Remove -ptr from the help output of service create
This fix is based on the comment:
https://github.com/docker/docker/pull/28147#discussion_r86996347

Previously the output string of the `DurationOpt` is `duration-ptr`
and `Uint64Opt` is `uint64-ptr`. While it is clear to developers,
for a normal user `-ptr` might not be very informative.

On the other hand, the default value of `DurationOpt` and `Uint64Opt`
has already been quite informative: `none`. That means if no flag
provided, the value will be treated as none.
(like a ptr with nil as the default)

For that reason this fix removes the `-ptr`.

Also, the output in the docs of `service create` has been quite
out-of-sync with the true output. So this fix updates the docs
to have the most up-to-date help output of `service create --help`.

This fix is related to #28147.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ac4b6e3505
Component: cli
2017-06-02 00:10:36 +00:00
6578b20782 Deprecate API calls without a version
See #21157 for more details.

In a future version of Docker, providing a version to API calls
will be mandatory. An implementation of this is in #27801.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: fc50bad3c2
Component: cli
2017-06-02 00:10:35 +00:00
5889dbe02c Cleanup after moving all zsh completion logics for the new image command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: cd0ef2a337
Component: cli
2017-06-02 00:10:35 +00:00
ac2f7aaada Move zsh completion logic to new subcommand: tag
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: e3711a11f2
Component: cli
2017-06-02 00:10:35 +00:00
88eb1278b1 Move zsh completion logic to new subcommand: save
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: a3e4ac1d2f
Component: cli
2017-06-02 00:10:35 +00:00
54c083f642 Move zsh completion logic to new subcommand: rm
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f812608ff4
Component: cli
2017-06-02 00:10:35 +00:00
40b0478089 Move zsh completion logic to new subcommand: push
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 82dfd60819
Component: cli
2017-06-02 00:10:35 +00:00
d748664847 Move zsh completion logic to new subcommand: pull
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: e3d224e520
Component: cli
2017-06-02 00:10:35 +00:00
218491349e Move zsh completion logic to new subcommand: ls
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 47364fcb71
Component: cli
2017-06-02 00:10:35 +00:00
85ecb9d40c Move zsh completion logic to new subcommand: load
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: e21d331b1e
Component: cli
2017-06-02 00:10:35 +00:00
4d6fb4330b Add zsh completion logic to new subcommand: inspect
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 8fa658335b
Component: cli
2017-06-02 00:10:35 +00:00
3ddf6bee0b Move zsh completion logic to new subcommand: import
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f8829f20b4
Component: cli
2017-06-02 00:10:35 +00:00
aac306431a Move zsh completion logic to new subcommand: history
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4d4d5b199e
Component: cli
2017-06-02 00:10:35 +00:00
66bf8447c2 Move zsh completion logic to new subcommand: build
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 9d35c2f68b
Component: cli
2017-06-02 00:10:35 +00:00
5e3157da02 Add zsh completion for 'docker image' subcommands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: fafe5a16f3
Component: cli
2017-06-02 00:10:35 +00:00
6e578c3945 Rename zsh images & log complete functions
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: e8388b10d6
Component: cli
2017-06-02 00:10:35 +00:00
f57706bf47 Fixes #24083 : Improving cli help for flags with duration option
Signed-off-by: milindchawre <milindchawre@gmail.com>
Upstream-commit: 7d90a06417
Component: cli
2017-06-02 00:10:35 +00:00
479a12dfdf Fix the link for plugin documentation
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 0192ac0265
Component: cli
2017-06-02 00:10:35 +00:00
3cfa043d6e cli: Add options for Raft snapshotting
Add the following options to "swarm init" and "swarm update":

- --max-snapshots: Retain this many old Raft snapshots in addition
  to the latest one

- --snapshot-interval: Number of log entries between Raft snapshots

These options already existed in SwarmKit and the Docker API but were
never exposed in the CLI. I'm adding them here to fix this oversight.

--max-snapshots may be useful for debugging purposes and more
conservative users who want to store rolling backups of old versions of
the Raft state.

--snapshot-interval is most useful for performance tuning. The default
value of 10000 may not be ideal for some setups.

There is also a LogEntriesForSlowFollowers option that is not exposed. I
decided not to expose it along with these others because I don't think
it's generally useful (and I'm not sure what I would call the CLI flag).
But if people want, I can expose it for the sake of completeness.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 49b6be893c
Component: cli
2017-06-02 00:10:34 +00:00
0aeba134e4 Add custom DNS settings to service update
This fix adds `--dns-add`, `--dns-rm`, `--dns-opt-add`, `--dns-opt-rm`,
`--dns-search-add` and `--dns-search-rm` to `service update`.

An integration test and a unit test have been added to cover the changes in this fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6355071b17
Component: cli
2017-06-02 00:10:34 +00:00
cf388afdfa Add custom DNS settings to service definition
This fix tries to fix the issue raised in 24391 about allowing
custom DNS settings to service definition.

This fix adds `DNSConfig` (`Nameservers`, `Options`, `Search`) to
service definition, as well as `--dns`, `--dns-opt`, and `dns-search`
to `service create`.

An integration test has been added to cover the changes in this fix.

This fix fixes 24391.

A PR in swarmkit will be created separately.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 80fb5e93ee
Component: cli
2017-06-02 00:10:34 +00:00
f2bafbb576 support settings in docker plugins install
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: d1ed73508a
Component: cli
2017-06-02 00:10:34 +00:00
6336325257 Change to plural forms for help output of docker service update
This fix is based on the comment in
https://github.com/docker/docker/pull/27567#discussion_r86910604

Basically, in the help output of `docker service update`, the `--xxx-add`
flags typically have plural forms while `--xxx-rm` flags have singular
forms.

This fix updates the help output for consistency.

This fix also updates the related docs in `service_update.md`.
The help output in `service_update.md` has been quite out-of-sync
with the actual output so this fix replaces the output with the
most up-to-date output.

This fix is related to #27567.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e2f6503609
Component: cli
2017-06-02 00:10:34 +00:00
3d48ab983d support show numbers of global service in service ls command
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 5af84edf26
Component: cli
2017-06-02 00:10:34 +00:00
4fc12cf63a Update for docker checkpoint
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 010340e304
Component: cli
2017-06-02 00:10:34 +00:00
e0f3694584 Cleanup after moving all zsh completion logics for the new container command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 53846847ba
Component: cli
2017-06-02 00:10:34 +00:00
78af9de521 Move zsh completion logic to new subcommand: wait
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: dab4176180
Component: cli
2017-06-02 00:10:34 +00:00
0c6f9f1c31 Move zsh completion logic to new subcommand: update
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 643725b6a8
Component: cli
2017-06-02 00:10:34 +00:00
bb1dc27571 Move zsh completion logic to new subcommand: top
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: fe0cfed70c
Component: cli
2017-06-02 00:10:34 +00:00
16ec789afc Move zsh completion logic to new subcommand: stop
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 8361fc40e7
Component: cli
2017-06-02 00:10:34 +00:00
85365f2838 Move zsh completion logic to new subcommand: stats
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 5323c46677
Component: cli
2017-06-02 00:10:34 +00:00
45c78f761d Move zsh completion logic to new subcommand: start
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 2fd33da75f
Component: cli
2017-06-02 00:10:34 +00:00
c38610b30f Move zsh completion logic to new subcommand: run
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 15a2f1f74f
Component: cli
2017-06-02 00:10:34 +00:00
82abd6f24e Move zsh completion logic to new subcommand: rm
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4149666da1
Component: cli
2017-06-02 00:10:34 +00:00
d815c07020 Move zsh completion logic to new subcommand: restart
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b3b41803ed
Component: cli
2017-06-02 00:10:34 +00:00
a122f1ef7f Move zsh completion logic to new subcommand: rename
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 25fc254d3a
Component: cli
2017-06-02 00:10:34 +00:00
0b306848cf Move zsh completion logic to new subcommand: port
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 64ea2f57e8
Component: cli
2017-06-02 00:10:33 +00:00
9102df60de Move zsh completion logic to new subcommand: pause, unpause
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 67a2df2d80
Component: cli
2017-06-02 00:10:33 +00:00
008f90d90a Move zsh completion logic to new subcommand: ps
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f7dba85a99
Component: cli
2017-06-02 00:10:33 +00:00
4056fe032c Move zsh completion logic to new subcommand: logs
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: a01c52a1a6
Component: cli
2017-06-02 00:10:33 +00:00
afffeb8b0a Move zsh completion logic to new subcommand: kill
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: ca352f2941
Component: cli
2017-06-02 00:10:33 +00:00
78502c6241 Add zsh completion logic to new subcommand: inspect
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 61507603fb
Component: cli
2017-06-02 00:10:33 +00:00
a94b3ec3b7 Move zsh completion logic to new subcommand: export
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 13a60cfa38
Component: cli
2017-06-02 00:10:33 +00:00
94bb7c7521 Move zsh completion logic to new subcommand: exec
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f2cebb1b32
Component: cli
2017-06-02 00:10:33 +00:00
3be359b2bd Move zsh completion logic to new subcommand: diff
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 978fbdd9dc
Component: cli
2017-06-02 00:10:33 +00:00
4b72f461e9 Move zsh completion logic to new subcommand: create
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 6e850a9613
Component: cli
2017-06-02 00:10:33 +00:00
ce8ab479d9 Move zsh completion logic to new subcommand: cp
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 2d250dcaf1
Component: cli
2017-06-02 00:10:33 +00:00
1e64399cfe Move zsh completion logic to new subcommand: commit
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: aee4d2e078
Component: cli
2017-06-02 00:10:33 +00:00
2c7deb1a7f Move zsh completion logic to new subcommand: attach
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f80a33998f
Component: cli
2017-06-02 00:10:33 +00:00
d118aedb07 Add zsh completion for 'docker container' subcommands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: cfb9ce1683
Component: cli
2017-06-02 00:10:33 +00:00
656246aef3 Rename containers complete function in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b5721467b2
Component: cli
2017-06-02 00:10:33 +00:00
18a87897fc Add bash completion for docker service {create,update} --tty
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 308b0edef8
Component: cli
2017-06-02 00:10:33 +00:00
233e18f1ff Add --tty to docker service create/update
This fix tries to add `--tty` to `docker service create/update`. As was
specified in 25644, `TTY` flag has been added to SwarmKit and is
already vendored.

This fix add `--tty` to `docker service create/update`.

Related document has been updated.

Additional integration tests has been added.

This fix fixes 25644.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7443d74e2d
Component: cli
2017-06-02 00:10:33 +00:00
2fc68b8590 support env for docker plugin set
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 809dee7e20
Component: cli
2017-06-02 00:10:32 +00:00
acbe6a8c1a remove COMMAND column from service ls output. closes #27994
Signed-off-by: Alicia Lauerman <alicia@eta.im>
Upstream-commit: 5ad8af8fd1
Component: cli
2017-06-02 00:10:32 +00:00
f6db982a85 Add -a option to service/node ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: b7c6c84fdd
Component: cli
2017-06-02 00:10:32 +00:00
5b7fe391d6 Rectify Images display information for docker 1.10.3
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 55d4ce14dd
Component: cli
2017-06-02 00:10:32 +00:00
fba6b9ab39 Add bash completion for docker {run,create} --cpus
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1194369887
Component: cli
2017-06-02 00:10:32 +00:00
f4e29ea739 Add bash completion for docker system df
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fcf085a9f5
Component: cli
2017-06-02 00:10:32 +00:00
580a505e9b Add bash completion for new prune commands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8b4362795c
Component: cli
2017-06-02 00:10:32 +00:00
87033ac373 Fix bash completion for docker inspect --type
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2bf6e4c769
Component: cli
2017-06-02 00:10:32 +00:00
9ec26ffaf2 Update docs for the output of docker build (Step 1/...)
PR 24978 adds hint of of progress to the output of `docker build`
for 1.13, in the format of
```
Step 1/5 ...
...
Step 2/5 ...
...
```

Though some of the docs hasn't been updated.

This fix did a grep in docs and updated the related places.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4139784154
Component: cli
2017-06-02 00:10:32 +00:00
17f22ba07a Align arg with other cli
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: f5298c5f4d
Component: cli
2017-06-02 00:10:32 +00:00
190608ece5 Windows: Add cpu count option
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 09e1fc1540
Component: cli
2017-06-02 00:10:32 +00:00
829f4efead modify URL because installation directory removed
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 7b024c69ee
Component: cli
2017-06-02 00:10:32 +00:00
eed4179b98 Add bash completion for docker service create --hostname
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 857febc7d7
Component: cli
2017-06-02 00:10:32 +00:00
b1abdb7217 Add --cpus flag to control cpu resources
This fix tries to address the proposal raised in 27921 and add
`--cpus` flag for `docker run/create`.

Basically, `--cpus` will allow user to specify a number (possibly partial)
about how many CPUs the container will use. For example, on a 2-CPU system
`--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share.

This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay
have a concept of NanoCPUs for tasks. The `--cpus` flag will translate
the number into reused `NanoCPUs` to be consistent.

This fix adds integration tests to cover the changes.

Related docs (`docker run` and Remote APIs) have been updated.

This fix fixes 27921.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d93d09acaa
Component: cli
2017-06-02 00:10:32 +00:00
0ce8491828 daemon: add a flag to override the default seccomp profile
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 9ba2472a0b
Component: cli
2017-06-02 00:10:32 +00:00
7512a6b872 Adding the hostname option to docker service command
Signed-off-by: Nikolay Milovanov <nmil@itransformers.net>
Upstream-commit: ea6fc78b8f
Component: cli
2017-06-02 00:10:32 +00:00
8bc7f37f93 project: use vndr for vendoring
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: b823284d4a
Component: cli
2017-06-02 00:10:32 +00:00
35146fe359 fix frontmatter keywords value type (string, instead of []string) in /docs/reference
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 572c6bb89a
Component: cli
2017-06-02 00:10:31 +00:00
10117b8d2f fix frontmatter keywords value type (string, instead of []string)
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 4126b5526c
Component: cli
2017-06-02 00:10:31 +00:00
b2f1abe039 Add for String
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: af5af201fe
Component: cli
2017-06-02 00:10:31 +00:00
3f6d668bc0 added node ip autodetection
Manager now auto-detects the address that an agent connects to the cluster
from and stores it. This is useful for many kinds of internal cluster
management tools.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 194bb052dc
Component: cli
2017-06-02 00:10:31 +00:00
f4590ea5c1 cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 0e7bbb55c8
Component: cli
2017-06-02 00:10:31 +00:00
3295d6d471 Add stack service and fix typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: d74d024775
Component: cli
2017-06-02 00:10:31 +00:00
b388950c34 Redirect powershell completion
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8da2e039e5
Component: cli
2017-06-02 00:10:31 +00:00
df9a425166 add replicated in service scale command description
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ef09aafc3e
Component: cli
2017-06-02 00:10:31 +00:00
9304633193 fix frontmatter in reference md files
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 1814d5121e
Component: cli
2017-06-02 00:10:31 +00:00
94c993c344 node rm can be applied on not only active node
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6cf2234377
Component: cli
2017-06-02 00:10:31 +00:00
f6a9ceccb8 Add metrics docs to cli reference
Fixes #27843

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 94bc15016e
Component: cli
2017-06-02 00:10:31 +00:00
dca11896a7 Remove some redundant consts
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 8cb80e77d1
Component: cli
2017-06-02 00:10:31 +00:00
c34aa02124 Add StatsFormat to the config.json file
As for `ps`, `images`, `network ls` and `volume ls`, this makes it
possible to define a custom default format.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ec318edf12
Component: cli
2017-06-02 00:10:31 +00:00
1190a21029 Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e34679982f
Component: cli
2017-06-02 00:10:31 +00:00
a96b192800 Convert Unused ARG error to warning
Signed-off-by: Addam Hardy <addam.hardy@gmail.com>
Upstream-commit: 44edbbdbc2
Component: cli
2017-06-02 00:10:31 +00:00
0bed104764 Modify short and flags for docker inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 49a282eb1c
Component: cli
2017-06-02 00:10:31 +00:00
a371fe5fc4 Add zsh completion for 'docker ps --filter health='
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 33964db9d0
Component: cli
2017-06-02 00:10:31 +00:00
3d9f58ad1c Add bash completion for docker ps --filter health
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7cb11128f7
Component: cli
2017-06-02 00:10:31 +00:00
bb937f7f14 Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: a17a06204d
Component: cli
2017-06-02 00:10:30 +00:00
b3e2a4db99 Adds container health support to docker ps filter
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: dfcd777cbc
Component: cli
2017-06-02 00:10:30 +00:00
4f25fac5e6 Add "userns" to docker info security options output
If user namespaces is enabled on the daemon, reveal that via docker info
by adding "userns" to the list of security options reported by the
info endpoint.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: c6c5d28828
Component: cli
2017-06-02 00:10:30 +00:00
34fb473d99 Add --format to man and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: baed1a070e
Component: cli
2017-06-02 00:10:30 +00:00
86b85650ce Update docs for dockerd.md about max-concurrent-downloads/max-concurrent-uploads
It seems that `max-concurrent-downloads` and `max-concurrent-uploads`
are supported in Windows for `config.json`. Though that was not
mentioned in the docs for dockerd.md.

This fix adds the following to the example `config.json` file for Windows:
```
    "max-concurrent-downloads": 3,
    "max-concurrent-uploads": 5,
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7b22b129b9
Component: cli
2017-06-02 00:10:30 +00:00
ffc855c19c Complete docker-events man page with filter list…
… and examples.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 86c99be0c9
Component: cli
2017-06-02 00:10:30 +00:00
abd803a329 Windows: Clarify WORKDIR in docs
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 65bc3e9b3b
Component: cli
2017-06-02 00:10:30 +00:00
18c108f9d5 Service create --group param
--group-add was used for specifying groups for both service create
and service update. For create it was confusing since we don't have
an existing set of groups. Instead I added --group to create, and
moved --group-add to service update only, like --group-rm
This deals with issue 27646

Signed-off-by: Lily Guo <lily.guo@docker.com>

Update flag documentation

Specify that --group, --group-add and --groupd-rm refers to
supplementary user groups

Signed-off-by: Lily Guo <lily.guo@docker.com>

Fix docs for groups and update completion scripts

Signed-off-by: Lily Guo <lily.guo@docker.com>
Upstream-commit: 0e1a3f6bbb
Component: cli
2017-06-02 00:10:30 +00:00
08be90cdc7 fill all the rest invalid address because no related directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 9b109cd9a7
Component: cli
2017-06-02 00:10:30 +00:00
94054df6ff fill the complete address because of no userguide directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 2603a9c1dd
Component: cli
2017-06-02 00:10:30 +00:00
0a2fb5212e Add --health-* commands to service create and update
A HealthConfig entry was added to the ContainerSpec associated with the
service being created or updated.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
Upstream-commit: 836b1a7d0a
Component: cli
2017-06-02 00:10:30 +00:00
21e47eacef Update examples in builder.md
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5934d2a0ed
Component: cli
2017-06-02 00:10:30 +00:00
9c8343543e Add bash completion for docker export --output
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bf5201d2cf
Component: cli
2017-06-02 00:10:30 +00:00
df3d650642 Add support for multiple containers to bash completion for docker pause
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5b3976457c
Component: cli
2017-06-02 00:10:30 +00:00
dcd1a6737a Add bash completion for docker service create --env-file
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7e7a47405a
Component: cli
2017-06-02 00:10:30 +00:00
69778781aa Add zsh completion for 'docker service create --env-file'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: da7306052f
Component: cli
2017-06-02 00:10:30 +00:00
970c7ca454 Fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6af33ef099
Component: cli
2017-06-02 00:10:29 +00:00
bd38caee5f fixes #27643
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Upstream-commit: d398440f03
Component: cli
2017-06-02 00:10:29 +00:00
2fe48a04ec Remove --name flag from service update
The --name flag was inadvertently added to
docker service update, but is not supported,
as it has various side-effects (e.g., existing
tasks are not renamed).

This removes the flag from the service update
command.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6fbb9227cb
Component: cli
2017-06-02 00:10:29 +00:00
e0d2f4d65e Move bash completion logic to new subcommand: info
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bce3414931
Component: cli
2017-06-02 00:10:29 +00:00
a8e80d61a0 Move bash completion logic to new subcommand: events
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 95f885eb9b
Component: cli
2017-06-02 00:10:29 +00:00
1dca682bd2 Add bash completion for new docker system command family
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9e164dedaa
Component: cli
2017-06-02 00:10:29 +00:00
192d15ece1 Add --env-file flag to docker create service
This fix tries to address the issue in 24712 and add
`--env-file` file to `docker create service`.

Related documentation has been updated.

An additional integration has been added.

This fix fixes 24712.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5acd85c6e8
Component: cli
2017-06-02 00:10:29 +00:00
7fba500014 Move bash completion logic to new subcommand: tag
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 398d4706d3
Component: cli
2017-06-02 00:10:29 +00:00
80bf7faee3 Move bash completion logic to new subcommand: save
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 54bb65787c
Component: cli
2017-06-02 00:10:29 +00:00
b9eea14648 Move bash completion logic to new subcommand: rmi
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 52c1a7ed50
Component: cli
2017-06-02 00:10:29 +00:00
71cc67a754 Move bash completion logic to new subcommand: push
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 509d2cc9b6
Component: cli
2017-06-02 00:10:29 +00:00
2155ce0488 Move bash completion logic to new subcommand: pull
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3ed53e5641
Component: cli
2017-06-02 00:10:29 +00:00
5b59d25c67 Move bash completion logic to new subcommand: images
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ff05fa31d5
Component: cli
2017-06-02 00:10:29 +00:00
f47fa461ff Move bash completion logic to new subcommand: load
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: eeae0d4c53
Component: cli
2017-06-02 00:10:29 +00:00
0e73cdf7ff Delegate bash completion for docker {container,image} inspect to parameterized function
In #23614 `docker inspect` was semantically enhanced to inspect "everything".
Therefore moving its logic to `_docker_container_inspect` was not correct.

This commit moves it back to its original top-level location (`_docker_inspect`)
so that it can be called by `_docker_{container,image}_inspect` and others (will
be added in follow-up PRs).
Parameterization was added in order to get caller-specific behavior.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 918ff45c1a
Component: cli
2017-06-02 00:10:29 +00:00
ebf1521740 Move bash completion logic to new subcommand: import
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e8310f310d
Component: cli
2017-06-02 00:10:29 +00:00
1986761a5c Move bash completion logic to new subcommand: history
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 583bda0896
Component: cli
2017-06-02 00:10:29 +00:00
4cf7607d8d Move bash completion logic to new subcommand: build
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bd3939dddd
Component: cli
2017-06-02 00:10:28 +00:00
c84c2e463c Add bash completion for new docker image command family
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3ab25a8ccb
Component: cli
2017-06-02 00:10:28 +00:00
5ef6f17a9d Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
Upstream-commit: 42ef78911e
Component: cli
2017-06-02 00:10:28 +00:00
fec713dbd4 Add zsh completion for 'dockerd --experimental'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 85fb527cbf
Component: cli
2017-06-02 00:10:28 +00:00
a6e7161261 Typo --ti and missing my_strace_docker_image
Signed-off-by: Leo Gallucci <leo.gallucci@zalando.de>
Upstream-commit: 74e0f7857b
Component: cli
2017-06-02 00:10:28 +00:00
8004b9853e add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b4f6b6d970
Component: cli
2017-06-02 00:10:28 +00:00
5addbf284f add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 8f0be436cd
Component: cli
2017-06-02 00:10:28 +00:00
e9ac4c1692 Add zsh completion for 'dockerd --shutdown-timeout'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 350b1a3f38
Component: cli
2017-06-02 00:10:28 +00:00
a13751fa90 Add zsh completion for 'docker {create,run} --stop-timeout'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: fa8f0cd060
Component: cli
2017-06-02 00:10:28 +00:00
4b10ffabec Add bash completion for dockerd --experimental
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7414101f3c
Component: cli
2017-06-02 00:10:28 +00:00
4ccf8b5a72 Fix zsh completion for 'docker exec --env'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: add78ffc8a
Component: cli
2017-06-02 00:10:28 +00:00
32d2c358e9 update docs/reference/commandline/network_inspect.md
The following sentences (introduced in v1.11 via #21160) were misleading for Swarm mode services (>= v1.12)

  For networks backed by multi-host network driver, such as Overlay,
  this command also shows the container endpoints in other hosts in the
  cluster. These endpoints are represented as "ep-{endpoint-id}" in the output.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: a91e31b2df
Component: cli
2017-06-02 00:10:28 +00:00
5b01128cd3 Remove duplicate keys in labels of docker info
This fix tries to address the issue raised in 24392 where
labels with duplicate keys exist in `docker info`, which
contradicts with the specifications in the docs.

The reason for duplicate keys is that labels are stored as
slice of strings in the format of `A=B` (and the input/output).

This fix tries to address this issue by checking conflict
labels when daemon started, and remove duplicate labels (K-V).

The existing `/info` API has not been changed.

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

This fix fixes 24392.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7765e48aaa
Component: cli
2017-06-02 00:10:28 +00:00
7aea692b20 Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 47b507e48a
Component: cli
2017-06-02 00:10:28 +00:00
94ac28a2ac Fix the incorrect links in the document about network and service
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 4df7e0a9fa
Component: cli
2017-06-02 00:10:28 +00:00
9585717058 Update the subtitle for stack ps
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 78b56b5529
Component: cli
2017-06-02 00:10:28 +00:00
106df2cc9f Fix bash completion for docker exec --env
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 04b0779de4
Component: cli
2017-06-02 00:10:28 +00:00
1a07ed1f3c Add force option to service update
Currently, there's no way to restart the tasks of a service without
making an actual change to the service. This leads to us giving awkward
workarounds as in
https://github.com/docker/docker.github.io/pull/178/files, where we tell
people to scale a service up and down to restore balance, or make
unnecessary changes to trigger a restart.

This change adds a --force option to "docker service update", which
forces the service to be updated even if no changes require that.

Since rolling update parameters are respected, the user can use
"docker service --force" to do a rolling restart. For example, the
following is supported:

   docker service update --force --update-parallelism 2 \
   --update-delay 5s myservice

Since the default value of --update-parallelism is 1, the default
behavior is to restart the service one task at a time.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 78c0d50c9f
Component: cli
2017-06-02 00:10:27 +00:00
bdbf35292b Modify the links for docker container commands
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: f18c41ee83
Component: cli
2017-06-02 00:10:27 +00:00
e596bf8b11 Move bash completion logic to new subcommand: wait
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4f4c129973
Component: cli
2017-06-02 00:10:27 +00:00
8c7fd380c8 Move bash completion logic to new subcommand: update
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d2ef5775b8
Component: cli
2017-06-02 00:10:27 +00:00
d41679a6b8 Move bash completion logic to new subcommand: unpause
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b8d3d1e6ec
Component: cli
2017-06-02 00:10:27 +00:00
f8721d8330 Move bash completion logic to new subcommand: top
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 28cf2654e7
Component: cli
2017-06-02 00:10:27 +00:00
4eed057d60 Move bash completion logic to new subcommand: stop
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 620d0051c8
Component: cli
2017-06-02 00:10:27 +00:00
a6e576bd3f Move bash completion logic to new subcommand: stats
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 04886bca2f
Component: cli
2017-06-02 00:10:27 +00:00
4482a5552b Move bash completion logic to new subcommand: start
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f58b6746d7
Component: cli
2017-06-02 00:10:27 +00:00
ed642954ab Move bash completion logic to new subcommand: run
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 05656756e6
Component: cli
2017-06-02 00:10:27 +00:00
89b043e80e Move bash completion logic to new subcommand: rm
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 39880d7731
Component: cli
2017-06-02 00:10:27 +00:00
91e9997531 Move bash completion logic to new subcommand: restart
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2a9e70cf34
Component: cli
2017-06-02 00:10:27 +00:00
20eb486881 Move bash completion logic to new subcommand: port
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f533df0821
Component: cli
2017-06-02 00:10:27 +00:00
aa3a48c359 Move bash completion logic to new subcommand: port
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 120b57a61c
Component: cli
2017-06-02 00:10:27 +00:00
7f9ae43944 Move bash completion logic to new subcommand: pause
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b659865f57
Component: cli
2017-06-02 00:10:27 +00:00
9e5581fa01 Move bash completion logic to new subcommand: ps
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: adaa718195
Component: cli
2017-06-02 00:10:27 +00:00
09cd45cad5 Move bash completion logic to new subcommand: logs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bd996a11a1
Component: cli
2017-06-02 00:10:27 +00:00
d0a00b93a7 Move bash completion logic to new subcommand: kill
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 13fde2b8c5
Component: cli
2017-06-02 00:10:26 +00:00
6356dbb5b9 Move bash completion logic to new subcommand: inspect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c2c341f42b
Component: cli
2017-06-02 00:10:26 +00:00
f7455ef6f1 Move bash completion logic to new subcommand: diff
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4db49a11a5
Component: cli
2017-06-02 00:10:26 +00:00
f49daf60b9 Move bash completion logic to new subcommand: exec
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f560199333
Component: cli
2017-06-02 00:10:26 +00:00
473ca5a103 Move bash completion logic to new subcommand: diff
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: eac71844f4
Component: cli
2017-06-02 00:10:26 +00:00
bdbfcc0adf Move bash completion logic to new subcommand: create
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7db1e8272b
Component: cli
2017-06-02 00:10:26 +00:00
67d0c00baa Move bash completion logic to new subcommand: cp
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0ef51632ec
Component: cli
2017-06-02 00:10:26 +00:00
7a7ec39ca9 Move bash completion logic to new subcommand: commit
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e2678f21d9
Component: cli
2017-06-02 00:10:26 +00:00
708d76f1d0 Move bash completion logic to new subcommand: attach
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d5cdbdc734
Component: cli
2017-06-02 00:10:26 +00:00
68731cf24c Add bash completion for docker container
At this point, we just delegate to the existing completions.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f857f420aa
Component: cli
2017-06-02 00:10:26 +00:00
a1672539b7 fix wrong location for network related doc files
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 4865a342fb
Component: cli
2017-06-02 00:10:26 +00:00
92e2ca3e12 Add Networks placeholder to ps --format
Passing {{.Networks}} to the format parameter will prompt ps to
display all the networks the container is connected to.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: a7124389ed
Component: cli
2017-06-02 00:10:26 +00:00
e01ded192e Rewrites to Developing Plugins topic
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 7ec82562ce
Component: cli
2017-06-02 00:10:26 +00:00
118bce70c4 Sync docker/docker refs with files mistakenly edited in docker.github.io repo
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 7f36c3a1a0
Component: cli
2017-06-02 00:10:26 +00:00
64e77c0c09 support insecure registry in configuration reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9012efce15
Component: cli
2017-06-02 00:10:26 +00:00
846c79c56d Fix the typo of URLs
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Upstream-commit: c8da630897
Component: cli
2017-06-02 00:10:25 +00:00
6930ed3832 Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
Upstream-commit: 73dd34b2b3
Component: cli
2017-06-02 00:10:25 +00:00
8871de5591 zsh: fix completion when docker output only has the header line
Unfortunately, `(f)` aka `(ps:\n:)` flag will not create an array when
there is only one line. The subsequent use of indexes will then affect
the string. This leads to `docker rmi <tab>` to complete on the header
line instead of nothing.

Therefore, for each use of `(f)`, we ensure that we have an extra new
line to be sure we get an array.

Credit to @povesteam for the original report and fix in #27373.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 38d93769fe
Component: cli
2017-06-02 00:10:25 +00:00
1b7e1da302 Update the link for sharing images via repositories
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 77bcb1c514
Component: cli
2017-06-02 00:10:25 +00:00
3acdb23402 Improve comments in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ba501cf4fd
Component: cli
2017-06-02 00:10:25 +00:00
51255d6e1c Add bash completion for dockerd --shutdown-timeout
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a511da3c57
Component: cli
2017-06-02 00:10:25 +00:00
8eea5b67a0 Update the link for understand data volumes
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 62fb2cfa94
Component: cli
2017-06-02 00:10:25 +00:00
5b6fca1368 Add config parameter to change stop timeout during daemon shutdown
This fix tries to add a daemon config parameter `--shutdown-timeout`
that specifies the timeout value to stop containers gracefully
(before SIGKILL). The default value is 15s.

The `--shutdown-timeout` parameter is added to daemon options and
config file. It will also be updated during daemon reload.

Additional test cases have been added to cover the change.

This fix fixes #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ef158e3e0a
Component: cli
2017-06-02 00:10:25 +00:00
a3f6b0fa49 add creation timestamp to docker network inspect
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: fb789bd06d
Component: cli
2017-06-02 00:10:25 +00:00
a40b84b111 Align bash completion of plugins to completion of nodes and services
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 34630120b3
Component: cli
2017-06-02 00:10:25 +00:00
6565e2a727 Remove invalid installtion content because there is no corresponding files
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 2160c366b8
Component: cli
2017-06-02 00:10:25 +00:00
a7dd821405 Update sfp13/pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: cfdab875ce
Component: cli
2017-06-02 00:10:25 +00:00
8308c17bab Service update failure thresholds and rollback
This adds support for two enhancements to swarm service rolling updates:

- Failure thresholds: In Docker 1.12, a service update could be set up
  to either pause or continue after a single failure occurs. This adds
  an --update-max-failure-ratio flag that controls how many tasks need to
  fail to update for the update as a whole to be considered a failure. A
  counterpart flag, --update-monitor, controls how long to monitor each
  task for a failure after starting it during the update.

- Rollback flag: service update --rollback reverts the service to its
  previous version. If a service update encounters task failures, or
  fails to function properly for some other reason, the user can roll back
  the update.

SwarmKit also has the ability to roll back updates automatically after
hitting the failure thresholds, but we've decided not to expose this in
the Docker API/CLI for now, favoring a workflow where the decision to
roll back is always made by an admin. Depending on user feedback, we may
add a "rollback" option to --update-failure-action in the future.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 8c03c1201b
Component: cli
2017-06-02 00:10:25 +00:00
1e932b2921 Add bash completion for docker {run,create} --stop-timeout
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3ba4b59233
Component: cli
2017-06-02 00:10:25 +00:00
c05bdcf5ab Improve bash completion of containers
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9ef7847f74
Component: cli
2017-06-02 00:10:25 +00:00
44772e350e Align bash completion of networks to completion of nodes and services
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f1c1bbcbea
Component: cli
2017-06-02 00:10:25 +00:00
4c16ea6192 Align bash completion of volumes to completion of nodes and services
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 77a6840256
Component: cli
2017-06-02 00:10:25 +00:00
f907ec4ad7 Fix link for feature deprecation policy
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b684e781cb
Component: cli
2017-06-02 00:10:25 +00:00
ab67022e57 Fix code block fences and typo.
Signed-off-by: Ding Fei <dingfei@stars.org.cn>
Upstream-commit: a16bba06fd
Component: cli
2017-06-02 00:10:24 +00:00
125df45f6b Fix typos in docs/reference/builder.md.
Signed-off-by: Ding Fei <dingfei@stars.org.cn>
Upstream-commit: fb809d0511
Component: cli
2017-06-02 00:10:24 +00:00
443f283a14 Fix the link for sharing images via repositories
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: fbdf4c1ea3
Component: cli
2017-06-02 00:10:24 +00:00
b0afcf8e85 Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 659eab0574
Component: cli
2017-06-02 00:10:24 +00:00
c38ad08e0e wrap line in deleted containers when pruning
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: b7b97fdce6
Component: cli
2017-06-02 00:10:24 +00:00
bb63874e63 Add config parameter to change per-container stop timeout during daemon shutdown
This fix tries to add a flag `--stop-timeout` to specify the timeout value
(in seconds) for the container to stop before SIGKILL is issued. If stop timeout
is not specified then the default timeout (10s) is used.

Additional test cases have been added to cover the change.

This fix is related to #22471. Another pull request will add `--shutdown-timeout`
to daemon for #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4ff84a13da
Component: cli
2017-06-02 00:10:24 +00:00
089242961c Added logentries dependency to vendor
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Upstream-commit: 83c7808f3a
Component: cli
2017-06-02 00:10:24 +00:00
00298bdacd fix wrong output titile for docker volume ls
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: ba49f7bfe9
Component: cli
2017-06-02 00:10:24 +00:00
3d27940c0a Fix typo in build documentation
Signed-off-by: Luca Favatella <luca.favatella@erlang-solutions.com>
Upstream-commit: 29392a7472
Component: cli
2017-06-02 00:10:24 +00:00
02a57c23a2 overlay2: add support for --storage-opt size
Allow passing --storage-opt size=X to docker create/run commands
for the `overlay2` graphriver.

The size option is only available if the backing fs is xfs that is
mounted with the `pquota` mount option.
The user can pass any size less then the backing fs size.

Signed-off-by: Amir Goldstein <amir73il@aquasec.com>
Upstream-commit: 6190d02e62
Component: cli
2017-06-02 00:10:24 +00:00
8057cb1812 Remove Fedora 22 from RPM build as it is EOL
Fedora 22 reached end of life on July 19th, and
will no longer receive updates;

https://fedoramagazine.org/fedora-22-end-of-life-2016-july/

With the recent release of Fedora 24, Fedora 22 will officially enter End Of
Life (EOL) status on July 19th, 2016. After July 19th, all packages in the
Fedora 22 repositories will no longer receive security, bugfix, or enhancement
updates, and no new packages will be added to the Fedora 22 collection.

Upgrading to Fedora 23 or Fedora 24 before July 19th 2016 is highly recommended
for all users still running Fedora 22.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 833db8ffac
Component: cli
2017-06-02 00:10:24 +00:00
fbc93c2df5 Convert Markdown frontmatter to YAML
Some frontmatter such as the weights, menu stuff, etc is no longer used
'draft=true' becomes 'published: false'

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 2845676cc2
Component: cli
2017-06-02 00:10:24 +00:00
d3c4ed5409 Add a link to the new build instructions
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 12a3920153
Component: cli
2017-06-02 00:10:24 +00:00
9f04306fc3 Remove old documentation, add README.md with pointer
Signed-off-by: John Mulhausen <john@docker.com>
Upstream-commit: 68d252bc19
Component: cli
2017-06-02 00:10:22 +00:00
14ab319b53 add documentation for docker stack ps
also updates related stack docs and removes stack_tasks.md

Signed-off-by: Alicia Lauerman <allydevour@me.com>
Upstream-commit: f840df5a2b
Component: cli
2017-06-02 00:10:13 +00:00
668dab6911 Implement Pause Resume support for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: f7bfe86440
Component: cli
2017-06-02 00:10:13 +00:00
1a1000058a Deprecate repo:shortid syntax
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ae466f2405
Component: cli
2017-06-02 00:10:13 +00:00
e6199fb2cf allow restarting stopped containers by id
Signed-off-by: Wenzhi Liang <wenzhi.liang@gmail.com>
Upstream-commit: 9ad418fe97
Component: cli
2017-06-02 00:10:13 +00:00
66bfa1a740 Improve --log-level help text
This information was added in
1efc940e6f547760e5e8f4648acb120ff19fdc58,
but removed again in
a271eaeba224652e3a12af0287afbae6f82a9333
to make the help-output fit in a 80-chars
terminal.

This adds the available options again
in the help output, and updates the CLI
reference documentation to match actual
output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: db0cbdff04
Component: cli
2017-06-02 00:10:13 +00:00
9916ceda76 Add support for ambient capabilities
Linux kernel 4.3 and later supports "ambient capabilities" which are the
only way to pass capabilities to containers running as a non root uid.

Previously there was no way to allow containers not running as root
capabilities in a useful way.

Fix #8460

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 856a50e733
Component: cli
2017-06-02 00:10:13 +00:00
fe9abc4e81 Add the OPTIONS and Fix the links for contain prune
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: cfd1182bda
Component: cli
2017-06-02 00:10:12 +00:00
b42a712ccf Fix the incorrect links
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: da56054d1c
Component: cli
2017-06-02 00:10:12 +00:00
e0c5156248 Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 78cc1b2b6a
Component: cli
2017-06-02 00:10:12 +00:00
95af09cc49 daemon: add --userland-proxy-path flag
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e9cb71acbb
Component: cli
2017-06-02 00:10:12 +00:00
135616b0a5 Add zsh completion for 'dockerd --init-path'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 9014b21a61
Component: cli
2017-06-02 00:10:12 +00:00
1624d67c67 Add support for compressing build context during image build
When sending a build context to a remote server it may be
(significantly) advantageous to compress the build context. This commit
adds support for gz compression when constructing a build context
using a command like "docker build --compress ."

Signed-off-by: Paul Kehrer <paul.l.kehrer@gmail.com>
Upstream-commit: 9c85295b1c
Component: cli
2017-06-02 00:10:12 +00:00
57706c65b4 Update readme link to binary installation instructions
Signed-off-by: Laura Frank <ljfrank@gmail.com>
Upstream-commit: 454f365dfe
Component: cli
2017-06-02 00:10:12 +00:00
db2f2898df Add support for multiple nodes in bash completion for docker node ps
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 62e87d4996
Component: cli
2017-06-02 00:10:12 +00:00
5287c26318 Add bash completion for dockerd --init-path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3171c7b6e7
Component: cli
2017-06-02 00:10:12 +00:00
86244a53b9 Add documentation for container, volume, image and system prune subcommands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 4705d82098
Component: cli
2017-06-02 00:10:12 +00:00
6eecb8f649 Update docs for node filter of docker service ps
As is specified in 26964, it is possible to specify
a filter based on the node name or node ID.

This fix updates the related docs for that.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 82e697e5ec
Component: cli
2017-06-02 00:10:12 +00:00
23796877c1 Add a new "is-task" ps filter
This makes it easier to list containers that are part of a task
(swarm mode) and those who are not.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cd547751df
Component: cli
2017-06-02 00:10:12 +00:00
1062069cf3 Fix link to non-existent file
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 247a2f112b
Component: cli
2017-06-02 00:10:12 +00:00
8aed0c9e35 configure docker-init binary path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: c17012948e
Component: cli
2017-06-02 00:10:12 +00:00
de4bcf1050 Update docs for service ps
This fix updates docs for `service ps` as now the TASK ID part has been
removed.

Also, this fix fixes several incorrect sample output.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d0134a5f75
Component: cli
2017-06-02 00:10:12 +00:00
f5b7d83657 Fix incorrect aux-address examples and test
The (host)name for aux-addresses should
be unique, otherwise later values overwrite
earlier values.

Before this change, the example command
would send this API request;

    {
      "Attachable": false,
      "CheckDuplicate": true,
      "Driver": "overlay",
      "EnableIPv6": false,
      "IPAM": {
        "Config": [
          {
            "Gateway": "192.168.0.100",
            "IPRange": "192.168.1.0/24",
            "Subnet": "192.168.0.0/16"
          },
          {
            "AuxiliaryAddresses": {
              "a": "192.170.1.5",
              "b": "192.170.1.6"
            },
            "Gateway": "192.170.0.100",
            "Subnet": "192.170.0.0/16"
          }
        ],
        "Driver": "default",
        "Options": {
        }
      },
      "Internal": false,
      "Labels": {
      },
      "Name": "my-multihost-network",
      "Options": {
      }
    }

After this change, the request looks
like this (all aux-addresses preserved);

    {
      "Attachable": false,
      "CheckDuplicate": true,
      "Driver": "overlay",
      "EnableIPv6": false,
      "IPAM": {
        "Config": [
          {
            "AuxiliaryAddresses": {
              "my-router": "192.168.1.5",
              "my-switch": "192.168.1.6"
            },
            "Gateway": "192.168.0.100",
            "IPRange": "192.168.1.0/24",
            "Subnet": "192.168.0.0/16"
          },
          {
            "AuxiliaryAddresses": {
              "my-printer": "192.170.1.5",
              "my-nas": "192.170.1.6"
            },
            "Gateway": "192.170.0.100",
            "Subnet": "192.170.0.0/16"
          }
        ],
        "Driver": "default",
        "Options": {
        }
      },
      "Internal": false,
      "Labels": {
      },
      "Name": "my-multihost-network",
      "Options": {
      }
    }

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 676773a780
Component: cli
2017-06-02 00:10:12 +00:00
61649df81a Fix bash completion for docker logs --since
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ee85efb76d
Component: cli
2017-06-02 00:10:12 +00:00
9e4af04ffc Add isolation to info
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 21171be26e
Component: cli
2017-06-02 00:10:12 +00:00
e42b1700b3 move mcvlan out of experimental docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6fe8c73b60
Component: cli
2017-06-02 00:10:11 +00:00
416496941a add endpoint mode in service pretty
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1c60ac11d6
Component: cli
2017-06-02 00:10:11 +00:00
150f6a3e23 add docker stack ls
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 268c22d77b
Component: cli
2017-06-02 00:10:11 +00:00
363cd6894d Update man page for dm.xfs_nospace_max_retries
This option was added through commit
0d03c060c7e6800e60833c4462b917ee9b081440,
but didn't update the man page.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1f015b1700
Component: cli
2017-06-02 00:10:11 +00:00
a29051ebb7 Implement build cache based on history array
Based on work by KJ Tsanaktsidis

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: KJ Tsanaktsidis <kjtsanaktsidis@gmail.com>
Upstream-commit: 1a8bdcd36f
Component: cli
2017-06-02 00:10:11 +00:00
f2dbfd6f6f Add zsh completion for 'docker stats --format'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: bed270a507
Component: cli
2017-06-02 00:10:11 +00:00
3c59f5a59d Add zsh completion for multi-nodes 'node ps'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 365e71d868
Component: cli
2017-06-02 00:10:11 +00:00
7830dc37a4 Add documentation for docker stats --format
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 6f4c4e466b
Component: cli
2017-06-02 00:10:11 +00:00
c94103b0e3 change-code-and-fix-docs-about-checkpoint
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: fadc2868b1
Component: cli
2017-06-02 00:10:11 +00:00
0e2dd2dfb3 Deprecate "daemon" subcommand
The daemon is in a separate (dockerd) binary
since docker 1.12, so should no longer be
used.

This marks the command as deprecated, and
adds it to the deprecated features list.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9f22887e06
Component: cli
2017-06-02 00:10:11 +00:00
b82795e935 Update documentation and change log to include the preliminary validation of dockerfile.
This commit updates documentation and change log to include
the preliminary validation of the dockerfile before instructions
in dockerfile is run one-by-one.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4785157d54
Component: cli
2017-06-02 00:10:11 +00:00
59ce95b373 Del the extra dot
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Upstream-commit: 129cd0b901
Component: cli
2017-06-02 00:10:11 +00:00
21031d11ed support docker node ps multiNodes
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 47e0458ffb
Component: cli
2017-06-02 00:10:11 +00:00
87991c341e Labels info ommitted while inspecting self-defined network
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: a179b5f518
Component: cli
2017-06-02 00:10:11 +00:00
0821200f3b Clarify usage of --force when used on a swarm manager
Fixes #26125

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 088cfc36de
Component: cli
2017-06-02 00:10:11 +00:00
dadc5cd030 Add bash completion for docker stats --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8121d5a885
Component: cli
2017-06-02 00:10:11 +00:00
6ec6ab7600 Add Portworx Volume Plugin Description
Signed-off-by: Jeff Silberman <jsilberm@gmail.com>
Upstream-commit: 5790fa5793
Component: cli
2017-06-02 00:10:11 +00:00
c1233b3b66 fix the man page and zsh completion for docker images
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: a64a1aa0ae
Component: cli
2017-06-02 00:10:11 +00:00
8d024268f5 Add formatter for service inspect
Allows the user to use `pretty` as the format string.
This enables users to put custom format options into their CLI config
just like is supported for `docker ps` and `docker images`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 347ce7aad3
Component: cli
2017-06-02 00:10:11 +00:00
e5821e747b Update on index refernce documentation
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b2dc10a653
Component: cli
2017-06-02 00:10:10 +00:00
dcf229693f add option and update the description
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: d0e704b31d
Component: cli
2017-06-02 00:10:10 +00:00
66eb1dbaa1 Add init process for zombie fighting
This adds a small C binary for fighting zombies.  It is mounted under
`/dev/init` and is prepended to the args specified by the user.  You
enable it via a daemon flag, `dockerd --init`, as it is disable by
default for backwards compat.

You can also override the daemon option or specify this on a per
container basis with `docker run --init=true|false`.

You can test this by running a process like this as the pid 1 in a
container and see the extra zombie that appears in the container as it
is running.

```c

int main(int argc, char ** argv) {
	pid_t pid = fork();
	if (pid == 0) {
		pid = fork();
		if (pid == 0) {
			exit(0);
		}
		sleep(3);
		exit(0);
	}
	printf("got pid %d and exited\n", pid);
	sleep(20);
}
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d72deed554
Component: cli
2017-06-02 00:10:10 +00:00
c0006d5967 add docker events --format
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 71e220fc11
Component: cli
2017-06-02 00:10:10 +00:00
7f53df54e5 Fix Markdown formatting and missing prompt in service create
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: efe94b9d92
Component: cli
2017-06-02 00:10:10 +00:00
8f9d913e06 Misty's edits and additions
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 3de7d725137ee1620ae2050e65ace4990a3af87e)
Upstream-commit: b3341fb7af
Component: cli
2017-06-02 00:10:10 +00:00
b97b39887c Add --mount syntax documentation to CLI reference
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 060fd9fa5c
Component: cli
2017-06-02 00:10:10 +00:00
2c74338ca9 fix typo for docs reference
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 20463c7b18
Component: cli
2017-06-02 00:10:10 +00:00
efc6a5a84c Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f7b0c9b472
Component: cli
2017-06-02 00:10:10 +00:00
22300ed040 Fix mtu option in documentation
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: f9832ceac0
Component: cli
2017-06-02 00:10:10 +00:00
3fc85d0d86 Remove extra paren in run --link docs
Signed-off-by: Josh Bodah <jb3689@yahoo.com>
Upstream-commit: 622f3bf19f
Component: cli
2017-06-02 00:10:10 +00:00
2e3994446e Splunk Logging Driver performance improvements
New driver options:

- `splunk-gzip` - gzip compress all requests to Splunk HEC
(enabled by default)
- `splunk-gzip-level` - change compression level.

Messages are sent in batches by 1000, with frequency of 5 seconds.
Maximum buffer is 10,000 events. If HEC will not be available, Splunk
Logging Driver will keep retrying while it can hold messages in buffer.

Added unit tests for driver.

Signed-off-by: Denis Gladkikh <denis@gladkikh.email>
Upstream-commit: db4e32d39e
Component: cli
2017-06-02 00:10:10 +00:00
3c7db173b2 Use "sudo" for dockerd examples
Because we standardize on using a non-privileged
prompt (`$`) instead of `#`, replacing the
examples to use `sudo` instead to indicate
this has to be run as root.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 36ffab578f
Component: cli
2017-06-02 00:10:10 +00:00
6b6c8356b7 Add link to logging drivers reference
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e3279502d0
Component: cli
2017-06-02 00:10:10 +00:00
461e529d7a Synchronize push reference with man page
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7d50b656d4
Component: cli
2017-06-02 00:10:10 +00:00
92852c7d07 Restore missing "format" example
The "format" example got lost during the
rewrite of the documentation for Cobra. This
restores the missing example.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6abd40c653
Component: cli
2017-06-02 00:10:10 +00:00
a076b13e84 Update ENTRYPOINT/CMD table to agree with docs
Several other places in the document it states that when using the shell
form of ENTRYPOINT, CMD and command line arguments are ignored.  That is
accurate, this table was not.  It is now.

Signed-off-by: David Dooling <dooling@gmail.com>
Upstream-commit: e1a8e15e8d
Component: cli
2017-06-02 00:10:09 +00:00
ddfab9c5cb Update plugin install docs with registry specifics.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: d3bfb92962
Component: cli
2017-06-02 00:10:09 +00:00
945f9e9edb fix some incorrect symbols before executing command
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: e0c33c5988
Component: cli
2017-06-02 00:10:09 +00:00
7f3a88fe36 Remove --read-only restriction when user ns enabled
The restriction is no longer necessary given changes at the runc layer
related to mount options of the rootfs. Also cleaned up the docs on
restrictions left for userns enabled mode. Re-enabled tests related to
--read-only when testing a userns-enabled daemon in integration-cli.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: cf8c2c21ac
Component: cli
2017-06-02 00:10:09 +00:00
89e76744ef add some plugin manifest reference doc
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0d521e018a
Component: cli
2017-06-02 00:10:09 +00:00
6384aa07f5 add current limitation to experimental/checkpoint-restore.md
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 6f3f6a78a9
Component: cli
2017-06-02 00:10:09 +00:00
5f02806868 add swarm mode terms to the glossary
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 87c8d755bd
Component: cli
2017-06-02 00:10:09 +00:00
e6d55c9096 Begin process of deprecating MAINTAINER
This may take some time, but start by pointing people at
LABEL instead.

MAINTAINER predates general LABEL and has basically no tooling,
only allows a single item to be added, and is has been
unofficially deprecated for some time, with many images not
including it, but we have never specifically said that it
should be replaced by LABEL as a better more generic metadata
solution.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 62f35ffbdc
Component: cli
2017-06-02 00:10:09 +00:00
b645f81806 update option for docker commands
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: d7d9f926af
Component: cli
2017-06-02 00:10:09 +00:00
e9c80957e0 Add zsh completion for 'service {create,update} --group-{add,rm}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 05f167e92a
Component: cli
2017-06-02 00:10:09 +00:00
6cf494a56a Fix documentation for Step 0 to Step 1 in docker build
The indexing of steps in the output of `docker build` starts with `Step 1`.
However, there are several places in the docs that start with `Step 0`.

This fix addresses the issue and changes `Step 0` to `Step 1` (and subsequent steps).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 98043e3f79
Component: cli
2017-06-02 00:10:09 +00:00
2320ffdd73 Add bash completion for service {create,update} --group-{add,rm}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a45c6fc8bd
Component: cli
2017-06-02 00:10:09 +00:00
713d904c3b carries and closes 25414
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 63478d277a
Component: cli
2017-06-02 00:10:09 +00:00
e229f42f04 Update service_create.md
More info on endpoint setting, and service discovery on swarm mode overlay network.

Signed-off-by: Richard Mathie <richard.mathie@amey.co.uk>
Upstream-commit: 9163eecf91
Component: cli
2017-06-02 00:10:09 +00:00
87df3d8e1a Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: b1839d16dc
Component: cli
2017-06-02 00:10:09 +00:00
af09a8c45a Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 37eb9061fc
Component: cli
2017-06-02 00:10:09 +00:00
d22e6b3bfc update go-md2man to v1.0.6
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 3b2455d983
Component: cli
2017-06-02 00:10:09 +00:00
762274c8f0 Modify rename function usage
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
Upstream-commit: bf70112273
Component: cli
2017-06-02 00:10:09 +00:00
358da38c9e check inconsistant command in docs/reference/commandline
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 80600090cb
Component: cli
2017-06-02 00:10:09 +00:00
a21f8bcffa Sanitize uses of Swarm as a proper and improper noun
Fixes #24905

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: e63e3d9fdf
Component: cli
2017-06-02 00:10:09 +00:00
f3b4d86d17 Add completion for docker events -f event=health_status
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 894c3a5cbf
Component: cli
2017-06-02 00:10:08 +00:00
2adf88881f Remove the option for the command service rm
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6d8cf3fb44
Component: cli
2017-06-02 00:10:08 +00:00
1c5c06fa5f Correct typo in run reference docs that use the create command
Signed-off-by: Yosef Fertel <yfertel@gmail.com>
Upstream-commit: 865d0e364d
Component: cli
2017-06-02 00:10:08 +00:00
081ea5054b devmapper: Provide a knob dm.xfs_nospace_max_retries
When xfs filesystem is being used on top of thin pool, xfs can get ENOSPC
errors from thin pool when thin pool is full. As of now xfs retries the
IO and keeps on retrying and does not give up. This can result in container
application being stuck for a very long time. In fact I have seen instances
of unkillable processes. So that means once thin pool is full and process
gets stuck, container can't be stopped/killed either and only option left
seems to be power recycle of the box.

In another instance, writer did not block but failed after a while. But
when I tried to exit/stop the container, unmounting xfs hanged and only
thing I could do was power cycle the machine.

Now upstream kernel has committed patches where it allows user space to
customize user space behavior in case of errors. One of the knobs is
max_retries, which specifies how many times an IO should be retried
when ENOSPC is encountered.

This patch sets provides a tunable knob (dm.xfs_nospace_max_retries) so
that user can specify value for max_retries and tune xfs behavior. If
one sets this value to 0, xfs will not retry IO when ENOSPC error is
encountered. It will instead give up and shutdown filesystem.

This knob can be useful if one is running into unkillable
processes/containers issue on top of xfs.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 21e45b5ad9
Component: cli
2017-06-02 00:10:08 +00:00
7584633f1c fix docs about sudo docker login
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: ba7648fa62
Component: cli
2017-06-02 00:10:08 +00:00
aefafb4581 Fix incorrect help output in docker network ls
As is raised in 26312, in `docker network ls`, the help output was
mistaken to `volume names`:
```
-q, --quiet Only display volume names
```

This fix changes the help output to:
```
-q, --quiet Only display network IDs
```

This fix also updates the documentation in:
`docs/reference/commandline/network_ls.md`

This fix fixes 26312.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6aa365d7e9
Component: cli
2017-06-02 00:10:08 +00:00
ea5f807b43 Update man page for docker create to add --rm flag
The `--rm` flag has been part of the `docker create` and
related docs in `docs/reference/commandline/create.md`
already includes the `--rm` flag. However, man page
`man/docker-create.1.md` has not adds the `--rm` flag yet.

This fix adds the description of `--rm` flag to
`man/docker-create.1.md`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3f171a31b1
Component: cli
2017-06-02 00:10:08 +00:00
0fb7ecd87f docs: mention NFS support for contiv volume plugin
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: be3bfbec55
Component: cli
2017-06-02 00:10:08 +00:00
3186a9c551 Remove -h option for docker cli
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 1d481e22fc
Component: cli
2017-06-02 00:10:08 +00:00
00e9b733f4 Add health status as action on events documentations
This was missing from the docs for 1.12.0.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 88f17e8ef3
Component: cli
2017-06-02 00:10:08 +00:00
d3617f8309 Modify docker-restart.1.md
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
Upstream-commit: de4127305e
Component: cli
2017-06-02 00:10:08 +00:00
96cfa92653 update docs/reference/commandline/service_create.md
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: d602486346
Component: cli
2017-06-02 00:10:08 +00:00
6815a85fe2 The first letter docker is small
Upstream-commit: c5a30e87bf
Component: cli
2017-06-02 00:10:08 +00:00
91446aadd0 Linux upstream kernel Overlay file systems support SELinux
Remove checks that prevent overlay and SELinux from working together.
Fixes are arriving in the 4.9 kernel.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 5f30004f08
Component: cli
2017-06-02 00:10:08 +00:00
f40dff0651 Miss the options in some commands
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 95b80f2984
Component: cli
2017-06-02 00:10:08 +00:00
5b98ef72c8 make command "docker plugin inspect" complete
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 8e27afeb39
Component: cli
2017-06-02 00:10:08 +00:00
70eb7ccb3c provide actual command format for docker network create
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: eb1b81c204
Component: cli
2017-06-02 00:10:08 +00:00
904cc658a5 Update description for docker plugin inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 79a055386c
Component: cli
2017-06-02 00:10:08 +00:00
e71b9e2ff4 Remove bash completion for docker volume create --name
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a916015f46
Component: cli
2017-06-02 00:10:07 +00:00
a424bc46b4 some fixes to clean up new plugin system docs
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 9c9cd1a439
Component: cli
2017-06-02 00:10:07 +00:00
ccc128989d Modify restart function prompt
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
Upstream-commit: d9340c47af
Component: cli
2017-06-02 00:10:07 +00:00
f467e7884f Modify options for the command plugin install
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 2c9a4c7f0b
Component: cli
2017-06-02 00:10:07 +00:00
085c50ee15 update command description
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7b7ff16175
Component: cli
2017-06-02 00:10:07 +00:00
1bcd95be4c make node ps default to self in swarm node
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4d1fc99027
Component: cli
2017-06-02 00:10:07 +00:00
c8054dcc2f usage description of docker deploy in md not consistant with go file
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: b0b59a7e35
Component: cli
2017-06-02 00:10:07 +00:00
5997d9771b Add docs for "--containerd" in dockerd
Signed-off-by: ohmystack <jiangjun1990@gmail.com>
Upstream-commit: fa710a059a
Component: cli
2017-06-02 00:10:07 +00:00
0a5d2abad1 Fix typo in builder.md
Signed-off-by: Kris-Mikael Krister <krismikael@protonmail.com>
Upstream-commit: 8918ff39e2
Component: cli
2017-06-02 00:10:07 +00:00
2fc8c0080b Support --group-add and --group-rm in docker service create/update
This fix tries to address the issue raised in 25304 to support
`--group-add` and `--group-rm` in `docker service create`.

This fix adds `--group-add` to `docker service create` and `docker service update`,
adds `--group-rm` to `docker service update`.

This fix updates docs for `docker service create` and `docker service update`:
1. Add `--group-add` to `docker service create` and `docker service update`
2. Add `--group-rm` to `docker service update`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c37fcc3f49
Component: cli
2017-06-02 00:10:07 +00:00
0c05df52fc Replace zsh completion for 'docker volume create --name' by 'docker volume create {name}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 1e95101ade
Component: cli
2017-06-02 00:10:07 +00:00
e02a0ef79f add -f to plugin inspect
Signed-off-by: Victor Vieux <vieux@docker.com>

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 7ebb7c738a
Component: cli
2017-06-02 00:10:07 +00:00
2e5d081e78 clean up the run.md in reference
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 2ff594515f
Component: cli
2017-06-02 00:10:07 +00:00
58c449e947 replace active by enabled for consistency in plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: cfa7f94c02
Component: cli
2017-06-02 00:10:07 +00:00
10a240d5be Add option to specify name without --name in volume create
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
Upstream-commit: 4594e5d50e
Component: cli
2017-06-02 00:10:07 +00:00
8ae4a916a6 Refactor docker inspect to work on all types
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: a2b443d1df
Component: cli
2017-06-02 00:10:07 +00:00
b439b179c3 Update docs for docker create to include --rm flag
Since 20848 has been merged and both `docker create` and
`docker run` share the same `runconfig` parser, now both
`docker run` and `docker create` allow to specify the
`--rm` flag. However, docs for `docker create` has not
been udpated yet.

This fix updates docs for `docker create` so that `--rm`
flag has been included.

This fix is related to 20848 and 25577.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cfb8a110b4
Component: cli
2017-06-02 00:10:07 +00:00
4271b8612c Fixes #25918 - Changed --permissive to --privileged.
Signed-off-by: Rich Moyse <rich@moyse.us>
Upstream-commit: 463d68bde9
Component: cli
2017-06-02 00:10:07 +00:00
25ab7e3d6a Remove old cli framework.
Also consolidate the leftover packages under cli.
Remove pkg/mflag.
Make manpage generation work with new cobra layout.
Remove remaining mflag and fix tests after rebase with master.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6e33dc2d91
Component: cli
2017-06-02 00:10:06 +00:00
8610f5b17b Splunk Logging Driver: formats and verifyconnection
`--log-opt splunk-format=inline|json|raw` allows to change how logging
driver sends data to Splunk, where

`inline` - default value, format used before, message is injected as a
line in JSON payload
`json` - driver will try to parse each line as a JSON object and embed it
inside of the JSON payload
`raw` - driver will send Raw payload instead of JSON, tag and attributes
will be prefixed before the message

`--log-opt splunk-verify-connection=true|false` - allows to skip
verification for Splunk Url

Signed-off-by: Denis Gladkikh <denis@gladkikh.email>
Upstream-commit: 7225cc5604
Component: cli
2017-06-02 00:10:06 +00:00
ac4b76341d Replace docker command from 'docker daemon' to 'dockerd'
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: ed38ec18bf
Component: cli
2017-06-02 00:10:06 +00:00
d42fafe409 Add a Dockerfile for generating manpages on s390x
Untested.

Hoping CI and @michael-holzheu can test...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: a8a90829bb
Component: cli
2017-06-02 00:10:06 +00:00
ce5437555b Modify incorrect repository URL
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 016a00dc6e
Component: cli
2017-06-02 00:10:06 +00:00
8ac0b714fc Remove option "--manager" description for swarm_join.md
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 2d81ec0fae
Component: cli
2017-06-02 00:10:06 +00:00
63caa4860b Add a Dockerfile for generating manpages on aarch64
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 6625943f44
Component: cli
2017-06-02 00:10:06 +00:00
9b96f27cba Make it clear who is doing variable expansion
Add sentece to RUN, CMD, and ENTRYPOINT exec sections making it clear
that it is the shell doing the environment variable expansion.

Signed-off-by: David Dooling <dooling@gmail.com>
Upstream-commit: e6c152e5ee
Component: cli
2017-06-02 00:10:06 +00:00
397cc42a3c Remove erroneous ENTRYPOINT note
The Dockerfile parser does not subsitute ENV variables in any form of
the ENTRYPOINT command.  Any substitution, if done, is done by the shell
when the command is executed.

Signed-off-by: David Dooling <dooling@gmail.com>
Upstream-commit: 2b84c776d0
Component: cli
2017-06-02 00:10:06 +00:00
5809cc0e24 docs: fix typo in url fragment
I noticed the broken hyperlink in this page:
https://docs.docker.com/engine/reference/builder/
The link should point to `#parser-directives`.

Signed-off-by: Mihai Borobocea <MihaiBorob@gmail.com>
Upstream-commit: 6132c35c04
Component: cli
2017-06-02 00:10:06 +00:00
a80d76377d Update zsh and bash completion scripts.
This is to update the zsh and bash completion script for
23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cebe3440af
Component: cli
2017-06-02 00:10:06 +00:00
f63a442345 Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band
volume driver deletion leaves some data in docker. This prevent the
reuse of deleted volume names (by out-of-band volume driver like flocker).

This fix adds a `--force` field in `docker volume rm` to forcefully purge
the data of the volume that has already been deleted.

Related documentations have been updated.

This fix is tested manually with flocker, as is specified in #23367.
An integration test has also been added for the scenario described.

This fix fixes #23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9a16c4fccd
Component: cli
2017-06-02 00:10:06 +00:00
417a9cb326 Modify usage of docker swarm join-token command
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 0c200d4894
Component: cli
2017-06-02 00:10:06 +00:00
ddf35703dd ppc64le: add support for building docker debs for xenial
This PR adds the ability to make docker debs for xenial on power

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: be1a73f200
Component: cli
2017-06-02 00:10:06 +00:00
cd1f0c0150 Remove -run flag from commit command.
This flag has been deprecated in version below 1.10 so it's safe to
remove now, according to our deprecation policy.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 52f1cdbab5
Component: cli
2017-06-02 00:10:06 +00:00
6c480d3877 Use the correct version of glide
In `man/Dockerfile` we are specifying a tagged version of glide to
checkout, but never actually checking it out.
This checks out the requested version before building.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3ef90ec019
Component: cli
2017-06-02 00:10:06 +00:00
17575bfacc expose RemovalInProgress in StateString #25652
Signed-off-by: timfeirg <kkcocogogo@gmail.com>
Upstream-commit: 280a6f9663
Component: cli
2017-06-02 00:10:06 +00:00
11eb9b1a46 fix broken link
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: ebc23f6116
Component: cli
2017-06-02 00:10:06 +00:00
b25413223c edit plugin system doc, fix menu system
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 16de3a25f4
Component: cli
2017-06-02 00:10:05 +00:00
272b173af7 adding some documentation about the new plugin system
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 4755904cc3
Component: cli
2017-06-02 00:10:05 +00:00
0bebbcad77 Specify woker node for docker swarm leave command
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 17a0affff1
Component: cli
2017-06-02 00:10:05 +00:00
a722d87773 Split list of capabilities into those added by default and those not
The documentation was a bit unhelpful as to what are the default
capabilities, so split.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: ff474eb300
Component: cli
2017-06-02 00:10:05 +00:00
b9bcb6dad4 Replace old oci specs import with runtime-specs
Fixes #25804

The upstream repo changed the import paths.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 1ec3668e69
Component: cli
2017-06-02 00:10:05 +00:00
af4a044ed4 Add zsh completion for 'docker {network,volume} ls --format'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: ab24559a62
Component: cli
2017-06-02 00:10:05 +00:00
be2f0b8e26 Add missing docs about binary remote contexts
This feature was added in docker 1.8, through
7491f9a9c11ad3fd3b587fa6f7e53b297b3b88c7.

However, the API docs ended up in the wrong
API version (1.19 instead of 1.20), so were
never included in future API docs.

Also, the CLI docs got lost during splitting
up the cli.md docs into separate files;
561bfb268de3c674b04d48895b7e46ae890ef795

This moves the API docs to the correct
versions, and restores the CLI documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f68f53f3ec
Component: cli
2017-06-02 00:10:05 +00:00
6fcdf10549 Add zsh completion for 'docker volume ls --filter label'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 1ccb0210f5
Component: cli
2017-06-02 00:10:05 +00:00
7200460d95 Forbid update restart policy of container with AutoRemove flag
"--restart" and "--rm" are conflict options, if a container is started
with AutoRemove flag, we should forbid the update action for its Restart
Policy.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: f63d53c736
Component: cli
2017-06-02 00:10:05 +00:00
eb6bdab31c Add --no-trunc to service/node/stack ps output
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: b5c313651f
Component: cli
2017-06-02 00:10:05 +00:00
eb11d76559 Add bash completion for docker {network,volume} ls --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9b4b730adb
Component: cli
2017-06-02 00:10:05 +00:00
6878846c80 Add missing docs for volume ls filter=label
This filter option was added in be045ee2da7c2c83e859d86cb496e86ec6de8566,
but didn't update the documentation and
man pages.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9cec1ce2ee
Component: cli
2017-06-02 00:10:05 +00:00
88a33913c8 Add bash completion for docker volume ls --filter label
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1cddc8ee68
Component: cli
2017-06-02 00:10:05 +00:00
3bf668411b add --format flag to docker info
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 420b6a91af
Component: cli
2017-06-02 00:10:05 +00:00
bebb1a1b4b Restore missing ps example for killed containers
This example was added in b0b2f979c7c43e2975d5e39340c168da2da42d1d,
but got lost during splitting up the cli.md docs into separate files;
561bfb268de3c674b04d48895b7e46ae890ef795

This restores the missing example.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5a3c9e8c24
Component: cli
2017-06-02 00:10:05 +00:00
da7fdb610f Fix capitalization
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4d268629e2
Component: cli
2017-06-02 00:10:05 +00:00
10160262f0 add overlay networking security model node
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 32a613412e
Component: cli
2017-06-02 00:10:05 +00:00
8596ee2475 Move export from image commands to container commands
The export command operates on containers, not images, so it should be listed under the container commands, not the image commands.

Signed-off-by: David Lechner <david@lechnology.com>
Upstream-commit: 76d46c3430
Component: cli
2017-06-02 00:10:04 +00:00
bbf2df659a Fix inspect network show gateway with mask
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: ac5ac973aa
Component: cli
2017-06-02 00:10:04 +00:00
cb46a67750 Remove --network-add and --network-rm flags from service update
These flags were not supported (daemon returns an error), and it was an
oversight. They were not present in completion scripts.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e15ee6cec4
Component: cli
2017-06-02 00:10:04 +00:00
84a3b22474 add description in docker plugin ls
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: afbc834a99
Component: cli
2017-06-02 00:10:04 +00:00
e723253e32 Update docs so that log-opts takes map ({}) instead of []
This fix updates docs so that log-opts takes map (`{}`) instead
of `[]`, as is defined in the impmenetation (`map[string]string`)

This fix fixes 22311.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 710f8d8dea
Component: cli
2017-06-02 00:10:04 +00:00
0f673efc1c Fix update memory without memoryswap
The memory should always be smaller than memoryswap,
we should error out with message that user know how
to do rather than just an invalid argument error if
user update the memory limit bigger than already set
memory swap.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 3b2ecd7052
Component: cli
2017-06-02 00:10:04 +00:00
650aa8ff5a Windows: Added support for storage-opt size
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 7a4dfc4a33
Component: cli
2017-06-02 00:10:04 +00:00
b32ef3f32e Update example output for node inspect
commit 41d580c7a610d8111dc63353cbd94319ca854627 added
"Joined at" to the output of node inspect,
but I forgot that docs changes are needed.

This change updates the example output
of node inspect in the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 503690bf4a
Component: cli
2017-06-02 00:10:04 +00:00
d3d3328fa1 Wait container's removal via Events API
If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 0f6a96d2a4
Component: cli
2017-06-02 00:10:04 +00:00
f4daade658 update go-units vendor to newest version
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e5a1e08fa0
Component: cli
2017-06-02 00:10:04 +00:00
d17acd563f Update documentation for entrypoint unset with docker run/create
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 68ea0dc2d0
Component: cli
2017-06-02 00:10:04 +00:00
75a2b43b32 fix typo, change sample cert expiry value
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 86315be2f0
Component: cli
2017-06-02 00:10:04 +00:00
9c50b1990a Fix bash completion for docker service {create,update} {-e,--env}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 52dd4d9c5e
Component: cli
2017-06-02 00:10:04 +00:00
625c7ce560 Improve bash completion for docker swarm {init,join} --{advertise,listen}-addr}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6c4812f606
Component: cli
2017-06-02 00:10:04 +00:00
250e1ade84 Fix bash completion for docker swarm join --advertise-addr
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8f0986f04b
Component: cli
2017-06-02 00:10:04 +00:00
2e6beb5ae7 Enable to dynamically reload authorization plugins via daemon.config
Following #22729, enable to dynamically reload/remove the daemon
authorization plugins (via standard reloading mechanism).
https://docs.docker.com/engine/reference/commandline/daemon/#daemon-
configuration-file

Daemon must store a reference to the authorization middleware to refresh
the plugin on configuration changes.

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: e428a09ae7
Component: cli
2017-06-02 00:10:04 +00:00
1315c8af13 Add self to bash completion of docker node inspect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5b559678c3
Component: cli
2017-06-02 00:10:04 +00:00
000864941a Add volume --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cfd7733d30
Component: cli
2017-06-02 00:10:04 +00:00
d04cba8a4c Add network --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fd30075463
Component: cli
2017-06-02 00:10:04 +00:00
2ad38f17c8 Add --force to docker plugin remove
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 24c39ea25b
Component: cli
2017-06-02 00:10:04 +00:00
ad57761e4e Fix typo in run command documentation
Signed-off-by: Kevin Richardson <kevin@kevinrichardson.co>
Upstream-commit: 811862e8ab
Component: cli
2017-06-02 00:10:04 +00:00
5099c5cfca Remove git conflict markers
Signed-off-by: Patrick Bänziger <patrick.baenziger@bsi-software.com>
Upstream-commit: 8b51443ea1
Component: cli
2017-06-02 00:10:04 +00:00
9afa83e8be Add zsh completion for 'docker node rm --force'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 202d38d017
Component: cli
2017-06-02 00:10:04 +00:00
23c56cbb2d Fix the man/Dockerfile for arm
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d30cedfe7c
Component: cli
2017-06-02 00:10:04 +00:00
d2e0026ece Update --user/-u flag in man page of docker create
The `--user`/`-u` of the `docker create` is the same as
`docker run`, which could take either `uid` or `uid:gid`
format. However, the description in the man page of `docker create`
is missing and may cause some confusions (comared with `docker run`).

This fix updates the man page of `docker create` so that it is
consistent with the man page of `docker run`.

This fix is related to 25304.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3a778c9e1f
Component: cli
2017-06-02 00:10:03 +00:00
c9863d47e8 Add bash completion for docker node rm --force
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d01b14ad80
Component: cli
2017-06-02 00:10:03 +00:00
46520621ac Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
Upstream-commit: f314ccfb47
Component: cli
2017-06-02 00:10:03 +00:00
c52dc025d9 Added shutdown to desired-state docs for filter node/service ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>

$Updated http docs for /tasks filters

$Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: 71f2e0f2a4
Component: cli
2017-06-02 00:10:03 +00:00
f2dae266f2 Improve swarm join-token instructions
this change improves the instructions for
swarm join-token and swarm init;

- only print the join-token command for workers
  instead of for both managers and workers, to
  prevent users from copying the wrong command.
  An extra line is added to explain how to obtain
  the manager token.
- print a message that a token was rotated
  sucesfully if '--rotate' is used.
- add some extra white-space before / after
  the join commands, to make copy/pasting
  easier.

this change also does some refactoring of join-token;

- move flagname-constants together with other constants
- use variables for selected role ("worker" / "manager")
  to prevent checking for them multiple times, and to
  keep the "worker" / "manager" sting centralized
- add an extra blank line after "join-token" instructions
  this makes it easier to copy, and cleans up the
  code a tiny bit

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 231703c3c6
Component: cli
2017-06-02 00:10:03 +00:00
0c110248c9 Update docs in docker service create/update for flag --user
In `docker service create/update`, flag `--user` actually supports
`uid:gid` (same as `docker run`). However, this is not reflected
in the help and documentation yet.

This fix updates docs in `docker service create/update` to change
the description to `Username or UID (format: <name|uid>[:<group|gid>])`.

The help message output has also been updated.

This fix is related to 25304.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: aee09a390b
Component: cli
2017-06-02 00:10:03 +00:00
cc0c31d02a Fix kernel memory updating docs
Specify that kernel memory updating limitation only applies
on kernel version older than 4.6.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 69eb98ada5
Component: cli
2017-06-02 00:10:03 +00:00
f04dc53753 update command description in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0ab07d2bd7
Component: cli
2017-06-02 00:10:03 +00:00
6442067396 add advertise address, clarify join token
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 958d9a4844
Component: cli
2017-06-02 00:10:03 +00:00
a50e247f5a Add zsh completion for 'docker service {create,update} --container-label{-add,-rm}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f6aa2d75f0
Component: cli
2017-06-02 00:10:03 +00:00
84d3d32460 Remove zsh completion for 'docker swarm inspect'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: de93020c02
Component: cli
2017-06-02 00:10:03 +00:00
0b4fc8b649 docs: cleanup docker update docs
move the "kernel memory" examples to the "examples" section,
and fix some formatting and grammar.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e2a6cf9fd5
Component: cli
2017-06-02 00:10:03 +00:00
cfa2b10762 Update usage of "Swarm" for consistency
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ddc2f8b05a
Component: cli
2017-06-02 00:10:03 +00:00
2278db9d39 cli: docker service|node|stack ps instead of tasks
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.

This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.

The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:

```
$ docker service ps condescending_cori
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 13 minutes ago  Running        6c6d232a5d0e
```

The following shows the output for the node on which the command is
running:

```console
$ docker node ps self
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
b1tpbi43k1ibevg2e94bmqo0s  mad_kalam.1           mad_kalam           apline  Accepted 2 seconds ago  Accepted       6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 12 minutes ago  Running        6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5  furious_davinci.1     furious_davinci     redis   Running 32 minutes ago  Running        6c6d232a5d0e
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 9d114f0fae
Component: cli
2017-06-02 00:10:03 +00:00
5d463eb2dd Make daemon events listen for plugin lifecycle events.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 6895b9f339
Component: cli
2017-06-02 00:10:03 +00:00
c5b76d1d9e Add back links to 1.12 release in deprecated.md
These links were temporarily changed, because the
docs were published before the 1.12.0 tag was
available.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3f2cdadc7e
Component: cli
2017-06-02 00:10:03 +00:00
e48cec13d7 Remove release-candidate advisories
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00a430d255
Component: cli
2017-06-02 00:10:03 +00:00
d0ccce4965 Add a bundlefile example in the documentation
There is no example bundlefile in the documentation
so a bundlefile example has been added. This should
help in case user don't want to search inside the
source code.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cb9ecd9146
Component: cli
2017-06-02 00:10:03 +00:00
b9d27c1588 add doc for live-restore setting and daemonless containers, fix admin guide menu
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 2cab081e16
Component: cli
2017-06-02 00:10:03 +00:00
2c57345d81 Remove bash completion for docker swarm inspect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bd66024f73
Component: cli
2017-06-02 00:10:03 +00:00
9cf559702d bash completion for container labels to service {create,update}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6ff1bec0ba
Component: cli
2017-06-02 00:10:03 +00:00
106ca6fb0a Add container labels to service create/update
Swarm mode makes it possible through the API to set labels to containers
but not through command line. This tries to fix it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 91e476b7e9
Component: cli
2017-06-02 00:10:03 +00:00
473d443e38 healthcheck: do not interpret exit code 2 as "starting"
Instead reserve exit code 2 to be future proof, document that it should
not be used. Implementation-wise, it is considered as unhealthy, but
users should not rely on this as it may change in the future.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: fa9465f093
Component: cli
2017-06-02 00:10:02 +00:00
4594082206 Add failure action for rolling updates
This changes the default behavior so that rolling updates will not
proceed once an updated task fails to start, or stops running during the
update. Users can use docker service inspect --pretty servicename to see
the update status, and if it pauses due to a failure, it will explain
that the update is paused, and show the task ID that caused it to pause.
It also shows the time since the update started.

A new --update-on-failure=(pause|continue) flag selects the
behavior. Pause means the update stops once a task fails, continue means
the old behavior of continuing the update anyway.

In the future this will be extended with additional behaviors like
automatic rollback, and flags controlling parameters like how many tasks
need to fail for the update to stop proceeding. This is a minimal
solution for 1.12.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b41c3dd208
Component: cli
2017-06-02 00:10:02 +00:00
4fc52bf5bf Add note about --entrypoint overriding default command
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: 897dc90656
Component: cli
2017-06-02 00:10:02 +00:00
2e4f8b18b2 Fix AuthzPlugin URL fragment in docs
These docs have AuthzPlugin with a lower case 'z'. What the plugin
api is actually looking for is AuthZPlugin with an upper case 'Z'.

See 46e3a249a1/pkg/authorization/api.go (L5-L8)

Signed-off-by: Everett Toews <everett.toews@rackspace.com>
Upstream-commit: d41421140c
Component: cli
2017-06-02 00:10:02 +00:00
92b94025a0 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: efdd85fb20
Component: cli
2017-06-02 00:10:02 +00:00
772dfd499f Add zsh completion for 'docker swarm join-token' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: fea5a343d5
Component: cli
2017-06-02 00:10:02 +00:00
9aa1a9eaac Require listen address and advertise address to be an IP address or an interface name
Hostnames are not supported for now because libnetwork can't use them
for overlay networking yet.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1918ec3987
Component: cli
2017-06-02 00:10:02 +00:00
609c7c0bcb Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 18cd5ac352
Component: cli
2017-06-02 00:10:02 +00:00
bbb2a8ceeb Update swarm init task-history-limit docs
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 871366c8b4
Component: cli
2017-06-02 00:10:02 +00:00
b0dc49bd20 Update --update-parallelism docs
Update documentation to account for the changes in #24952.

docs/swarm/swarm-tutorial/rolling-update.md doesn't need any changes,
but the CLI reference pages should show the current help text.
drain-node.md no longer needs to specify --update-parallelism 1 in its
example.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 012fa2fd1b
Component: cli
2017-06-02 00:10:02 +00:00
153b86e778 Remove "secrets" leftovers from docs
f5e1f6f6880391a5a3399023cf93a3c48502e57d replaced "secrets"
with "join tokens", which also removed the "auto-accept"
policy.

This removes some remaining references to those features.

Note that there are other references, but those
are already addressed in another pull request.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2a87a358d4
Component: cli
2017-06-02 00:10:02 +00:00
9244292285 bash completion for docker swarm join-token
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a35ae076b4
Component: cli
2017-06-02 00:10:02 +00:00
a677374f33 Append --registry-auth with with
`--with-registry-auth` is more explicit.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2f9e9bcbaa
Component: cli
2017-06-02 00:10:02 +00:00
de76192c9e remove "secrets" from completion scripts
Swarm join has been changed in f5e1f6f6880391a5a3399023cf93a3c48502e57d,
removing various options and the "node accept" command.

This removes the removed options from the completion
scripts.

NOTE: a new command ("docker swarm join-token") was
also added, but is not part of this commit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6eef41333d
Component: cli
2017-06-02 00:10:02 +00:00
c7af33ec28 Make README less scabious
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 6a891c67fd
Component: cli
2017-06-02 00:10:02 +00:00
e128f0ccd5 Replace secrets with join tokens
Implement the proposal from
https://github.com/docker/docker/issues/24430#issuecomment-233100121

Removes acceptance policy and secret in favor of an automatically
generated join token that combines the secret, CA hash, and
manager/worker role into a single opaque string.

Adds a docker swarm join-token subcommand to inspect and rotate the
tokens.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: acf0bc4b9a
Component: cli
2017-06-02 00:10:02 +00:00
ae49998262 Extend deprecation cycle to 3 releases by default
At the moment docker's deprecation policy is 2 release cycles by
default, which is around 5 months. This may not be enough for
production environment and there is a need to extend the
deprecation cycle to 3 releases (see #24494).

This fix updates the docs/deprecated.md and extend the deprecation
cycle to 3 releases.

This fix is related to #24494 and #24534.

This fix fixes #24534.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d1228a75e1
Component: cli
2017-06-02 00:10:02 +00:00
9fcee1694f docs: improve formatting and highlighting of docker ps reference
this improves the formatting, and code-highlighting
of the `docker ps` reference page, and wraps sentences
to 80 chars

also adds single quotes around the formatting
example for labels.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 458ff79b0d
Component: cli
2017-06-02 00:10:01 +00:00
5882e1e770 Send registry auth token for service deploy
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 49f4d8c083
Component: cli
2017-06-02 00:10:01 +00:00
0ef7be695f Add manual support for macvlan networks to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6218da47b1
Component: cli
2017-06-02 00:10:01 +00:00
f68a53fc11 docs: fix copy/pasta error
Looks like I copied from the line below, not
from the output :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 99bf996fdf
Component: cli
2017-06-02 00:10:01 +00:00
9ef6997418 docs: add code-hints to builder page
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7a206d8667
Component: cli
2017-06-02 00:10:01 +00:00
b76715195d Add missing --log-driver and --log-opt docs
Adds documentation for "--log-driver" and "--log-opt"
for services.

Also updated the API docs to include the new
options, and generated a more complete JSON
example.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c8dd8fe523
Component: cli
2017-06-02 00:10:01 +00:00
2c7da5e3f9 docs: update reference docs for plugins
the output/response slightly changed in
340964db1c8f161a2ad156023eb47dcc93bf804b,
and `:latest` is no longer required for
various actions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 338cf2edd8
Component: cli
2017-06-02 00:10:01 +00:00
0c50f823f7 Update completions for syslog log driver options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1f0b0b007c
Component: cli
2017-06-02 00:10:01 +00:00
6119ded502 docs: add initial reference for "stack services"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 77f90b24c9
Component: cli
2017-06-02 00:10:01 +00:00
23a391d7a0 add command docker stack services STACKNAME
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 07abf9a8fc
Component: cli
2017-06-02 00:10:01 +00:00
a3bce52171 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>
Upstream-commit: b2d71bfbe1
Component: cli
2017-06-02 00:10:01 +00:00
0fcafc352c Fix nits in deprecated
Signed-off-by: Harry Zhang <harryz@hyper.sh>
Upstream-commit: 2a56732a87
Component: cli
2017-06-02 00:10:01 +00:00
28c1cdf296 fix duplicated usage in docs
this removes a copy/pasta whoopsie on my side,
introduced in de64324109d2694b1525e62b5c0072267282a36c

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 27584ec78a
Component: cli
2017-06-02 00:10:01 +00:00
09d64ed0cb Add zsh completion for 'docker node update --label-{add,rm}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f2e01edf57
Component: cli
2017-06-02 00:10:01 +00:00
bbf1c30986 Add zsh completion for 'docker service {create,update} --log-{driver,opt}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: ddd049d51a
Component: cli
2017-06-02 00:10:01 +00:00
88bdaca178 add ref docs for node label
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 59b234a119
Component: cli
2017-06-02 00:10:01 +00:00
cf739dd8ae 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>
Upstream-commit: ad98aba1b6
Component: cli
2017-06-02 00:10:01 +00:00
4375ee0b4d Dont run man generation as part of test-unit.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 04844c2c3d
Component: cli
2017-06-02 00:10:01 +00:00
863149a7d8 Set Long text for volume commands so they can be used to generate man pages.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e08631bb28
Component: cli
2017-06-02 00:09:59 +00:00
67deee9446 Add a script to generate man pages from cobra commands.
Use the generate.sh script instead of md2man directly.
Update Dockerfile for generating man pages.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 106418dbd9
Component: cli
2017-06-02 00:07:51 +00:00
87d34bb5c1 bash completion for docker node update --label-{add,rm}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 56491f1caa
Component: cli
2017-06-02 00:07:51 +00:00
09c5057193 bash completion for docker service {create,update} --log-{driver,opt}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: cbaa143737
Component: cli
2017-06-02 00:07:51 +00:00
7eb7e8b719 bump Go to 1.6.3
following the announcement;
https://groups.google.com/forum/m/#!topic/golang-announce/7JTsd70ZAT0

> [security] Go 1.6.3 and Go 1.7rc2 pre-announcement
>
> Hello gophers,
> We plan to issue Go 1.6.3 and Go 1.7rc2 on Monday July 18 at approximately 2am UTC.
> These are minor release to fix a security issue.
>
> Following our policy at https://golang.org/security, this is the pre-announcement of those releases.
>
> Because we are so late in the release cycle for Go 1.7, we will not issue a minor release of Go 1.5.
> Additionally, we plan to issue Go 1.7rc3 later next week, which will include any changes between 1.7rc1 and tip.
>
> Cheers,
> Chris on behalf of the Go team

**Note:**
the man/Dockerfile is not yet updated, because
the official image for Go 1.6.2 has not yet
been updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bc83ebe597
Component: cli
2017-06-02 00:07:51 +00:00
0d39fe49af Support node label update.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: ab696a54ef
Component: cli
2017-06-02 00:07:51 +00:00
c6248ce73e Improve flag help consistency, and update docs
This adds the `--live-restore` option to the documentation.

Also synched usage description in the documentation
with the actual description, and re-phrased some
flag descriptions to be a bit more consistent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 77e4100d00
Component: cli
2017-06-02 00:07:51 +00:00
0a2537fe3e better command docker network create -h output
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: eb0a4426e2
Component: cli
2017-06-02 00:07:51 +00:00
c05d80f923 Document --oom-score-adj flag in docker run
This was only mentioned in docker create documentation.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 6a983cc502
Component: cli
2017-06-02 00:07:51 +00:00
e7aaba73d9 Small zsh completion fix on --pretty & --no-resolve
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1ca03e4fd9
Component: cli
2017-06-02 00:07:51 +00:00
5a3db309a9 Delete redundant content of 'docs/extend/plugins.md'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

Update plugins.md

Update plugins.md
Upstream-commit: c1a192293e
Component: cli
2017-06-02 00:07:51 +00:00
1b3cd7e680 Update zsh completion for 'docker service {create,update} {--endpoint-mode,--mode}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: fdfa9befed
Component: cli
2017-06-02 00:07:51 +00:00
2a4a489b0c Add zsh completion for 'dockerd --oom-score-adjust'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 3ce44d633a
Component: cli
2017-06-02 00:07:51 +00:00
25a52f75a6 Fix aufs docs
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 28a1369b30
Component: cli
2017-06-02 00:07:51 +00:00
771c319a28 Add zsh completion for 'docker service {create,update} --registry-auth'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 0a6f1be9ce
Component: cli
2017-06-02 00:07:51 +00:00
ac7474cbb7 Rename zsh completion for 'docker {create,run} --net --net-alias' to '--network --network-alias'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: dc7c008c08
Component: cli
2017-06-02 00:07:51 +00:00
a7e6ee6b34 docs: correct the placement constraints docker service example
- the constraint expression needs to be quoted
- add an actual redis container to run so the command line works

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
Upstream-commit: d41a63b2c0
Component: cli
2017-06-02 00:07:51 +00:00
c045aaef40 Update service inspect --pretty reference docs
Update the output and fix wrong usage in a tutorial page.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ee88be2801
Component: cli
2017-06-02 00:07:51 +00:00
552a6bdadf Update service update commandline reference docs
Update with the new remove flags

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fa29084b31
Component: cli
2017-06-02 00:07:50 +00:00
12ad3a866c Expand the documentation of "no-new-privileges"
The change to runc in https://github.com/opencontainers/runc/pull/789
was not documented previously. Also say what this affects and clean
up layout of initial table as there was some miscolouration of the
continuation lines.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 8bc84934fb
Component: cli
2017-06-02 00:07:50 +00:00
cd2e200af5 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>
Upstream-commit: 1210363e0f
Component: cli
2017-06-02 00:07:50 +00:00
a32637bf7a bash completion for docker daemon --oom-score-adjust
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 94092e24a7
Component: cli
2017-06-02 00:07:50 +00:00
857bcf3a13 Remove shorthand flags for "mount", "pretty", and "no-resolve"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c33bc7d99e
Component: cli
2017-06-02 00:07:50 +00:00
6e1ddd3acb Add --oom-score-adjust to daemon
This adds an `--oom-score-adjust` flag to the daemon so that the value
provided can be set for the docker daemon's process.  The default value
for the flag is -500.  This will allow the docker daemon to have a
less chance of being killed before containers do.  The default value for
processes is 0 with a min/max of -1000/1000.

-500 is a good middle ground because it is less than the default for
most processes and still not -1000 which basically means never kill this
process in an OOM condition on the host machine.  The only processes on
my machine that have a score less than -500 are dbus at -900 and sshd
and xfce( my window manager ) at -1000.  I don't think docker should be
set lower, by default, than dbus or sshd so that is why I chose -500.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: e3f04f5d20
Component: cli
2017-06-02 00:07:50 +00:00
34f04d67ef Remove --command flag for service update
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2e844f5e8d
Component: cli
2017-06-02 00:07:50 +00:00
ec89b7a71d Make labels human readable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dd1708d943
Component: cli
2017-06-02 00:07:50 +00:00
8070cdebc7 Change bash completion for docker run --net* to --network*
Ref: https://github.com/docker/docker/pull/23324

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5ad5dc4baf
Component: cli
2017-06-02 00:07:50 +00:00
e8780adb60 Update bash completion for docker service {create,update} {--mode,--endpoint-mode}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a94dee25fc
Component: cli
2017-06-02 00:07:50 +00:00
26674d9fa1 bash completion for docker service {create,update} --registry-auth
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2364392ded
Component: cli
2017-06-02 00:07:50 +00:00
5094a98e8e fix the docker run --readonly example. rename '/icanwrite here' to '/icanwrite/here'
Signed-off-by: Mei ChunTao <mei.chuntao@zte.com.cn>
Upstream-commit: 17d3e6264a
Component: cli
2017-06-02 00:07:50 +00:00
d1c6ce2e15 Rename --net to --network
Add a `--network` flag which replaces `--net` without deprecating it
yet. The `--net` flag remains hidden and supported.

Add a `--network-alias` flag which replaces `--net-alias` without deprecating
it yet. The `--net-alias` flag remains hidden and supported.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: 253a5f4ea2
Component: cli
2017-06-02 00:07:50 +00:00
ce34426306 Fix some broken sourceforge.net links
Looks like there's issues with sourceforge project
pages. Given that sourceforge isn't really what
it used to be, trying to find alternative URLs
where possible.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b41c0c8696
Component: cli
2017-06-02 00:07:50 +00:00
99f6eee8f1 Add "auto-accept=none" to documentation
The "none" option was not added to the documentation.
This adds an example, and adds additional information
on manually accepting or rejecting a node.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9958abc17d
Component: cli
2017-06-02 00:07:50 +00:00
d5018391ff add caveat for network plugins in swarm mode
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: aa3344679a
Component: cli
2017-06-02 00:07:49 +00:00
c7586ac2d7 Allow option to override kernel check in overlay2
Add option to skip kernel check for older kernels which have been patched to support multiple lower directories in overlayfs.

Fixes #24023

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 48e659e30c
Component: cli
2017-06-02 00:07:49 +00:00
3e8053bffe Add support for comma-separated --auto-accept syntax.
Signed-off-by: John Harris <john@johnharris.io>
Upstream-commit: 2f3e095768
Component: cli
2017-06-02 00:07:49 +00:00
8a2bb174bf Soften limitation of update kernel memory
Kernel memory is not allowed to be updated if container is
running, it's not actually a precise kernel limitation.

Before kernel version 4.6, kernel memory will not be accounted
until kernel memory limit is set, if a container created with
kernel memory initialized, kernel memory is accounted as soon
as process created in container, so kernel memory limit update
is allowed afterward. If kernel memory is not initialized,
kernel memory consumed by processes in container will not be
accounted, so we can't update the limit because the account
will be wrong.

So update kernel memory of a running container with kernel memory
initialized is allowed, we should soften the limitation by docker.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 670a0b8077
Component: cli
2017-06-02 00:07:49 +00:00
b11bc7e580 Clarify warning against using build-time variables for secrets
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Upstream-commit: e8b87f53ec
Component: cli
2017-06-02 00:07:49 +00:00
d2b9f8cb92 Fixes broken link in docs.
Fixes #24428

Signed-off-by: Joao Fernandes <joao.fernandes@docker.com>
Upstream-commit: 46b571999d
Component: cli
2017-06-02 00:07:49 +00:00
1faecfc45b bash completion for default port on docker swarm {init,join}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2082c976e8
Component: cli
2017-06-02 00:07:49 +00:00
a3109e1623 bash completion can be configured to show node and service IDs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 14f578eb92
Component: cli
2017-06-02 00:07:49 +00:00
a0a4ff54be bash completion for docker {service,node} filters
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e417618387
Component: cli
2017-06-02 00:07:49 +00:00
9c6c426595 add constraint to service create ref
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: bf31e188d9
Component: cli
2017-06-02 00:07:49 +00:00
92dde977e4 add iptables=false to docs for multiple daemons
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 59e2c57540
Component: cli
2017-06-02 00:07:49 +00:00
177af81c48 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>
Upstream-commit: 3ebe3fe752
Component: cli
2017-06-02 00:07:49 +00:00
29b9ce751d 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>
Upstream-commit: e632408a37
Component: cli
2017-06-02 00:07:49 +00:00
ad92fbb392 Use "on-failure" for both containers and services
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: de7c6a8355
Component: cli
2017-06-02 00:07:49 +00:00
c75cd892f1 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>
Upstream-commit: 20859b146b
Component: cli
2017-06-02 00:07:49 +00:00
166ef9b898 Change NAME to HOSTNAME in docs for docker node ls
In #24159, the title field of `docker node ls` has been
changed from NAME to HOSTNAME. However, in the docs the
NAMEs are still used for the output of `docker node ls`.

This fix updates docs so that NAME field is changed to
HOSTNAME for all `docker node ls`.

This fix is related to #24159 and #24090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cab7139a4b
Component: cli
2017-06-02 00:07:48 +00:00
22c3d30a71 Remove unmatched bracket from _docker for zsh
Signed-off-by: Jonathan Lomas <jonathan@floatinglomas.ca>
Upstream-commit: 06683c5ea3
Component: cli
2017-06-02 00:07:48 +00:00
8b04e31190 Merge pull request #24325 from Anvil/plugins_volume.md-unqiue
Fixed typo: s/unqiue/unique/g
(cherry picked from commit 84aa074d18d2f75f54564f21c2b5c0d1bcddd23f)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6abf924253
Component: cli
2017-06-02 00:07:48 +00:00
c92708906e Fix typo - stacks being managed, not tasks?
Upstream-commit: 1ba0a354fe
Component: cli
2017-06-02 00:07:48 +00:00
afdbe8b1ee Add zsh completion for 'docker service' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: c51671ccb9
Component: cli
2017-06-02 00:07:48 +00:00
ef137b399e Add zsh completion for 'docker daemon --runtimes' and 'docker run --runtime'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 649b3e132d
Component: cli
2017-06-02 00:07:48 +00:00
4c8314bbbb Add zsh completion for 'docker plugin' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b1ea724ae6
Component: cli
2017-06-02 00:07:48 +00:00
e92a7c1e2b Add zsh completion for 'docker swarm' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: e31b0e691a
Component: cli
2017-06-02 00:07:48 +00:00
9e622cd658 Add zsh completion for 'docker node' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 825b9a3b33
Component: cli
2017-06-02 00:07:48 +00:00
80567c7095 Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
Upstream-commit: 8e2c3efc58
Component: cli
2017-06-02 00:07:48 +00:00
e848d54c14 Add zsh completion for 'docker ps --last'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 0f61955bdb
Component: cli
2017-06-02 00:07:48 +00:00
1eabd2ce29 Add bash completion for docker ps --last
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ec37a0b192
Component: cli
2017-06-02 00:07:48 +00:00
273d3ff4f9 man: add missing --add-runtime
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: fac7c67349
Component: cli
2017-06-02 00:07:48 +00:00
2138a28ca7 Fix typo
Signed-off-by: Adolfo Ochagavía <aochagavia92@gmail.com>
Upstream-commit: cbfebbb25a
Component: cli
2017-06-02 00:07:48 +00:00
9132e9d27a fix typo in "readonly" flag in documentation
the flag is named '--read-only', not '--readonly'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4a798e983
Component: cli
2017-06-02 00:07:48 +00:00
688d1a439b Update network_create.md
minor typos and punctuation.

Signed-off-by: Alan Thompson <cloojure@gmail.com>
Upstream-commit: bd67dfdd33
Component: cli
2017-06-02 00:07:47 +00:00
98d6b5e9ba Fix --auto-accept documentation
The --auto-accept documentation currently says that both worker and
manager nodes are automatically accepted by default. Correct it.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: ca0240f9c2
Component: cli
2017-06-02 00:07:47 +00:00
89a2975fe8 add menu.md, make index.md command line reference, update typos/minor errors in cli docs
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: a3b4cd7d99
Component: cli
2017-06-02 00:07:47 +00:00
138f629d25 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>
Upstream-commit: b9505045d9
Component: cli
2017-06-02 00:07:47 +00:00
e37780149a [Docs] clarified local volume driver docs
Signed-off-by: Nico <nicolaka@gmail.com>
Upstream-commit: f68b707d60
Component: cli
2017-06-02 00:07:47 +00:00
f9d84ba5b2 Add documentation for external CA features in API/CLI
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 4721039d71
Component: cli
2017-06-02 00:07:47 +00:00
fde6d2f8c2 Fix docker stack link
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: a450d9a474
Component: cli
2017-06-02 00:07:47 +00:00
d9e279a919 Added HPE volume plugin listing
Signed-off-by: Keith Hudgins <greenman@greenman.org>
Upstream-commit: 2b0ee276ca
Component: cli
2017-06-02 00:07:47 +00:00
7844efa404 make cmd short short consistency and change docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: a03b5522fe
Component: cli
2017-06-02 00:07:47 +00:00
7616636626 add documentation for desired_state filter
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 77d6b3721e
Component: cli
2017-06-02 00:07:47 +00:00
98fc0d4ccc deprecate '-h' shorthand and remove '-help'
This deprecates the shorthand '-h', because we don't mention it as an option,
and it conflicts with the 'docker create -h/--hostname' option, so cannot be
used for all commands consistently.

This also removes the (single-dash) '-help' option. The single-dash variant was
marked "deprecated" in version 1.5.0 (basically, since it was added in
a2b529ead21e6ab9eafcb1b1d2437c725c43a06a), but still kept around to
prevent '-help' being treated as '-h -e -l -p', causing confusing
warnings.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5f58bbfff3
Component: cli
2017-06-02 00:07:47 +00:00
abc7ff0935 bash completion enhancements for docker {swarm,node,service}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 29be1f50a8
Component: cli
2017-06-02 00:07:47 +00:00
19fb36b794 uppercase output in node inspect to keep consistency
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: a9fcf23fb9
Component: cli
2017-06-02 00:07:47 +00:00
fabfed0c85 Update experimental docs dsb -> dab
Fixing bundle extension in experimental documentation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e5d2d7c310
Component: cli
2017-06-02 00:07:47 +00:00
6090ee85ed update go-md2man to v1.0.5
Due to the issue of go-md2man, a numbered list in `man docker login` was not rendered correctly.
a8f937e113

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: e483efc219
Component: cli
2017-06-02 00:07:47 +00:00
12701ff2ab Fix error for env variables example in docker reference - 2
The reason why the issue occurs is because sh parses the first argument after -c as the whole script to execute.
Everything after isn't executed as one might expect.

When working on the 'fix' I found out the same fix is also done in commit 2af7c5cfe24b4c8e931f751979b5e69e20ba77e2, except only for one occurrence.

Signed-off-by: Serhat Gülçiçek <serhat+signoff@equil.nl>
Upstream-commit: beb09f42d6
Component: cli
2017-06-02 00:07:47 +00:00
d33b8a046a Removing some url links that can be resolved using src markdown links
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: be6f353670
Component: cli
2017-06-02 00:07:46 +00:00
9c9004d65c For the lulz! (evalulate -> evaluate)
Signed-off-by: orkaa <orkica@gmail.com>
Upstream-commit: d2f61188f1
Component: cli
2017-06-02 00:07:46 +00:00
8dfa9d87a0 Add zsh completion for 'load' and 'save' image events
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 154a1c1206
Component: cli
2017-06-02 00:07:46 +00:00
6c337e407d Add zsh completion for 'docker {create,run,network connect} --link-local-ip'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 6e1e11e0e3
Component: cli
2017-06-02 00:07:46 +00:00
9f57c59ee3 Add zsh completion for 'docker run --storage-opt size='
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 1216831bc6
Component: cli
2017-06-02 00:07:46 +00:00
2174cfdc52 Re-Add zsh completion for '-c' alias to '--cpu-shares'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 993d8f6dd4
Component: cli
2017-06-02 00:07:46 +00:00
1d425a2df6 Add zsh completion for 'docker daemon --storage-driver (overlay2|vfs)'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 95342189ab
Component: cli
2017-06-02 00:07:46 +00:00
18548c6d83 Man page fix: Mention supported drivers for --storage-opt size option in docker create/run
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 43e6c9864b
Component: cli
2017-06-02 00:07:46 +00:00
ff6579771a bash completion for -c alias to --cpu-shares
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6440bac134
Component: cli
2017-06-02 00:07:46 +00:00
109a5706ac bash completion for docker daemon --storage-opt btrfs.min_space
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6f3d828938
Component: cli
2017-06-02 00:07:46 +00:00
957417db6e bash completion for docker {run,create} --storage-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 789cd4c65f
Component: cli
2017-06-02 00:07:46 +00:00
f20586b7a2 bash completion for load and save image events
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1ffefe059f
Component: cli
2017-06-02 00:07:46 +00:00
97a0906af9 bash completion for docker daemon --storage-driver olverlay2
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 884c0bab27
Component: cli
2017-06-02 00:07:46 +00:00
405f0797de bash completion for docker {run,create,network connect} --link-local-ip
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ef5f8ec503
Component: cli
2017-06-02 00:07:46 +00:00
0d58aaf904 Add zsh completion for 'docker daemon --live-restore'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 5846f66bf2
Component: cli
2017-06-02 00:07:46 +00:00
96750effa4 Added daemon.json Windows example
Signed-off-by: Neil Peterson <neilpeterson@outlook.com>
Upstream-commit: 32054251c7
Component: cli
2017-06-02 00:07:46 +00:00
3abf4d85b1 PR 19367 doc change: Mention supported drivers for --storage-opt size option in docker create/run.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 94b45e398f
Component: cli
2017-06-02 00:07:45 +00:00
50e82af126 update docker swarm cli
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: 87591ae9b7
Component: cli
2017-06-02 00:07:45 +00:00
d579c11d35 fix bash completion for docker {swarm,node} subcommands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ab24ffa000
Component: cli
2017-06-02 00:07:45 +00:00
c173ea89a5 correct sort order in new bash completions
The completion for the new `docker service`, `docker swarm` and
`docker node` command families were partly added in non-alphabetical
order.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 53e1898a90
Component: cli
2017-06-02 00:07:45 +00:00
e1cff7efc8 Add bash completion for docker service scale
Signed-off-by: Mike Goelzer <mike.goelzer@docker.com>

Conflicts:
	contrib/completion/bash/docker
Upstream-commit: ec3864b028
Component: cli
2017-06-02 00:07:45 +00:00
5357e9b84b Add the advisory=rc metadata
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: b6bfe363f8
Component: cli
2017-06-02 00:07:45 +00:00
16d2ae21bb remove "RC" warning from Markdown files
A site-wide banner is going to be used, so we don't need this warning

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7b22dbd02a
Component: cli
2017-06-02 00:07:45 +00:00
84f2049f6b Fix markdown formatting for experimental
- don't indent code-blocks that use fences
- fixed some formatting
- wrapped long lines to 80-chars
- removed stray empty lines

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e80065ae37
Component: cli
2017-06-02 00:07:45 +00:00
62550cf790 bring dab into title and intro
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 2f835a732d
Component: cli
2017-06-02 00:07:45 +00:00
43cc7b42e9 expand stack doc
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 635ab02ea6
Component: cli
2017-06-02 00:07:45 +00:00
ce9099a5fe Add release tag reference links in deprecated.md
This fix adds a couple of missed release tag reference links in deprecated.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 55f5fd6902
Component: cli
2017-06-02 00:07:45 +00:00
3196139f55 Update help output to match Docker 1.11.
* Also touch up headings.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: def6847e11
Component: cli
2017-06-02 00:07:45 +00:00
d2844bb5d6 fix bash completion for docker service subcommands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 603002a3ec
Component: cli
2017-06-02 00:07:45 +00:00
d57b7662f3 Add initial "service" docs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 03c9762fba
Component: cli
2017-06-02 00:07:45 +00:00
37fef65db7 fix #23017, add zsh completion for dockerd
Signed-off-by: Ke Xu <leonhartx.k@gmail.com>
Upstream-commit: 903d9013a3
Component: cli
2017-06-02 00:07:45 +00:00
b1ce0d7bfe bash completion for docker swarm update --cert-expiry
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6cc83d80e0
Component: cli
2017-06-02 00:07:44 +00:00
04ba85430e update output for node commands, minor edits
Signed-off-by: Charles Smith <charles.smith@docker.com>
Upstream-commit: a816f63e57
Component: cli
2017-06-02 00:07:44 +00:00
51b169e361 Add cert-expiry to swarm update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 308888a8c6
Component: cli
2017-06-02 00:07:44 +00:00
792e5c1370 Update docker info output example
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 541dcf39ad
Component: cli
2017-06-02 00:07:44 +00:00
2155651b3d docs: move "advisory" to general metadata
the advisory option should not be
below "menu"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bfbf538f68
Component: cli
2017-06-02 00:07:44 +00:00
71e40259e9 Change SCALE to REPLICAS.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7766083eb8
Component: cli
2017-06-02 00:07:44 +00:00
9f6f305b0e Update experimental/README.md
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 4d7ce3559f
Component: cli
2017-06-02 00:07:44 +00:00
8ba9627310 Make --dispatcher-heartbeat-period a duration
Make `--dispatcher-heartbeat-period` a duration in `docker swarm
update`, allowing to express the value as "5s", "1h", etc.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: 96150d3faa
Component: cli
2017-06-02 00:07:44 +00:00
3feb513b7e Add experimental documentation for stacks
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: 49023a1c5f
Component: cli
2017-06-02 00:07:44 +00:00
79a261a81e no more 'docker node reject' in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: d8fee0b06e
Component: cli
2017-06-02 00:07:44 +00:00
3bc24bacb3 docker plugin commandline reference
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6c1739b80d
Component: cli
2017-06-02 00:07:44 +00:00
17421ce296 Update bash completion for Docker 1.12 CLI commands
Signed-off-by: Mike Goelzer <mike.goelzer@docker.com>
Upstream-commit: ec66559999
Component: cli
2017-06-02 00:07:44 +00:00
6e77acb1af Allow user to specify container's link-local addresses
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 987e5e6d8a
Component: cli
2017-06-02 00:07:44 +00:00
da0bbb443c Add bash completion support for --runtime and --add-runtime
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 5a9cc4cea8
Component: cli
2017-06-02 00:07:44 +00:00
5f376bfeba Add missing completion for --config-file
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 48ae78b9b7
Component: cli
2017-06-02 00:07:44 +00:00
85311f09ff Add support for multiples runtimes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 090cf185cd
Component: cli
2017-06-02 00:07:44 +00:00
e1cb76e0ab surfacing Learn by example topics to top level of Docker Engine docs
fixing links after moving surfacing tutorials

fixing more links for the newly located tutorials

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Upstream-commit: d3b7a2779e
Component: cli
2017-06-02 00:07:43 +00:00
6ccacc5748 bash completion for docker daemon --live-restore
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b9997ebdee
Component: cli
2017-06-02 00:07:43 +00:00
7dc58a723a Fix syntax errors in bash-completion (Closes: #23483)
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
Upstream-commit: d965f30a15
Component: cli
2017-06-02 00:07:43 +00:00
15cc239caf CLI docs
Signed-off-by: Amit Shukla <amit.shukla@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 593ee1e29d
Component: cli
2017-06-02 00:07:43 +00:00
c24eccf886 Add --live-restore flag
This flags enables full support of daemonless containers in docker.  It
ensures that docker does not stop containers on shutdown or restore and
properly reconnects to the container when restarted.

This is not the default because of backwards compat but should be the
desired outcome for people running containers in prod.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: bfe4e46682
Component: cli
2017-06-02 00:07:43 +00:00
0f8e9c934d Add documentation for using overlay2
Add mention in dockerd command line and storage driver selection documentation.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e7fa3c6279
Component: cli
2017-06-02 00:07:43 +00:00
abc876a868 Added example for using image digest in the docker run command
Signed-off-by: Shoubhik Bose <sbose78@gmail.com>

Added explanation for the example with image's digest ( as per @thaJeztah 's comment

Signed-off-by: Shoubhik Bose <sbose78@gmail.com>

Wrapped to ~80 chars

Signed-off-by: Shoubhik Bose <sbose78@gmail.com>
Upstream-commit: 0a0bb19a33
Component: cli
2017-06-02 00:07:43 +00:00
f0770c9f78 Note about mountpoint being optional
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a68bdf0073
Component: cli
2017-06-02 00:07:43 +00:00
4be6122b74 Add zsh completion for 'docker run' healthcheck options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 716caef299
Component: cli
2017-06-02 00:07:43 +00:00
241823f132 Add link to Docker Hub.
* To make it consistent with similar references in other parts of document.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: a443697846
Component: cli
2017-06-02 00:07:43 +00:00
2192c65f15 typo in builder.md: its => it's
Signed-off-by: Kevin Burke <kev@inburke.com>
Upstream-commit: 26fdf31cf8
Component: cli
2017-06-02 00:07:43 +00:00
e3b1e4f370 Add zsh completion for 'docker ps --filter=network'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f348cdda97
Component: cli
2017-06-02 00:07:43 +00:00
debed240da Add zsh completion for 'docker events --filter' values
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: a2fbaa24cb
Component: cli
2017-06-02 00:07:43 +00:00
e97184ff67 Add zsh completion for 'docker {create,run} --pid' values
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 27f2b96b70
Component: cli
2017-06-02 00:07:43 +00:00
ea73a02b5d docs: Add Azure File Storage Volume Driver plugin
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 02eead1a96
Component: cli
2017-06-02 00:07:43 +00:00
caa5df4827 re-doing Docker Engine overview topics for v.1.12
fixed broken links created from Engine Overview update by adding missing topic to daemon reference page and updating the hrefs in the api pages

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
Upstream-commit: 26e3227441
Component: cli
2017-06-02 00:07:42 +00:00
63c8910472 Fixing man page link
Signed-off-by: Andrew Po <absourd.noise@gmail.com>
Upstream-commit: 2d10f52d01
Component: cli
2017-06-02 00:07:42 +00:00
00ebf112dd docs/extend/plugins.md: add docker-volume-ploop
Added docker-volume-ploop driver to the list of available volume plugins.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Upstream-commit: 427f525b79
Component: cli
2017-06-02 00:07:42 +00:00
4042629924 Update docker-load documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 478055c89c
Component: cli
2017-06-02 00:07:42 +00:00
4b775a7c57 network docs cleanup
This fixes some Markup and formatting
issues in the network documentation;

- wrap text to 80 chars
- add missing language hints for code examples
- add missing line continuations (\)
- update USAGE output for Cobra

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb0afa7381
Component: cli
2017-06-02 00:07:42 +00:00
87d2e9ce6f bash completion for docker ps --filter network
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a15b94e1bc
Component: cli
2017-06-02 00:07:42 +00:00
6027bd0b49 add support for filtering by network ID
This adds support for filtering by network ID, to be
consistent with other filter options.

Note that only *full* matches are returned; this is
consistent with other filters (e.g. volume), that
also return full matches only.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 44cc95141e
Component: cli
2017-06-02 00:07:42 +00:00
e516832be1 Adding network filter to docker ps command
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Upstream-commit: eef6bd0b23
Component: cli
2017-06-02 00:07:42 +00:00
8a420459b7 man: mv config-json.5 to docker-config-json.5
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: aa8edfdb77
Component: cli
2017-06-02 00:07:42 +00:00
3425747a45 Deprecate /containers/(id or name)/copy endpoint
This endpoint has been deprecated since 1.8. Return an error starting
from this API version (1.24) in order to make sure it's not used for the
next API version and so that we can remove it some times later.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2c4b446f79
Component: cli
2017-06-02 00:07:42 +00:00
912aa358d8 Fix a couple of typos in the docs of docker attach
This fix fixed a couple of typos in the docs of `docker attach`:
docs/reference/commandline/attach.md
man/docker-attach.1.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7a63e88e36
Component: cli
2017-06-02 00:07:42 +00:00
0da04bb059 fix bash completion for dockerd with path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 83e27e1f93
Component: cli
2017-06-02 00:07:42 +00:00
744bf7d726 docs: correct network create command
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: d04810fa14
Component: cli
2017-06-02 00:07:42 +00:00
9eb0399671 Add zsh completion for 'docker search --limit'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 6842d97361
Component: cli
2017-06-02 00:07:42 +00:00
566295c027 Add support for volume scopes
This is similar to network scopes where a volume can either be `local`
or `global`. A `global` volume is one that exists across the entire
cluster where as a `local` volume exists on a single engine.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 13ef210b8b
Component: cli
2017-06-02 00:07:42 +00:00
0c227b6c3d Fix zsh completion
- List all containers on `docker rm -f`

Signed-off-by: Tianyi Wang <capkurmagati@gmail.com>
Upstream-commit: 6a41b34f89
Component: cli
2017-06-02 00:07:42 +00:00
843aab9e59 Fix a couple of typos in docker attach docs.
This fix fixes a couple of typos in docker attach docs:
docs/reference/commandline/attach.md
man/docker-attach.1.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e7ec7bbd33
Component: cli
2017-06-02 00:07:41 +00:00
26b15ab499 Deprecated the old 3-args form of docker import
It's been deprecated since November 2013 and v0.6.7. Removing the cli
side of it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a9c02ef939
Component: cli
2017-06-02 00:07:41 +00:00
be7f4808e1 bash completion for detach events
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2657fae67d
Component: cli
2017-06-02 00:07:41 +00:00
c1b5141a07 Builder default shell
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0cb3440a21
Component: cli
2017-06-02 00:07:41 +00:00
7291a7792b Healthcheck: set default retries to 3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7e00f19c4f
Component: cli
2017-06-02 00:07:41 +00:00
30ff620184 attach: replace interface with simple type
Also add docs to detach events

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 9c351e61c0
Component: cli
2017-06-02 00:07:41 +00:00
3e4d4aaf26 docs validation fixes
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: de82bb1c55
Component: cli
2017-06-02 00:07:41 +00:00
2db559a3cd bash completion for docker run healthcheck options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e116088cb2
Component: cli
2017-06-02 00:07:41 +00:00
792bba49eb bash completion for docker search --limit
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ae11c80580
Component: cli
2017-06-02 00:07:41 +00:00
c322bfeb22 Add missing links in deprecated.md doc.
This fix tries to address several issues in deprecated.md:
1. For deprecated and removal versions, some include link reference
to the release tag but some does not point to the release tag. This
fix adds the missing links as long as the version is <= 1.12.
2. Technically, 1.12 is not released yet so the link to 1.12 does
not exist yet. However, at the time 1.12 is released this
deprecated.md doc should have been part of the release as well.
There is a circular dependency. This fix adds 1.12 for now.
3. `HostConfig at API container start` has already been removed
by #22570 so this fix changes `Target For Removal In Release: v1.12`
to `Removed In Release: v1.12`.
4. `Docker search 'automated' and 'stars' options` has not been removed
yet so this fix changes `Removed In Release: v1.14` to
`Target For Removal In Release: v1.14`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 57b18d5474
Component: cli
2017-06-02 00:07:41 +00:00
385cc45453 Add --limit option to docker search
This fix tries to address the issue raised in #23055.
Currently `docker search` result caps at 25 and there is
no way to allow getting more results (if exist).

This fix adds the flag `--limit` so that it is possible
to return more results from the `docker search`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #23055.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 794db50fdf
Component: cli
2017-06-02 00:07:41 +00:00
8d1fcd5543 Add support for comment in .dockerignore
This fix tries to address the issue raised in #20083 where
comment is not supported in `.dockerignore`.

This fix updated the processing of `.dockerignore` so that any
lines starting with `#` are ignored, which is similiar to the
behavior of `.gitignore`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #20083.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1a22098ae2
Component: cli
2017-06-02 00:07:41 +00:00
e0d28370c7 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 54df0949b0
Component: cli
2017-06-02 00:07:41 +00:00
6e5c5dade0 Add documentation for running multiple daemons
Signed-off-by: Lukasz Zajaczkowski <lukasz.zajaczkowski@ts.fujitsu.com>
Upstream-commit: 25a9609845
Component: cli
2017-06-02 00:07:41 +00:00
4231660e73 Add support for user-defined healthchecks
This PR adds support for user-defined health-check probes for Docker
containers. It adds a `HEALTHCHECK` instruction to the Dockerfile syntax plus
some corresponding "docker run" options. It can be used with a restart policy
to automatically restart a container if the check fails.

The `HEALTHCHECK` instruction has two forms:

* `HEALTHCHECK [OPTIONS] CMD command` (check container health by running a command inside the container)
* `HEALTHCHECK NONE` (disable any healthcheck inherited from the base image)

The `HEALTHCHECK` instruction tells Docker how to test a container to check that
it is still working. This can detect cases such as a web server that is stuck in
an infinite loop and unable to handle new connections, even though the server
process is still running.

When a container has a healthcheck specified, it has a _health status_ in
addition to its normal status. This status is initially `starting`. Whenever a
health check passes, it becomes `healthy` (whatever state it was previously in).
After a certain number of consecutive failures, it becomes `unhealthy`.

The options that can appear before `CMD` are:

* `--interval=DURATION` (default: `30s`)
* `--timeout=DURATION` (default: `30s`)
* `--retries=N` (default: `1`)

The health check will first run **interval** seconds after the container is
started, and then again **interval** seconds after each previous check completes.

If a single run of the check takes longer than **timeout** seconds then the check
is considered to have failed.

It takes **retries** consecutive failures of the health check for the container
to be considered `unhealthy`.

There can only be one `HEALTHCHECK` instruction in a Dockerfile. If you list
more than one then only the last `HEALTHCHECK` will take effect.

The command after the `CMD` keyword can be either a shell command (e.g. `HEALTHCHECK
CMD /bin/check-running`) or an _exec_ array (as with other Dockerfile commands;
see e.g. `ENTRYPOINT` for details).

The command's exit status indicates the health status of the container.
The possible values are:

- 0: success - the container is healthy and ready for use
- 1: unhealthy - the container is not working correctly
- 2: starting - the container is not ready for use yet, but is working correctly

If the probe returns 2 ("starting") when the container has already moved out of the
"starting" state then it is treated as "unhealthy" instead.

For example, to check every five minutes or so that a web-server is able to
serve the site's main page within three seconds:

    HEALTHCHECK --interval=5m --timeout=3s \
      CMD curl -f http://localhost/ || exit 1

To help debug failing probes, any output text (UTF-8 encoded) that the command writes
on stdout or stderr will be stored in the health status and can be queried with
`docker inspect`. Such output should be kept short (only the first 4096 bytes
are stored currently).

When the health status of a container changes, a `health_status` event is
generated with the new status. The health status is also displayed in the
`docker ps` output.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 51ddea93a2
Component: cli
2017-06-02 00:07:41 +00:00
efcaa93549 Add VMware Docker Volume Plugin.
Add reference to https://github.com/vmware/docker-volume-vsphere to Docker's list of plugins.
This is an officially supported plugin from VMware.

Signed-off-by: Ritesh H Shukla <sritesh@vmware.com>
Upstream-commit: cceb74311b
Component: cli
2017-06-02 00:07:41 +00:00
c09e06b359 Remove deprecated -f flag on docker tag
The -f flag on docker tag has been deprecated in docker 1.10 and
is expected to be removed in docker 1.12.

This fix removed the -f flag on docker tag and also updated
deprecated.md.

NOTE: A separate pull request for engine-api has been opened to
cover the related changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4a87769a80
Component: cli
2017-06-02 00:07:41 +00:00
c99db19fc7 Add the DRBD Docker Volume Plugin to the documentation
Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
Upstream-commit: 263f9666cf
Component: cli
2017-06-02 00:07:40 +00:00
d249416261 bash completion for dockerd
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3417ef2b0c
Component: cli
2017-06-02 00:07:40 +00:00
78aa7129e4 Un-deprecated command line short variant options of -c.
Since 1.9, the following short variant options have been
deprecated in favor of their long variants:
`docker run -c (--cpu-shares)`
`docker build -c (--cpu-shares)`
`docker create -c (--cpu-shares)`
`docker update -c (--cpu-shares)`

However, `-c` is still widely used and is considered as
a convenient option for swarm (see #16271).

This fix undeprecated the command line short
variant options of `-c` and updated the deprecated.md.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d5a8d411ba
Component: cli
2017-06-02 00:07:40 +00:00
c82a97d01f Add powershell example and make linux build example consistent with other examples
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: b66fb42ff1
Component: cli
2017-06-02 00:07:40 +00:00
5ae8a7cfb6 Fix error in dockerd.md for incorrect cluster-store-opts example.
This fix fixes an error in documentation (dockerd.md). In the
example given by dockerd.md, the option `cluster-store-opts`
is assigned with an array but this option can only be assigned
as a map.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8aa59a76fe
Component: cli
2017-06-02 00:07:40 +00:00
db4fbae2ac Fix up stale links
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: f9d80051da
Component: cli
2017-06-02 00:07:40 +00:00
01a71c2f06 Remove DOCKER_HTTP_HOST_COMPAT env var
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 8f23647017
Component: cli
2017-06-02 00:07:40 +00:00
1b53e94231 Support platform file paths through escape
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1bc54f3466
Component: cli
2017-06-02 00:07:40 +00:00
01613a96f6 Add before and since filter to images
Add support for two now filter on the `images` command : `before` and
`since`. They work the same as the one on the `ps` command but for
images.

        $ docker images --filter before=myimage
        # display all images older than myimage
        $ docker images --filter since=myimage
        # display all images younger than myimage

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: aac0a3ee13
Component: cli
2017-06-02 00:07:40 +00:00
0aed609b4e bash completion for docker ps -f {before,since}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: dd83546376
Component: cli
2017-06-02 00:07:40 +00:00
711901f473 The option --add-host and --net=host should not be mutually exclusive.
This fix tries to address the issue raised in #21976 and allows
the options of `--add-host` and `--net=host` to work at the same time.

The documentation has been updated and additional tests have been
added to cover this change.

This fix fixes #21976.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d1aaf129f2
Component: cli
2017-06-02 00:07:40 +00:00
41d05e62cc The option --dns, --dns-search, --dns-opt and --net=host should not be mutually exclusive.
This fix tries to address the issue raised in #21976 and allows
the options of `--dns`, `--dns-search`, `--dns-opt` and `--net=host`
to work at the same time.

The documentation has been updated and additional tests have been
added to cover this change.

This fix fixes #21976.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f17fb53f53
Component: cli
2017-06-02 00:07:40 +00:00
129f3f5c31 Fix some mistakes in dockerd.md
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
Upstream-commit: 909fa15eb2
Component: cli
2017-06-02 00:07:40 +00:00
4b02458b0f bash completion for daemon events
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b4242ed63b
Component: cli
2017-06-02 00:07:40 +00:00
9eeb438b78 Clarification about 'docker build --build-arg'
See #22860

Signed-off-by: Nahum Shalman <nshalman@omniti.com>
Upstream-commit: b47dd5295d
Component: cli
2017-06-02 00:07:40 +00:00
1fc3ef1662 update docs/reference/commandline/cp.md
Close #22020

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: c27c6d1a4e
Component: cli
2017-06-02 00:07:40 +00:00
df98c4a7c2 Add filter for events emitted by docker daemon
This fix tries to cover the issue raised in #22463 by adding
filter for events emitted by docker daemon so that user could
utilize filter to receive events of interest.

Documentations have been updated for this fix.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d4d6b9689d
Component: cli
2017-06-02 00:07:39 +00:00
93a4d96e98 Emit events for docker daemon
This fix tries to cover the issue raised in #22463 by emitting
events for docker daemon so that user could be notified by
scenarios like config reload, etc.

This fix adds the `daemon reload`, and events for docker daemon.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 91466baa3f
Component: cli
2017-06-02 00:07:39 +00:00
1571188650 remove duplicated text
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 3cc96bb891
Component: cli
2017-06-02 00:07:39 +00:00
4f04cf5303 Document valid chars in image name and tag
- Add link to valid image name and tag formats in referenced files
- Per review comments, updated docs to remove reference to `USERNAME` and
`REGISTRYHOST`.
- Per review comment, removed links from man page.
- Per review comment, added and updated examples on `docker tag`

Signed-off-by: Subhajit Ghosh <isubuz.g@gmail.com>
Upstream-commit: 2f4d9eb6b1
Component: cli
2017-06-02 00:07:39 +00:00
148e87db2f Windows: Default to Hyper-V Containers on client
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6d54461bd8
Component: cli
2017-06-02 00:07:39 +00:00
65e7f0be80 Add zsh completion for 'docker images' filters
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 19318687b0
Component: cli
2017-06-02 00:07:39 +00:00
d9def6c55e Docs: JSON vs Shell clarification
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 560134b63a
Component: cli
2017-06-02 00:07:39 +00:00
d4a5222d09 Replace U+2018 and U+2019 with U+0027 in manpages
Signed-off-by: Christian Persson <saser@live.se>
Upstream-commit: 5367c2a4aa
Component: cli
2017-06-02 00:07:39 +00:00
5f272b899b Add a --filter option to docker search
The filtering is made server-side, and the following filters are
supported:

* is-official (boolean)
* is-automated (boolean)
* has-stars (integer)

Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 52d265fff9
Component: cli
2017-06-02 00:07:39 +00:00
db8fde32b9 Remove MLS example from SELinux example in run reference
Automatic translation of MLS labels is currently not
supported, so should not be documented as an example.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 563b5dab54
Component: cli
2017-06-02 00:07:39 +00:00
8cac76883e Align default seccomp profile with selected capabilities
Currently the default seccomp profile is fixed. This changes it
so that it varies depending on the Linux capabilities selected with
the --cap-add and --cap-drop options. Without this, if a user adds
privileges, eg to allow ptrace with --cap-add sys_ptrace then still
cannot actually use ptrace as it is still blocked by seccomp, so
they will probably disable seccomp or use --privileged. With this
change the syscalls that are needed for the capability are also
allowed by the seccomp profile based on the selected capabilities.

While this patch makes it easier to do things with for example
cap_sys_admin enabled, as it will now allow creating new namespaces
and use of mount, it still allows less than --cap-add cap_sys_admin
--security-opt seccomp:unconfined would have previously. It is not
recommended that users run containers with cap_sys_admin as this does
give full access to the host machine.

It also cleans up some architecture specific system calls to be
only selected when needed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: ba8f5cfbb8
Component: cli
2017-06-02 00:07:39 +00:00
f5463e5779 Ignore invalid host header between go1.6 and old docker clients
BenchmarkWithHack-4	   50000	     37082 ns/op	  44.50
MB/s	    1920 B/op	      30 allocs/op
BenchmarkNoHack-4  	   50000	     30829 ns/op	  53.52
MB/s	       0 B/op	       0 allocs/op

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 09be3c1129
Component: cli
2017-06-02 00:07:39 +00:00
53b32800ef Add support for --pid=container:<id>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 637048e176
Component: cli
2017-06-02 00:07:39 +00:00
054edd1ac8 doc:proxy-setting info added in pull cmd.
Replace Note with a new secion, reduce characters in
per line in 80. Add statement suggested by
https://github.com/thaJeztah

Signed-off-by: Lin Lu <doraalin@163.com>
Upstream-commit: ff7d6e1eb8
Component: cli
2017-06-02 00:07:39 +00:00
57ab66add6 Update 'run' command doc for better readability
Signed-off-by: Mansi Nahar <mansi.nahar@macbookpro-mansinahar.local>
Upstream-commit: cd04941f04
Component: cli
2017-06-02 00:07:39 +00:00
59c0c9f251 Fix typo in zsh completion
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 73aeffd68e
Component: cli
2017-06-02 00:07:39 +00:00
1c7bebe986 update URL for docker-volume-netshare
Signed-off-by: Jeremy Unruh <jeremybunruh@gmail.com>
Upstream-commit: a1cbc5a168
Component: cli
2017-06-02 00:07:38 +00:00
86dd626e01 remove double "using" in reference attach docs
Signed-off-by: Ivan Grcic <igrcic@gmail.com>
Upstream-commit: 062cca7b19
Component: cli
2017-06-02 00:07:38 +00:00
52be616162 Update deprecated docs for LXC built-in exec driver
The LXC built-in exec driver has been deprecated in 1.8 and
further removed in 1.10, yet in deprecated.md it still shows:
```
Target For Removal In Release: v1.10
```

This fix changes the above to `Removed In Release:`.

In addition, lxc-conf flag and API fields have already been
removed in 1.10 as well so the related description has also been
updated in this fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 14b82790df
Component: cli
2017-06-02 00:07:38 +00:00
996690e64c Add zsh completion for 'docker network ls --filter label'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: d1668b28ec
Component: cli
2017-06-02 00:07:38 +00:00
a701956fa9 Add zsh completion for 'docker daemon --max-concurrent-downloads --max-concurrent-uploads'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 5b848ce0e4
Component: cli
2017-06-02 00:07:38 +00:00
bb8a61a5de Add zsh completion for 'docker logs --details'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 9eca8d95c0
Component: cli
2017-06-02 00:07:38 +00:00
d1c631b863 Fix error for env variables example in docker reference
Signed-off-by: Charles Law <claw@conduce.com>
Upstream-commit: cf70da5d08
Component: cli
2017-06-02 00:07:38 +00:00
5673931769 bash completion for docker logs --details
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 68e71057ed
Component: cli
2017-06-02 00:07:38 +00:00
9d62063902 bash completion for docker daemon --max-concurrent-{down,up}load
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: df62e269a1
Component: cli
2017-06-02 00:07:38 +00:00
eedc044fb5 Add the swapMemorySupport requirement to OOM tests
Add the swapMemorySupport requirement to all tests related to the OOM killer.  The --memory option has the subtle side effect of defaulting --memory-swap to double the value of --memory.  The OOM killer doesn't kick in until the container exhausts memory+swap, and so without the memory swap cgroup the tests will timeout due to swap being effectively unlimited.

Document the default behavior of --memory-swap in the docker run man page.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Upstream-commit: ab42b091ee
Component: cli
2017-06-02 00:07:38 +00:00
76cdf99f52 docs: Remove RequestStatusCode
The requests doesn't include RequestStatusCode field.

Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
Upstream-commit: 0d227954c5
Component: cli
2017-06-02 00:07:38 +00:00
c80f87b0c8 Docker pull/push with max concurrency limits.
This fix tries to address issues raised in #20936 and #22443
where `docker pull` or `docker push` fails because of the
concurrent connection failing.
Currently, the number of maximum concurrent connections is
controlled by `maxDownloadConcurrency` and `maxUploadConcurrency`
which are hardcoded to 3 and 5 respectively. Therefore, in
situations where network connections don't support multiple
downloads/uploads, failures may encounter for `docker push`
or `docker pull`.

This fix tries changes `maxDownloadConcurrency` and
`maxUploadConcurrency` to adjustable by passing
`--max-concurrent-uploads` and `--max-concurrent-downloads` to
`docker daemon` command.

The documentation related to docker daemon has been updated.

Additional test case have been added to cover the changes in this fix.

This fix fixes #20936. This fix fixes #22443.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9bc4cd536e
Component: cli
2017-06-02 00:07:38 +00:00
8d664da4dc Remove deprecated driver specific log tags
Since 1.9, driver specific log tag options
`syslog-tag`
`gelf-tag`
`fluentd-tag`
have been deprecated in favor of the generic tag
option which is standard across different logging
drivers.

This fix removed the deprecated driver specific
log tag options of `syslog-tag`, `gelf-tag`,
`fluentd-tag` for 1.12 and updated the docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7717d82d97
Component: cli
2017-06-02 00:07:38 +00:00
e811a0b92a Correct docs for a docker container's clean-up.
The 'Unix Signals' (https://en.wikipedia.org/wiki/Unix_signal#Handling_signals) wiki explains that:
> 'There are two signals which cannot be intercepted and handled: SIGKILL and SIGSTOP.'

Signed-off-by: kevinmeredith <kevin.m.meredith@gmail.com>
Upstream-commit: a8e16c0079
Component: cli
2017-06-02 00:07:38 +00:00
ef93f78e3e contrib/completion/bash/docker: _docker_docker: quoting __docker_to_extglob result to avoid failglob interference
Signed-off-by: Damien Nadé <github@livna.org>
Upstream-commit: 63d80a2ba8
Component: cli
2017-06-02 00:07:38 +00:00
4b8c7bcfa8 Update deprecated docs for cli flags removal.
The old command line options have been deprecated in 1.8.0 and
eventually removed in 1.10.0 through PR #17724, though the
deprecated.md still shows `Target For Removal In Release`.

This fix updates the deprecated.md and changes
`Target For Removal In Release` to `Removed In Release`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 386bda9aab
Component: cli
2017-06-02 00:07:38 +00:00
b7df376665 docs: clarify docker attach
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 47ae76fd08
Component: cli
2017-06-02 00:07:38 +00:00
7166962e48 Minor tense correction for deprecated docs
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: ba064bea20
Component: cli
2017-06-02 00:07:38 +00:00
7e1b46c8ff Remove deprecated Docker Content Trust ENV passphrase variables
Since 1.9, Docker Content Trust Offline key has been renamed to
Root key and the Tagging key has been renamed to Repository key.
The corresponding environment variables
`DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE`
`DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE`
have also been deprecated and renamed to
`DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE`
`DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE`

This fix removed the deprecated ENV passphrase variables for
1.12 and updated the docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e1242ed726
Component: cli
2017-06-02 00:07:37 +00:00
58bbf0ea70 Add the missing subtitle in deprecated docs for --security-opt.
The colon separator(`:`) of `--security-opt` flag was deprecated
in 1.11.0. However, the subtitle in deprecated docs is missing
so it is placed under the same subtitle as the deprecated `-e` and
`--email` flags.

This fix adds the missing subtitle in deprecated docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cf0f0c3927
Component: cli
2017-06-02 00:07:37 +00:00
bfdafc4b57 Add support for reading logs extra attrs
The jsonlog logger currently allows specifying envs and labels that
should be propagated to the log message, however there has been no way
to read that back.

This adds a new API option to enable inserting these attrs back to the
log reader.

With timestamps, this looks like so:
```
92016-04-08T15:28:09.835913720Z foo=bar,hello=world hello
```

The extra attrs are comma separated before the log message but after
timestamps.

Without timestaps it looks like so:
```
foo=bar,hello=world hello
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ce224853a2
Component: cli
2017-06-02 00:07:37 +00:00
6777871c09 from inheritted to inherited
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: d16947629c
Component: cli
2017-06-02 00:07:37 +00:00
cceee7b8c8 When calling volume driver Mount, send opaque ID
This generates an ID string for calls to Mount/Unmount, allowing drivers
to differentiate between two callers of `Mount` and `Unmount`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e1265df404
Component: cli
2017-06-02 00:07:37 +00:00
abbc88dfa4 Add disk quota support for btrfs
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Upstream-commit: f440f14613
Component: cli
2017-06-02 00:07:37 +00:00
96321e2038 Remove unnecessary double-double quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: fe09131526
Component: cli
2017-06-02 00:07:37 +00:00
de3801535e Updated docker-info output and documentation
- [x] Update man page description
- [x] Update man page sample output to something more current

Tested with: `TESTFLAGS='-check.f DockerSuite.TestInfoEnsureSucceeds*'
make test-integration-cli`

Signed-off-by: Lucas Chan <lucas-github@lucaschan.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0b4a6c36b7
Component: cli
2017-06-02 00:07:37 +00:00
07abec734c Update the docker daemon to dockerd for document
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: bdfe7963f2
Component: cli
2017-06-02 00:07:37 +00:00
6992aebe3b Remove response modification sections from authorization design doc
Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 3e48f4b4ab
Component: cli
2017-06-02 00:07:37 +00:00
4dfe07650b Make zsh completion work when ps output is custom
When `psFormat` is used in the docker client config json, if the output
is non-standard it breaks some of the completion handling for
containers.

This fixes that by ensuring that calls to `ps` use the default/standard
formatting by calling `docker ps --format 'table'`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8b38343e46
Component: cli
2017-06-02 00:07:37 +00:00
ef2cb7e662 remove "the" in docs.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 7d3bb7a6d0
Component: cli
2017-06-02 00:07:37 +00:00
c056ddf222 Add zsh completion for 'docker network ls -f driver'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: d3274f9217
Component: cli
2017-06-02 00:07:37 +00:00
b4c8e368ae Mention the fact that authz plugins are available today
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
Upstream-commit: 51e43d3bda
Component: cli
2017-06-02 00:07:37 +00:00
707ffcbec6 Add "driver" filter for network ls
This add a new filter to 'docker network ls'
to allow filtering by driver-name.

Contrary to "ID" and "name" filters, this
filter only supports an *exact* match.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: efff6c2b24
Component: cli
2017-06-02 00:07:37 +00:00
7f8253b462 Add zsh completion for 'docker network ls -f {id,name,type}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 586ec24a48
Component: cli
2017-06-02 00:07:37 +00:00
a1deb91f73 update cgroup link in doc of run
Signed-off-by: Hao Zhang <21521210@zju.edu.cn>
Upstream-commit: 64ba15e3a3
Component: cli
2017-06-02 00:07:37 +00:00
be3e4ea89d Add load/save image event support
For every docker load and save operations, it would log related
image events.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: c6d6752550
Component: cli
2017-06-02 00:07:36 +00:00
f31ede2d20 Add IO Resource Controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: bd299d2555
Component: cli
2017-06-02 00:07:36 +00:00
42d15d4fd3 Deprecated of docker ps since and before options for v1.12
Deprecated note https://github.com/docker/docker/blob/master/docs/deprecated.md#docker-ps-before-and-since-options

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 0da8f977cb
Component: cli
2017-06-02 00:07:36 +00:00
b337b8e4b2 docs: add note about MAC addresses not being unique
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d192f97acc
Component: cli
2017-06-02 00:07:36 +00:00
9707b8a83b add zsh completion for 'docker {build,create,run} --disable-content-trust'
Signed-off-by: Ke Xu <leonhartx.k@gmail.com>
Upstream-commit: 610c653172
Component: cli
2017-06-02 00:07:36 +00:00
511e7977ca The daemon.json storage-opts settings is actually a list.
Signed-off-by: Dimitry Andric <d.andric@activevideo.com>
Upstream-commit: 4b30db603b
Component: cli
2017-06-02 00:07:36 +00:00
30f948a78a Fix the old exit status example
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 6a5870dcfa
Component: cli
2017-06-02 00:07:36 +00:00
68109db091 docs: use tables for available plugins
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a24fe070bb
Component: cli
2017-06-02 00:07:36 +00:00
37e2a78c94 Fix asa
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: ddf0b9e873
Component: cli
2017-06-02 00:07:36 +00:00
62c5807ea0 Add network label filter support
This patch did following:

1) Make filter check logic same as `docker ps ` filters

Right now docker container logic work as following:
when same filter used like below:
 -f name=jack -f name=tom
it would get all containers name is jack or tom(it is or logic)

when different filter used like below:

 -f name=jack -f id=7d1
it would get all containers name is jack and id contains 7d1(it is and logic)

It would make sense in many user cases, but it did lack of compliate filter cases,
like "I want to get containers name is jack or id=7d1", it could work around use
(get id=7d1 containers' name and get name=jack containers, and then construct the
final containers, they could be done in user side use shell or rest API)

2) Fix one network filter bug which could include duplicate result
when use -f name=  -f id=, it would get duplicate results

3) Make id filter same as container id filter, which means match any string.
not use prefix match.

It is for consistent match logic

Closes: #21417

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 0a8f5574b4
Component: cli
2017-06-02 00:07:36 +00:00
5be6b52698 Add the NetApp Docker Volume Plugin to the documentation
Signed-off-by: Jared Hocutt <jaredh@netapp.com>
Upstream-commit: f10add47fa
Component: cli
2017-06-02 00:07:36 +00:00
04e48fba41 Allow volume drivers to provide a Status field
The `Status` field is a `map[string]interface{}` which allows the driver to pass
back low-level details about the underlying volume.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a84e11aaf8
Component: cli
2017-06-02 00:07:36 +00:00
beb5aa8115 Add CPU count and maximum resource controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 31e123d314
Component: cli
2017-06-02 00:07:36 +00:00
71d548cb3c Graphdriver docs (#22003)
* Fix closing strings in graphdriver plugin documentation

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Fix documenation for Err type in graphdriver plugins

Fix https://github.com/docker/go-plugins-helpers/issues/24

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Add missing MountLabel argument in graphdriver plugin documentation

The real `Create` seems also to take more arguments (the `storageOpt`) which
are not exposed to the plugin API (yet?).

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Add missing CreateReadWrite in graphdriver plugin documentation

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
Upstream-commit: 9064b8e121
Component: cli
2017-06-02 00:07:36 +00:00
54794d1169 Add support for setting sysctls
This patch will allow users to specify namespace specific "kernel parameters"
for running inside of a container.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: a60c612a04
Component: cli
2017-06-02 00:07:36 +00:00
fe09bbc92b Fixes #21701 devicemapper docs
Copy edit the content
Updates to existing material
Adding mbentley's comments
Updating with last minute comments
Update with Seb's comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 8850c4ab6e
Component: cli
2017-06-02 00:07:36 +00:00
591f4efdfb Improve build cache miss doc for ARG and RUN
The documentation already says the cache miss happens only at `ARG`
variable usage, not declaration, but there is a very common implicit
usage: `RUN`, which this commit documents even more, improving on #21790.

Also, use `definition` instead of `declaration`: it's the same thing, and
`definition` is already used in this documentation, contrary to
`declaration`.

Also, distinguish between "instructions" and "variables defined by `ARG`
instructions".

Signed-off-by: Thomas Riccardi <riccardi@systran.fr>
Upstream-commit: 6ded7e8279
Component: cli
2017-06-02 00:07:36 +00:00
3ccbcc5dad Add zsh completion for 'docker volume ls -f {dangling,driver,name}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 8feaef5740
Component: cli
2017-06-02 00:07:35 +00:00
8414cf936a Add zsh completion for '--log-opt syslog-format=rfc5424micro'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 6d7b352715
Component: cli
2017-06-02 00:07:35 +00:00
e7ce49e80a Add zsh completion for '--log-opt syslog-format'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b7f5138adb
Component: cli
2017-06-02 00:07:35 +00:00
041fee8d08 Fix errata; s/RequestUri/ReqestURI/
Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
Upstream-commit: cf2670b8ba
Component: cli
2017-06-02 00:07:35 +00:00
e42b395800 Change HumanSize to BytesSize for memory output in docker stats.
This fix tries to fix the discrepancy between `docker stats` and
`docker run` where `docker run` uses RAMInBytes for all memory
related inputs but `docker stats` uses HumanSize for all memory
related outputs.

To be consistent, `docker stats` needs to use BytesSize for all
memory related outputs to conform to RAMInBytes in `docker run`.

This fix addresses this issue. As BytesSize is used, the test
cases needs to be adjusted to match `KiB/MiB/GiB` instead of
`KB/MB/GB`.

The documentation has also been updated.

This fix fixes #21765.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e450a54119
Component: cli
2017-06-02 00:07:35 +00:00
17377f39e1 bash completion for docker volume ls -f {driver,name}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3b1ae8bbd6
Component: cli
2017-06-02 00:07:35 +00:00
d6110c8d2a bash completion for --log-opt syslog-format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 35bad4a914
Component: cli
2017-06-02 00:07:35 +00:00
98d650bc65 Fix the docker image --no-trunk output format
docker 1.10 change the output format of image id.

Signed-off-by: hyzhou.zhy <hyzhou.zhy@alibaba-inc.com>
Upstream-commit: d4aad85092
Component: cli
2017-06-02 00:07:35 +00:00
f2eeb16b6e Fix deprecated format for security-opt
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: a8a29fe7f5
Component: cli
2017-06-02 00:07:35 +00:00
6663c658c8 Fix incorrect markdown rendering
The docker document site [1] rendered the list of plugin implements
incorrectly.

[1]: https://docs.docker.com/engine/extend/plugin_api

Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
Upstream-commit: 70f932f268
Component: cli
2017-06-02 00:07:35 +00:00
546f96b8fb Correct the description of --group-add in run.md
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 42dfcc1d2a
Component: cli
2017-06-02 00:07:35 +00:00
4f10a582f9 make the cache miss clear
Signed-off-by: mikelinjie <294893458@qq.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bc060f1f19
Component: cli
2017-06-02 00:07:35 +00:00
fba2a6ea8a Use 'null' instead of 'nil' for json
When describe json response, 'null' is better than 'nil' which is not in
json specification.

Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
Upstream-commit: b394f05fee
Component: cli
2017-06-02 00:07:35 +00:00
addfd813d1 Add insecure registries to docker info
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: 5f02c0a5ab
Component: cli
2017-06-02 00:07:35 +00:00
15ba8e7ac8 documentation: adding gce-docker plugin to plugins.md
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Upstream-commit: 643715ee74
Component: cli
2017-06-02 00:07:35 +00:00
0448b1ed08 1.change validateNoSchema into validateNoScheme
2.change schema into scheme in docs and some annotations.

Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: b45ed4a79d
Component: cli
2017-06-02 00:07:35 +00:00
680aa3cbb2 Add short description about default authentication method in authorization docs
Following the discussion in #21556, adding a short description of the
default user authentication mechanism (without requiring authentication
plugins)
Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 1db38dfe21
Component: cli
2017-06-02 00:07:35 +00:00
80aebaf272 Un-deprecate auto-creation of host directories for mounts
Auto-creation of host-directories was marked deprecated in
Docker 1.9, but was decided to be too much of an backward-incompatible
change, so it was decided to keep the feature.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a13b2a1ce
Component: cli
2017-06-02 00:07:35 +00:00
1c18e6b80e bash completion for docker history --human
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e2491d2a7e
Component: cli
2017-06-02 00:07:35 +00:00
8463c7f1fe When using systemd, pass expected cgroupsPath and cli options to runc.
runc expects a systemd cgroupsPath to be in slice:scopePrefix:containerName
format and the "--systemd-cgroup" option to be set. Update docker accordingly.

Fixes 21475

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 31c32956ca
Component: cli
2017-06-02 00:07:34 +00:00
ee21393db0 bash completion for docker {run,create} --security-opt no-new-privileges
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 327d937bf0
Component: cli
2017-06-02 00:07:34 +00:00
1ecce45345 bash completions: Improve consistency for options with default=true
Completion of these options was not handled consistently.
Now all such options immediatly complete with =false appended.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 77c0ed6344
Component: cli
2017-06-02 00:07:34 +00:00
01d602c5a8 Mention "docker login" in push/pull documentation
It was suggested to me that documentation for "docker pull" and "docker
push" should reference "docker login", to make clearer how to specify
credentials for a push or pull operation. Add a note to the manual pages
and reference documentation explaining how registry credentials are
managed.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 5161f2dc15
Component: cli
2017-06-02 00:07:34 +00:00
1fbb3cd771 docs for docker daemon --containerd
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 85f983178b
Component: cli
2017-06-02 00:07:34 +00:00
249636cb54 Add man change for volume filter
It was forgetton to add change in man for new-added volume filters.
This change adds that.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 3f15ba3bdf
Component: cli
2017-06-02 00:07:34 +00:00
0e925ee13f CLI flag for docker create(run) to change block device size.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 791a5fc5c1
Component: cli
2017-06-02 00:07:34 +00:00
6f538753fe fix wrong option name in dm.min_free_space examples
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 52ccec4cbc
Component: cli
2017-06-02 00:07:34 +00:00
0f4cae7392 bash completion for storage option dm.min_free_space
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7eb597c63d
Component: cli
2017-06-02 00:07:34 +00:00
5a0476d383 bash completion for docker {run,create} --userns
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e338af7123
Component: cli
2017-06-02 00:07:34 +00:00
2a26bafd95 Add zsh completion for 'docker {create,run} --userns'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 2a3935e24a
Component: cli
2017-06-02 00:07:34 +00:00
4aaefb9c53 fix bash completion for docker run --security-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 062454975a
Component: cli
2017-06-02 00:07:34 +00:00
0d85d15fef Add zsh completion for 'docker daemon --containerd'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 043b5f05ed
Component: cli
2017-06-02 00:07:34 +00:00
74852d795a bash completion for docker daemon --containerd
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f56848dc6b
Component: cli
2017-06-02 00:07:34 +00:00
c3d7937744 Add zsh completion for gelf-compression log driver options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: cfaba16a9b
Component: cli
2017-06-02 00:07:34 +00:00
0a70fe7330 Add zsh completion for 'docker ps --filter' values
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: bcdfbb8156
Component: cli
2017-06-02 00:07:34 +00:00
6dfa3b0e4f Add zsh completion for etwlogs and gcplogs log drivers
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f52489ec85
Component: cli
2017-06-02 00:07:33 +00:00
d4e880ce61 Add zsh completion for journald tag opt
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4972d8b64d
Component: cli
2017-06-02 00:07:33 +00:00
5795c31399 Add zsh completion for 'docker update --restart'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 68b1453a68
Component: cli
2017-06-02 00:07:33 +00:00
11f575cdab Add zsh completion for 'docker {pull,push} --disable-content-trust'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: dc9d859c15
Component: cli
2017-06-02 00:07:33 +00:00
373b75803a Added 2nd experimental feature currently active
Signed-off-by: Robin Naundorf <r.naundorf@fh-muenster.de>
Upstream-commit: 722207f722
Component: cli
2017-06-02 00:07:33 +00:00
b9f2cd9466 Add zsh completion for 'docker {build, volume create, network create} --label'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: d020f4c6fd
Component: cli
2017-06-02 00:07:33 +00:00
759be19a3c docs for labels on build, networks and volumes
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f3f9b34d2a
Component: cli
2017-06-02 00:07:33 +00:00
1cb157a7f4 Add zsh completion for new fluentd log driver options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: ae33b5b00c
Component: cli
2017-06-02 00:07:33 +00:00
354ec8f508 Add zsh completion for 'docker load -q --quiet'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 8672ba42c0
Component: cli
2017-06-02 00:07:33 +00:00
5663079fbe bash completion for labels on build, networks and volumes
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a28d38cf69
Component: cli
2017-06-02 00:07:33 +00:00
9545c05aab bash completion for new fluentd log driver options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a11a350519
Component: cli
2017-06-02 00:07:33 +00:00
a851cff66d Add name/driver filter support for volume
This change include filter `name` and `driver`,
and also update related docs to reflect that filters usage.

Closes: #21243

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: d69044537c
Component: cli
2017-06-02 00:07:33 +00:00
4989b35bc8 add docs for docker load --quiet
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 386acc792b
Component: cli
2017-06-02 00:07:33 +00:00
5e037015a4 bash completion for docker load --quiet
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: beac16919a
Component: cli
2017-06-02 00:07:33 +00:00
22b62409de bash completion for docker ps -f volume
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4c125babf2
Component: cli
2017-06-02 00:07:33 +00:00
9f81de4a0d WORKDIR is like calling mkdir - but we've not told people
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 80f5ed58a5
Component: cli
2017-06-02 00:07:33 +00:00
952a037823 Remove unneeded references to execDriver
This includes:
 - updating the docs
 - removing dangling variables

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 4ffd1a9433
Component: cli
2017-06-02 00:07:33 +00:00
36ae54a3bd Allow net and IPC namespaces to be shared when userns=on
Now that the namespace sharing code via runc is vendored with the
containerd changes, we can disable the restrictions on container to
container net and IPC namespace sharing when the daemon has user
namespaces enabled.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 0926303632
Component: cli
2017-06-02 00:07:33 +00:00
c5e162c9a0 Add explicit flags for volume cp/no-cp
This allows a user to specify explicitly to enable
automatic copying of data from the container path to the volume path.
This does not change the default behavior of automatically copying, but
does allow a user to disable it at runtime.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: eba678647b
Component: cli
2017-06-02 00:07:32 +00:00
2e37809525 Update 'save' command help
Based on review feedback.

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
Upstream-commit: c0271978f9
Component: cli
2017-06-02 00:07:32 +00:00
09476ca3f7 Fix plural typo in 'save' command help
The form "Save an images" is not correct.
Either "Save an image" or "Save images" work, but since
the save commands accepts multiple images, I chose the
latter.

Fixed in all places where I could grep "Save an image(s)".

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
Upstream-commit: 315c34a25a
Component: cli
2017-06-02 00:07:32 +00:00
ef0f5fcc71 Move ZFS options to correct place in man page
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Upstream-commit: ffcfd1b39c
Component: cli
2017-06-02 00:07:32 +00:00
2c16b7b91d Updates to macvlan/ipvlan experimental docs
- Added a few more diagrams.
- Fixed typos and a few additional  details.
- Moved experimental images to a new directory
  in /experimental/images per @cpuguy83 suggestion.

Signed-off-by: Brent Salisbury <brent@docker.com>
Upstream-commit: 980e403319
Component: cli
2017-06-02 00:07:32 +00:00
557a7d00b2 Update plugin docs for the covering of remote plugins (#20188).
This fix updates the Plugin API docs to cover the case of remote
plugins which could be deployed on a host different from the
docker host, through spec or json files.

This fix closes #20188.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1f7e8ae84c
Component: cli
2017-06-02 00:07:32 +00:00
4728023c9a Consolidate security options to use = as separator.
All other options we have use `=` as separator, labels,
log configurations, graph configurations and so on.
We should be consistent and use `=` for the security
options too.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: a7364b3743
Component: cli
2017-06-02 00:07:32 +00:00
0b8f34921a Update the document error
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 7160fa70e3
Component: cli
2017-06-02 00:07:32 +00:00
54da3984d3 Fix documentation on --security-opt seccomp
Missing documentation and man pages on seccomp options.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 2d0316cb43
Component: cli
2017-06-02 00:07:32 +00:00
a81a386a03 Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: d219111855
Component: cli
2017-06-02 00:07:32 +00:00
66f76d6253 bash completion for gelf-compression log driver settings
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 84b7025d28
Component: cli
2017-06-02 00:07:32 +00:00
50dc38c159 Update Docker pull examples
The old examples no longer worked due to changes in
the client and Docker Hub.

This updates the "docker pull" documentation and
adds more examples and explanation of the features.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 75bcb4f94a
Component: cli
2017-06-02 00:07:32 +00:00
3f4a780a92 Allow --hostname with --net=host
Docker creates a UTS namespace by default, even with --net=host, so it
is reasonable to let the user set the hostname. Note that --hostname is
forbidden if the user specifies --uts=host.

Closes #12076
Signed-off-by: Jason Heiss <jheiss@aput.net>
Upstream-commit: 6bcb137d2f
Component: cli
2017-06-02 00:07:32 +00:00
b5c9faef54 Add the missed volume filter
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 2422bc30f5
Component: cli
2017-06-02 00:07:32 +00:00
542360c72a devmapper: Add a new option dm.min_free_space
Once thin pool gets full, bad things can happen. Especially in case of xfs
it is possible that xfs keeps on retrying IO infinitely (for certain kind
of IO) and container hangs. 

One way to mitigate the problem is that once thin pool is about to get full,
start failing some of the docker operations like pulling new images or
creation of new containers. That way user will get warning ahead of time
and can try to rectify it by creating more free space in thin pool. This
can be done either by deleting existing images/containers or by adding more
free space to thin pool.

This patch adds a new option dm.min_free_space to devicemapper graph
driver. Say one specifies dm.min_free_space=10%. This means atleast
10% of data and metadata blocks should be free in pool before new device
creation is allowed, otherwise operation will fail.

By default min_free_space is 10%. User can change it by specifying
dm.min_free_space=X% on command line. A value of 0% will disable the
check.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 8db4ee005a
Component: cli
2017-06-02 00:07:32 +00:00
79c6da7676 Run privileged containers when userns are specified
Following #19995 and #17409 this PR enables skipping userns re-mapping
when creating a container (or when executing a command). Thus, enabling
privileged containers running side by side with userns remapped
containers.

The feature is enabled by specifying ```--userns:host```, which will not
remapped the user if userns are applied. If this flag is not specified,
the existing behavior (which blocks specific privileged operation)
remains.

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: ce28fa45b0
Component: cli
2017-06-02 00:07:32 +00:00
399fb71df1 Add support for identity tokens in client credentials store
Update unit test and documentation to handle the new case where Username
is set to <token> to indicate an identity token is involved.

Change the "Password" field in communications with the credential helper
to "Secret" to make clear it has a more generic purpose.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b2b5bc9937
Component: cli
2017-06-02 00:07:31 +00:00
66ef34cb49 Include all endpoints in network inspect object
Prior to this change, the "docker network inspect" contains only the
endpoints that have active local container. This excludes all the remote
and stale endpoints. By including all the endpoints, it makes debugging
much simpler and also allows the user to cleanup any stale endpoints
using "docker network disconnect -f {network} {endpoint-name}".

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 2168c53ee9
Component: cli
2017-06-02 00:07:31 +00:00
9cd599d660 Fix the typo url and info
Some info is not consistent between context and word.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 6aae59673e
Component: cli
2017-06-02 00:07:31 +00:00
62ac1aebd5 docs for experimental vlan net drivers
Signed-off-by: Brent Salisbury <brent@docker.com>
Upstream-commit: 3362f6c8fd
Component: cli
2017-06-02 00:07:31 +00:00
57a969a5ef docs: fix broken links
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 4982947250
Component: cli
2017-06-02 00:07:31 +00:00
2b9f9a9ded docs: add $ before HOME
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: d437e32541
Component: cli
2017-06-02 00:07:31 +00:00
8ea73cf204 Move registry service options to the daemon configuration.
Allowing to set their values in the daemon configuration file.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 02a1c138d0
Component: cli
2017-06-02 00:07:31 +00:00
37b83412b1 Add a parent man page for docker volumes command
It is difficult to gather information about docker volumes command
without a parent man page.

This man page attempts to explain docker volumes and then references
the command man pages.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: b5c9713ee0
Component: cli
2017-06-02 00:07:31 +00:00
319a8d610c docs: extend: plugins: mention the sdk + systemd socket activation
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: b20a425cd9
Component: cli
2017-06-02 00:07:31 +00:00
5cd22cf4f4 pids limit support
update bash commpletion for pids limit

update check config for kernel

add docs for pids limit

add pids stats

add stats to docker client

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: fd1c2150ad
Component: cli
2017-06-02 00:07:31 +00:00
b21975d5e4 Add support for NoNewPrivileges in docker
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Add tests for no-new-privileges

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Update documentation for no-new-privileges

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: d3f632156e
Component: cli
2017-06-02 00:07:31 +00:00
ec368de391 cliconfig: credentials: set default for unix
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 8f095a76ab
Component: cli
2017-06-02 00:07:31 +00:00
b9c27d9079 Update links to Docker Hub
Updates links to Docker Hub with their new
URLs to prevent redirects.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 82fe889a6d
Component: cli
2017-06-02 00:07:31 +00:00
631d5c3dce Adds clarification to behavior of missing directories.
Closes #20920

Signed-off-by: Micah Zoltu <micah@zoltu.net>
Upstream-commit: 31e78dd369
Component: cli
2017-06-02 00:07:31 +00:00
6e0cdaf81e Support mount opts for local volume driver
Allows users to submit options similar to the `mount` command when
creating a volume with the `local` volume driver.

For example:

```go
$ docker volume create -d local --opt type=nfs --opt device=myNfsServer:/data --opt o=noatime,nosuid
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b1bac487a6
Component: cli
2017-06-02 00:07:31 +00:00
baf19381e9 Add CgroupDriver to docker info
Fixes: #19539

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 09f4e2e654
Component: cli
2017-06-02 00:07:31 +00:00
568347d926 docs: improve note for Fedora 22
Move the note more up, to prevent people from starting
the daemon with --userns-remap before touching the files.

Also clarify that these steps must be done *before* enabling
userns-remap and starting the daemon.

Also fixed some minor Markup formatting issues.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ecd12ef145
Component: cli
2017-06-02 00:07:31 +00:00
d6cab2c6e6 daemon/logger: Add logging driver for Google Cloud Logging
Signed-off-by: Mike Danese <mikedanese@google.com>
Upstream-commit: f18d114874
Component: cli
2017-06-02 00:07:30 +00:00
e48adcdd3b Remove some references to "register" through login
These were left-overs from the now deprecated
and removed functionality to registrer a new account
through "docker login"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6c61d29231
Component: cli
2017-06-02 00:07:30 +00:00
c3a57e2e2d Remove email address field from login
This removes the email prompt when you use docker login, and also removes the ability to register via the docker cli. Docker login, will strictly be used for logging into a registry server.

Signed-off-by: Ken Cochrane <kencochrane@gmail.com>
Upstream-commit: 317cfbd7bd
Component: cli
2017-06-02 00:07:30 +00:00
adb7e7e54a zsh: Reword some descriptions
Use of "Set ..." and "Specify ..." are removed in favor of directly
using nouns.

Also:

 - add description for `run --isolation`
 - reduce description of `run --shm-size`
 - fix `daemon --bip` argument handling

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: a305246793
Component: cli
2017-06-02 00:07:30 +00:00
a2a55aae3a Add docs for cgroup-parent of systemd cgroup
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 119605fc24
Component: cli
2017-06-02 00:07:30 +00:00
1375b2a2d7 Client credentials store.
This change implements communication with an external credentials store,
ala git-credential-helper. The client falls back the plain text store,
what we're currently using, if there is no remote store configured.

It shells out to helper program when a credential store is
configured. Those programs can be implemented with any language as long as they
follow the convention to pass arguments and information.

There is an implementation for the OS X keychain in https://github.com/calavera/docker-credential-helpers.
That package also provides basic structure to create other helpers.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 6ee9d8a187
Component: cli
2017-06-02 00:07:30 +00:00
6a4922373b Revert "resolve the config file from the sudo user"
This reverts commit afde6450ee7bd4a43765fdc0a9799b411276d9e4.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 4d6a232fc0
Component: cli
2017-06-02 00:07:30 +00:00
82d3f6a0e7 Remove experimental GraphDriver plugin type
Signed-off-by: Linus Heckemann <anonymouse2048@gmail.com>
Upstream-commit: acc094305b
Component: cli
2017-06-02 00:07:30 +00:00
f56098be86 Document interfaces a plugin can implement
Signed-off-by: Linus Heckemann <lheckemann@twig-world.com>
Upstream-commit: 54afb61288
Component: cli
2017-06-02 00:07:30 +00:00
9bd02d5271 Fix configuration reloading
There are five options 'debug' 'labels' 'cluster-store' 'cluster-store-opts'
and 'cluster-advertise' that can be reconfigured, configure any of these
options should not affect other options which may have configured in flags.
But this is not true, for example, I start a daemon with -D to enable the
debugging, and after a while, I want reconfigure the 'label', so I add a file
'/etc/docker/daemon.json' with content '"labels":["test"]' and send SIGHUP to daemon
to reconfigure the daemon, it work, but the debugging of the daemon is also diabled.
I don't think this is a expeted behaviour.
This patch also have some minor refactor of reconfiguration of cluster-advertiser.
Enable user to reconfigure cluster-advertiser without cluster-store in config file
since cluster-store could also be already set in flag, and we only want to reconfigure
the cluster-advertiser.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: a0399720ce
Component: cli
2017-06-02 00:07:30 +00:00
ee3bdc6ec8 resolve the config file from the sudo user
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: b610528a6a
Component: cli
2017-06-02 00:07:30 +00:00
b9e822f368 Add the Local Persist plugin
I wasn't 100% sure if it was appropriate to add plugin here, but @thaJeztah invited me to do so, so here it is!

(see https://github.com/CWSpear/local-persist/issues/17#issuecomment-188523784)

Signed-off-by: Cameron Spear <cameronspear@gmail.com>
Upstream-commit: aa86373f28
Component: cli
2017-06-02 00:07:30 +00:00
6f0d624b67 Fix some flaws in man.
Signed-off-by: Jian Zhang <zhangjian.fnst@cn.fujitsu.com>
Upstream-commit: d83df084d3
Component: cli
2017-06-02 00:07:30 +00:00
1b6340da4f Docs: add note about CMD and ENTRYPOINT commands
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: a429c0e84f
Component: cli
2017-06-02 00:07:30 +00:00
d8bb3883b7 docs: reference: commandline: daemon: fedora 23+ has mapping files
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 6f778ea663
Component: cli
2017-06-02 00:07:30 +00:00
0cab9f0212 Add mounts to docker ps.
- Allow to filter containers by volume with `--filter volume=name` and `filter volume=/dest`.
- Show their names in the list with the custom format `{{ .Mounts }}`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: beb7b68810
Component: cli
2017-06-02 00:07:30 +00:00
bdc79f4953 Update docs for enableipv6
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 543ca10394
Component: cli
2017-06-02 00:07:30 +00:00
eeeb997291 Fix some typos in comments and strings
Most of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Upstream-commit: fafe6f2ab2
Component: cli
2017-06-02 00:07:29 +00:00
f1741d42a2 Fix markdown style error in man page
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Upstream-commit: 06e3a6ccd0
Component: cli
2017-06-02 00:07:29 +00:00
eac9076057 bash completion for docker update --restart
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0649b4f517
Component: cli
2017-06-02 00:07:29 +00:00
d045389ec4 bash completion for etwlogs logging driver
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 50f87e458e
Component: cli
2017-06-02 00:07:29 +00:00
e0336b6126 fix storage driver options in man page
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Upstream-commit: fad60a834e
Component: cli
2017-06-02 00:07:29 +00:00
10a9db0b1e Update RestartPolicy of container
Add `--restart` flag for `update` command, so we can change restart
policy for a container no matter it's running or stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 623082a1eb
Component: cli
2017-06-02 00:07:29 +00:00
04cecc55f0 Fix some flaws in docs
Signed-off-by: Jian Zhang <zhangjian.fnst@cn.fujitsu.com>
Upstream-commit: 776757ac28
Component: cli
2017-06-02 00:07:29 +00:00
186b6cef41 Document .Names format placeholder in docker-ps man page, fixes #20503.
Signed-off-by: Andrew Macpherson <hopscotch23@gmail.com>
Upstream-commit: 7eed2da516
Component: cli
2017-06-02 00:07:29 +00:00
bfaf3d9e3b Invoke ReloadConfiguration on network controller
- It reverts fa163f5619bb01cabca1c21 plus a small change
  in order to allow passing the global scope datastore
  to libnetwork after damon boot.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 15eb38dfb1
Component: cli
2017-06-02 00:07:29 +00:00
730b2d4577 add a section to each volume page
Signed-off-by: ozlerhakan <hakan.ozler@kodcu.com>
Upstream-commit: 79a3c42030
Component: cli
2017-06-02 00:07:29 +00:00
a000a3819f Add docs for --ipv6 option, also add --internal as appropriate
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 65c94a34be
Component: cli
2017-06-02 00:07:29 +00:00
308f0791b6 Fix docs
Fix wrong descriptions in docs

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: c7b4d1c449
Component: cli
2017-06-02 00:07:29 +00:00
d33e3e6908 Windows: Add ETW logging driver plug-in
Signed-off-by: Cedric Davies <cedricda@microsoft.com>
Upstream-commit: 56965a4d1d
Component: cli
2017-06-02 00:07:29 +00:00
f04b25ded8 add missing trailing slash in ADD and COPY /absoluteDir examples. According to the specs they are mandatory.
Signed-off-by: Bastiaan Bakker <bbakker@xebia.com>
Upstream-commit: e56ee5769c
Component: cli
2017-06-02 00:07:29 +00:00
2188ff4c67 Expose docker's root directory by default as part of docker info.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
Upstream-commit: cb1279e542
Component: cli
2017-06-02 00:07:29 +00:00
33a365510e Fixing mismatched network name.
Using `my-net` to be consistent with:
https://docs.docker.com/engine/reference/run/

Signed-off-by: Robert Wallis <smilingrob@gmail.com>
Upstream-commit: 3969f77c86
Component: cli
2017-06-02 00:07:29 +00:00
a908d790e4 Fish completion lists all containers on "docker rm -f"
Signed-off-by: Frederik Nordahl Jul Sabroe <frederikns@gmail.com>
Upstream-commit: 483c30a698
Component: cli
2017-06-02 00:07:29 +00:00
db47f91e5b fix common misspell
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: c30d9d2fff
Component: cli
2017-06-02 00:07:28 +00:00
c2ad27ed2c update cap-add docs for seccomp
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 91d0d25ee4
Component: cli
2017-06-02 00:07:28 +00:00
6fd29bd537 Improve usage details on overriding USER command in Docker run reference page
Signed-off-by: Sian Lerk Lau <kiawin@gmail.com>
Upstream-commit: 7c85fb1665
Component: cli
2017-06-02 00:07:28 +00:00
23eff15228 Remove "--group-add dbus" from busybox example (no dbus group in busybox anymore)
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: a015293ff7
Component: cli
2017-06-02 00:07:28 +00:00
9b6cb9b5bf Before and since filters documentation
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: 680de96eb6
Component: cli
2017-06-02 00:07:28 +00:00
91152d96ef Make it clear that env vars must be simple
Closes #20169

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: a26c02199d
Component: cli
2017-06-02 00:07:28 +00:00
d6a19a45a1 Improve key specific bash subcompletions
The obscure `case "${words[$cword-2]}$prev=" in` idiom is no
longer used for key specific completions in options with map values.

The `__docker_map_key_of_current_option()` function does a much
better job.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fcad8ce206
Component: cli
2017-06-02 00:07:28 +00:00
7e815e8fc6 Check key specific bash subcompletions first
This is a refactoring in preparation of cleaning up the handling
of key specific subcompletions.

The new `__docker_map_key_of_current_option()` function will be used
instead of the `__docker_map_key_of_current_option()` idiom in the
following commit.
As this function is very specific, checks using it should be executed
before those checking for `$prev`.

This commit just moves the checks without any modification.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 904481becd
Component: cli
2017-06-02 00:07:28 +00:00
7a81734b88 Add Horcrux volume plugin to plugins.md
Signed-off-by: Muthukumar R <muthur@gmail.com>
Upstream-commit: a9dd907004
Component: cli
2017-06-02 00:07:28 +00:00
74f7c45aef Adding --format= flag
Signed-off-by: Evan Allrich <evan@unguku.com>
Upstream-commit: a33942adf2
Component: cli
2017-06-02 00:07:28 +00:00
6240dc18ff Fix mention of at sign in docs
The at sign (`@`) was being referred to in the documentation as an
ampersand (`&`).

Signed-off-by: Tom X. Tobin <tomxtobin@tomxtobin.com>
Upstream-commit: aa46699081
Component: cli
2017-06-02 00:07:28 +00:00
10582b810b Add missing debug client mode info in docs.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 505e1673d6
Component: cli
2017-06-02 00:07:28 +00:00
bc76a34c7e Fix typo in config-json man page
In the NAME section: "confg.json" -> "config.json"

Signed-off-by: Tom X. Tobin <tomxtobin@tomxtobin.com>
Upstream-commit: c1c6c3fe80
Component: cli
2017-06-02 00:07:28 +00:00
82f6dc84c6 Display internal flag on network inspect
Also adds internal network tests for bridge network

Signed-off-by: Chun Chen <ramichen@tencent.com>
Upstream-commit: 355a190423
Component: cli
2017-06-02 00:07:28 +00:00
c35b255fed Add some basic bash completion for seccomp values
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 3dd7289df6
Component: cli
2017-06-02 00:07:28 +00:00
c443e84179 Add Kuryr Network Plugin to the docs
Signed-off-by: Mohammad Banikazemi <mb@us.ibm.com>
Upstream-commit: bb1e32b5e1
Component: cli
2017-06-02 00:07:28 +00:00
2f5f29f216 Add powershell completion support
Initial version of powershell tab completion. It completes
commands and container names.

Signed-off-by: Sam Neirinck <sam@samneirinck.com>
Upstream-commit: 494ae5e825
Component: cli
2017-06-02 00:07:28 +00:00
70f2d6d348 Add note about legacy links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f367aeadf3
Component: cli
2017-06-02 00:07:28 +00:00
f8cf1bfde4 Correct old virtual size
In new content addressable model, image no longer
have virtual size column, it is now 'size'. So we
need to update related docs about them.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 361097ab17
Component: cli
2017-06-02 00:07:27 +00:00
c569643ac6 Allow disabling of colored Docker logs via daemon flag.
Signed-off-by: Vincent Woo <me@vincentwoo.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1a10df30ce
Component: cli
2017-06-02 00:07:27 +00:00
e4699e81d4 Add docker-volume-ipfs plugin to the list.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e8ba17c379
Component: cli
2017-06-02 00:07:27 +00:00
b900386f65 Added link to Quobyte's volume plugin.
Signed-off-by: Felix Hupfeld <felix@quobyte.com>
Upstream-commit: 17cba03948
Component: cli
2017-06-02 00:07:27 +00:00
qg
92d585ccb5 change 'host:port' to host:port
Signed-off-by: Gang Qiao <qiaohai8866@gmail.com>
Upstream-commit: 235927da80
Component: cli
2017-06-02 00:07:27 +00:00
38ad8ed13a Fix typo
Signed-off-by: Prayag Verma <prayag.verma@gmail.com>
Upstream-commit: 6f24713ba0
Component: cli
2017-06-02 00:07:27 +00:00
36955f026e Change container name to id as actual results
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 6a0e2f700a
Component: cli
2017-06-02 00:07:27 +00:00
4076bc780d update bash completions for push and pull
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 5420ca8cde
Component: cli
2017-06-02 00:07:27 +00:00
5a7e5302c6 Improve bash completion for users and groups
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 49347e571c
Component: cli
2017-06-02 00:07:27 +00:00
da0b87b3b6 bash completion for journald tag support
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 437b2748c2
Component: cli
2017-06-02 00:07:27 +00:00
bbab77622b docs: document options for default network driver
Fixes issue #18410

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 27686523be
Component: cli
2017-06-02 00:07:27 +00:00
ad22dd4523 Improve wording about re-assigning IP addresses
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Upstream-commit: c1c803cbe8
Component: cli
2017-06-02 00:07:27 +00:00
4649915bb4 Improve bash completion for docker volume ls -f dangling
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 5d1e84419a
Component: cli
2017-06-02 00:07:27 +00:00
0d0af7552d Let bash completion for docker network rm only complete custom networks
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0c473c9e9c
Component: cli
2017-06-02 00:07:27 +00:00
cce394556a Fix docs for tmpfs (pr 19688)
Underlying files are no longer copied to the tmpfs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d4fd7fd13b
Component: cli
2017-06-02 00:07:27 +00:00
05d835a2f9 Remove cluster storage advertise from reload.
Because libnetwork won't really send container information to the new
storage anyways.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 045907a71c
Component: cli
2017-06-02 00:07:27 +00:00
3990347652 Move tar copy-up for tmpfs mounts
We cannot rely on the tar command for this type of operation because tar
versions, flags, and functionality can very from distro to distro.
Since this is in the container execution path it is not safe to have
this as a dependency from dockers POV where the user cannot change the
fact that docker is adding these pre and post mount commands.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 9796beeedb
Component: cli
2017-06-02 00:07:26 +00:00
b82ff962b6 Creating Engine specific menu
Fixing the links
Updating with Seb's comments
Adding weight
Fixing the engine aliases
Updating after Arun pushed
Removing empty file

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 7910f01804
Component: cli
2017-06-02 00:07:26 +00:00
196808c668 Fix bash completion for docker volume ls --dangling=false.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0441148c7d
Component: cli
2017-06-02 00:07:26 +00:00
22f6c54f1d Add note about mount propagation on systemd
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 88fa05ccb4
Component: cli
2017-06-02 00:07:26 +00:00
cb662ca713 bash completion for docker daemon --userns-remap
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 645055b37d
Component: cli
2017-06-02 00:07:26 +00:00
7945d4aed1 Allow network configuration via daemon config file.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: d3f2c73453
Component: cli
2017-06-02 00:07:26 +00:00
ee198d09c4 On container rm, don't remove named mountpoints
This makes it so when calling `docker run --rm`, or `docker rm -v`, only
volumes specified without a name, e.g. `docker run -v /foo` instead of
`docker run -v awesome:/foo` are removed.

Note that all volumes are named, some are named by the user, some get a
generated name. This is specifically about how the volume was specified
on `run`, assuming that if the user specified it with a name they expect
it to persist after the container is cleaned up.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8de6a3fc71
Component: cli
2017-06-02 00:07:26 +00:00
17e906122a Add zsh completion for 'docker cp -L --follow-link'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 2e6cd43572
Component: cli
2017-06-02 00:07:26 +00:00
9e0a30c1e8 Add zsh completion for new 'docker daemon --log-opt syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify' options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 922fa19637
Component: cli
2017-06-02 00:07:26 +00:00
900f0830e2 Add zsh completion for new 'docker daemon --cluster-store-opt discovery.heartbeat discovery.ttl kv.path' options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f73b4335ff
Component: cli
2017-06-02 00:07:26 +00:00
a6cc17338a fix minor bash completion issue on OSX (compopt)
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f9a1ff0795
Component: cli
2017-06-02 00:07:26 +00:00
d60ff884b6 bash completion for syslog over TLS log driver
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: bdfbd1d9a6
Component: cli
2017-06-02 00:07:26 +00:00
ceb1b79744 bash completion for --cluster-store-opt kv.path discovery.{heartbeat,ttl}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d75f2e95a0
Component: cli
2017-06-02 00:07:26 +00:00
b26213077f remove zsh completion for docker tag -f
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d6d6954d61
Component: cli
2017-06-02 00:07:26 +00:00
e90086e143 remove bash completion for docker tag -f
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b50ca03b9a
Component: cli
2017-06-02 00:07:26 +00:00
c8e83c8fba bash completion for docker ps --filter status=dead
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 58013afb39
Component: cli
2017-06-02 00:07:26 +00:00
ca11a29225 bash completion for docker cp --follow-link
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4808cc1282
Component: cli
2017-06-02 00:07:26 +00:00
706dd47168 bash completion for docker images -f dangling=false
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b3bb4d45dd
Component: cli
2017-06-02 00:07:26 +00:00
e1b3e37e5c Correcting overlay -> bridge driver in run.md
Correcting `overlay` -> `bridge` driver in run.md to match the preceding paragraph.

Signed-off-by: Jasmine Hegman <jasmine@jhegman.com>
Upstream-commit: 6495ac0c5f
Component: cli
2017-06-02 00:07:25 +00:00
4980c17b3e Add some helper text for magical ADD
Closes: #15777

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: fc57c3a419
Component: cli
2017-06-02 00:07:25 +00:00
d714ffc62b Fixing missing certs article; consolidating security material
Entering comments from reviewers
Updating with Derek's comments
Fixing bad links reported by build

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 32e9c9434a
Component: cli
2017-06-02 00:07:25 +00:00
d58b556f06 Make TLSOptions and LogConfig embedded structs.
That way the configuration file becomes flag, without extra keys.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 2ac86ababf
Component: cli
2017-06-02 00:07:25 +00:00
e50b50b8db Verify that the configuration keys in the file are valid.
- Return an error if any of the keys don't match valid flags.
- Fix an issue ignoring merged values as named values.
- Fix tlsverify configuration key.
- Fix bug in mflag to avoid panics when one of the flag set doesn't have any flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9930f31f74
Component: cli
2017-06-02 00:07:25 +00:00
85afde8f54 fixed typo
Signed-off-by: Anton Polonskiy <anton.polonskiy@gmail.com>
Upstream-commit: b1fbfa3b04
Component: cli
2017-06-02 00:07:25 +00:00
c1658a5a29 Added dead to docs for docker ps -f status=...
It is possible to invoke `docker ps -f status=dead`, but the
documentation for docker-ps does not mention `dead` as a valid option.
This commit fixes that.

Signed-off-by: Kareem Khazem <karkhaz@karkhaz.com>
Upstream-commit: e62e6e8b07
Component: cli
2017-06-02 00:07:25 +00:00
bff99821a5 Refactor handling of key specific subcompletions
The currently used idiom for handling key specific subcompletions
did not work here: behind `docker event -f type=network `, the completion
of networks triggered. The expected behaviour is not to complete
anything here.

In order to limit the scope of the corresponding PR, the new idiom is
currently only used in `docker events --filter`.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 869890dfbd
Component: cli
2017-06-02 00:07:25 +00:00
8e4ce2fbca Support new events in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4e97e95cd8
Component: cli
2017-06-02 00:07:25 +00:00
e138f9a8f1 Fixed typo in "/etc/subUid"
Signed-off-by: Azat Khuziyakhmetov <shadow_uz@mail.ru>
Upstream-commit: 7e208ef5d0
Component: cli
2017-06-02 00:07:25 +00:00
03beec76f7 Fix comment about swap limit of docker update
The description "set `-1` to disable swap" is wrong, `build`,
`create` and `run` already fixed, we need to fix `update` as well.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: dd7ea45fae
Component: cli
2017-06-02 00:07:25 +00:00
4d93fd5be9 Refine the volume mount example
The path here should be absolute, else it would
deem it as volume name.

Also link to release page to contain static binary,
the old link not work, because it is just used to
install docker in os distro, it can not be used
as static binary directly.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 6c5013bc3c
Component: cli
2017-06-02 00:07:25 +00:00
f38d61744d Fix the typo in ps
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 35f4d67cfd
Component: cli
2017-06-02 00:07:25 +00:00
f7115b4f9c Fix the ulimit link
The old link not existed, we need fix it the right one.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 931232313c
Component: cli
2017-06-02 00:07:25 +00:00
7f51425d12 Fix commit wrong repository example
The old name is invalid in new repository name spec.
So we need to fix them.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 4ed29cad62
Component: cli
2017-06-02 00:07:25 +00:00
9ff6318b21 Add zsh completion for 'docker network connect --link'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: cc1695f363
Component: cli
2017-06-02 00:07:25 +00:00
50f0de6561 Add zsh completion for 'docker {network connect, create, run} --ip --ip6'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 0c21ceac7e
Component: cli
2017-06-02 00:07:25 +00:00
2faed079b3 Add zsh completion for 'docker network connect --alias' and 'docker {create, run} --net-alias'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b3b3392c97
Component: cli
2017-06-02 00:07:25 +00:00
e0b22a0cfd Add zsh completion for 'docker {attach,exec,run,start} --detach-keys'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 19f41be56b
Component: cli
2017-06-02 00:07:24 +00:00
4869557d7c Add zsh completion for 'docker network create --ipam-opt' + Reordering for better maintainability
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 7fe9c72a37
Component: cli
2017-06-02 00:07:24 +00:00
bcf3fbd598 Fix ulimit command form
The ulimit is builtin, so we need shell form to execute it.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 135fb7a665
Component: cli
2017-06-02 00:07:24 +00:00
f2921f48fb Fix add host device example
The example is not right in parameter, and also
one command is same as first one, it should be typo
before, we should use 'rw' as example for that.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 1af502f23d
Component: cli
2017-06-02 00:07:24 +00:00
3d871c06a7 Fix the privileged example
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 77ff4c9b7f
Component: cli
2017-06-02 00:07:24 +00:00
3a19e416a5 bash completion for container linking and aliasing
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 16c9a72852
Component: cli
2017-06-02 00:07:24 +00:00
bd29bc3d11 bash completion for docker network create --internal, --ipam-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 09809fe27e
Component: cli
2017-06-02 00:07:24 +00:00
7bb92bc7e2 Add zsh completion for 'docker network create --internal'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 6d32fd8763
Component: cli
2017-06-02 00:07:24 +00:00
a16f13f89f Modify zsh completion for connecting/disconnecting non-running containers to networks
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 78f33c4c2b
Component: cli
2017-06-02 00:07:24 +00:00
063315c429 Fixed typo in experimental/plugins_graphdriver.md
Signed-off-by: Collin Guarino <collin.guarino@gmail.com>
Upstream-commit: 9e760ec497
Component: cli
2017-06-02 00:07:24 +00:00
9481d536f7 Remove Pachyderm storage driver.
Signed-off-by: Joe Doliner <jdoliner@gmail.com>
Upstream-commit: 07d04dcea6
Component: cli
2017-06-02 00:07:24 +00:00
ebede0287e Add Subnets info for user-defined network
* If user doesn't specify the subnets to create a network, it will pick
  subnets from inside preferred pool. This PR aims to inspect these subnets info

* Add integration tests for docker inspect the subnets.

* docker-py project is already synchronized.

* jenkins checks depend on https://github.com/docker/docker-py/pull/888

Fixes issue #18626

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 9f64dc98bd
Component: cli
2017-06-02 00:07:24 +00:00
43dfce8417 Allow to set daemon and server configurations in a file.
Read configuration after flags making this the priority:

1- Apply configuration from file.
2- Apply configuration from flags.

Reload configuration when a signal is received, USR2 in Linux:

- Reload router if the debug configuration changes.
- Reload daemon labels.
- Reload cluster discovery.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ad43730d0f
Component: cli
2017-06-02 00:07:24 +00:00
58f644a5d3 WIP: Update security docs for seccomp/apparmor
Signed-off-by: Mary Anthony <mary@docker.com>

Updaing and slight re-arrangement of security information

Signed-off-by: Mary Anthony <mary@docker.com>

Updating security files

Signed-off-by: Mary Anthony <mary@docker.com>

Updating links to the security documentation

Signed-off-by: Mary Anthony <mary@docker.com>

removing some extra spaces

Signed-off-by: Mary Anthony <mary@docker.com>

Correcting spelling

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: bb94c5077c
Component: cli
2017-06-02 00:07:24 +00:00
89105f6e4c Document that detach keys are a list of key bindings
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 775e7a02a3
Component: cli
2017-06-02 00:07:24 +00:00
d9137eb323 bash completion for --detach-keys
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: de6da285a3
Component: cli
2017-06-02 00:07:24 +00:00
6fb9fe70ad Add IPAM Config Options to match libnetwork
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
Upstream-commit: 82e9cba6d4
Component: cli
2017-06-02 00:07:24 +00:00
732a628e72 Network scoped alias support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 46db31de0a
Component: cli
2017-06-02 00:07:24 +00:00
e1a131a6cc Add network ID to container inspect
Fixes issue #19089

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: ea995dd3ba
Component: cli
2017-06-02 00:07:23 +00:00
b9b85d551f Forced endpoint cleanup
docker's network disconnect api now supports `Force` option which can be
used to force cleanup an endpoint from any host in the cluster.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: e686b4d8be
Component: cli
2017-06-02 00:07:23 +00:00
0570aaed74 Add missing documentation for static IP options
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: d3aa590eec
Component: cli
2017-06-02 00:07:23 +00:00
4e0c23bead daemon option (--storage-opt dm.basesize) for increasing the base device size on daemon restart
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 1e83a27ca1
Component: cli
2017-06-02 00:07:23 +00:00
a73814be6f Rename authz to authorization for greater clarity
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 7f6a7ed8d1
Component: cli
2017-06-02 00:07:23 +00:00
03fa76c2d2 Add network interal mode
Signed-off-by: Chun Chen <ramichen@tencent.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3f5817fdae
Component: cli
2017-06-02 00:07:23 +00:00
387a498ba3 bash completion for connecting non-running containers to networks
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9c8b6e05a4
Component: cli
2017-06-02 00:07:23 +00:00
1996d937de Added additional container information to "docker info".
Instead of just showing the number of containers this patch will
show the number of running, paused and stopped containers as well.

Signed-off-by: Kim Eik <kim@heldig.org>
(cherry picked from commit a9804ab1cb117a132cbf460067d55f5146d50956)
Upstream-commit: 22aaf42a84
Component: cli
2017-06-02 00:07:23 +00:00
26855c6072 Docs update for link functionality in user-defined networks
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: bf03439e68
Component: cli
2017-06-02 00:07:23 +00:00
335f1d6145 Prune digest references when deleting by tag
When pulling an image with content trust enabled, two references are
created: a digest reference and a tag reference. Deleting by tag
wouldn't actually remove the image, because the digest reference keeps
it alive.

This change modifies the rmi logic so that digest references don't keep
an image alive. If the last tag referencing a given image is deleted,
any digest references to it will be removed as well, so the image can
actually get deleted. This fixes the usability problem with deletions
when content trust is in use, so something like "docker pull busybox;
docker rmi busybox" will work as expected.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 442cbbfac1
Component: cli
2017-06-02 00:07:23 +00:00
4680c89426 Add zsh completion for 'docker daemon --userns-remap'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 66cb79eb98
Component: cli
2017-06-02 00:07:23 +00:00
4c752f535e Add daemon documentation on user namespaces feature
Remove the experimental docs for user namespaces and add similar content
to the `docker daemon` command documentation.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 36960be45f
Component: cli
2017-06-02 00:07:23 +00:00
d48486e53f Add docker network connect/disconnect to non-running container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: b5843f62f8
Component: cli
2017-06-02 00:07:23 +00:00
20429a2b3a Fix ambassador script based on SvenDowideit/dockerfiles#37
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 5142d3a669
Component: cli
2017-06-02 00:07:23 +00:00
0ef899dd2d Add zsh completion for 'docker {build,create,run} --isolation'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 97d56a6cd8
Component: cli
2017-06-02 00:07:23 +00:00
cc265bc249 Add zsh completion for 'docker {build,create,run} --shm-size
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 323f35256b
Component: cli
2017-06-02 00:07:23 +00:00
3d71c1c6de Add zsh completion for 'docker {create,run,update} --memory-reservation'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: c7b9b776ad
Component: cli
2017-06-02 00:07:23 +00:00
c723655c6c Add zsh completion for 'docker update' + refactoring of common options between 'build', 'create', 'run', 'update'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: a8e9d1e263
Component: cli
2017-06-02 00:07:23 +00:00
8599a275e8 bash completion for docker {build,create,run} --shm-size
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: caa120d3ca
Component: cli
2017-06-02 00:07:22 +00:00
3ed7f4e30c Before that change, etcd and zookeeper would fail to instantiate
the discovery without the key being already there in the store or
created beforehand and implicitely by a 'swarm join'.

Signed-off-by: Alexandre Beslic <abronan@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>

This PR allows to configure the discovery path using the
--discovery-opt flag (with "kv.path=path/to/nodes"). We
can point to "docker/nodes" and use the docker discovery.

If docker instances are advertising to the cluster using
the `--cluster-advertise` flag, the swarm join command
becomes unnecessary.

Signed-off-by: Alexandre Beslic <abronan@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 06f084a8ec
Component: cli
2017-06-02 00:07:22 +00:00
6778fba09c Allow user to choose the IP address for the container
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 0a3c040a07
Component: cli
2017-06-02 00:07:22 +00:00
25b77d7797 man page fix: remove -e/--exec-drive=native related description
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: fcd2860045
Component: cli
2017-06-02 00:07:22 +00:00
c04863fa82 Choose default-cgroup parent by cgroup driver
It's "/docker" for cgroupfs and "system.slice" for systemd.

Fix #19140

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6a6c99d7fe
Component: cli
2017-06-02 00:07:22 +00:00
c4420f7568 Add docs for volume plugin ls/get
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f06e5cb692
Component: cli
2017-06-02 00:07:22 +00:00
79867c6e60 bash completion for docker update
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: effe34067f
Component: cli
2017-06-02 00:07:22 +00:00
4e1591323a Updated docs for consolidated list of REX-Ray providers
This commit includes the correct project link and also
includes a consolidated list of drivers that are supported.

Signed-off-by: Clinton Kitson <clintonskitson@gmail.com>
Upstream-commit: 2ea504510c
Component: cli
2017-06-02 00:07:22 +00:00
97f4d44222 bash completion for docker daemon --cgroup-parent
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3b7695959d
Component: cli
2017-06-02 00:07:22 +00:00
1b6d288f2e bash completion for --isolation
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 442d408fc7
Component: cli
2017-06-02 00:07:22 +00:00
f8de85734f docs: add note to volume-plugins
The /var/lib/docker directory is reserved for
docker, and should not be touched by plugins.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d8f50e5dd1
Component: cli
2017-06-02 00:07:22 +00:00
3b64be09f1 Add zsh completion for 'docker daemon --cgroup-parent'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b65475f61a
Component: cli
2017-06-02 00:07:22 +00:00
c4bdac84f8 Add ability to set cgroup parent for all containers
Fix #18022

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 61295a1ec8
Component: cli
2017-06-02 00:07:22 +00:00
009feff794 Add filter by event type and documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 5e85f62dbc
Component: cli
2017-06-02 00:07:22 +00:00
a8ec34a0cc Fix pid=host example in documentation
The existing example didn't illustrate how to
install strace in the container. In addition,
the rhel7 image used is no longer public (and maintained)
so not a good image to use in the example.

This updates the example to use htop (strace is
not working without disabling apparmor for the container)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 31ad32c879
Component: cli
2017-06-02 00:07:22 +00:00
7c4710c371 Implement configurable detach key
Implement configurable detach keys (for `attach`, exec`, `run` and
`start`) using the client-side configuration

- Adds a `--detach-keys` flag to `attach`, `exec`, `run` and `start`
  commands.
- Adds a new configuration field (in `~/.docker/config.json`) to
  configure the default escape keys for docker client.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 18eb9f2e64
Component: cli
2017-06-02 00:07:22 +00:00
a9559666fc Creating a man page for the configuration file
Signed-off-by: Mary Anthony <mary@docker.com>

Adding comments. Fixing bit in daemon

Signed-off-by: Mary Anthony <mary@docker.com>

Arrrgggh

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 351710a2bb
Component: cli
2017-06-02 00:07:22 +00:00
dbf53e1491 Improvement for docker subcommand's help messages
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 636ffcc028
Component: cli
2017-06-02 00:07:22 +00:00
635afa8762 Compute plugin list in bash completion for docker daemon --authz-plugin
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9a63a5cdd6
Component: cli
2017-06-02 00:07:21 +00:00
640cd614ed Update integration tests when container and image have same name
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 6bfda2dbbc
Component: cli
2017-06-02 00:07:21 +00:00
587a8700a0 Fix docs for memory-swap
Fixes: #18894

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: b87dd1342f
Component: cli
2017-06-02 00:07:21 +00:00
4377e8e7da Fix typo in daemon storage-driver docs
Signed-off-by: Thomas Swift <tgs242@gmail.com>
Upstream-commit: 2d406c4058
Component: cli
2017-06-02 00:07:21 +00:00
c7196f1df6 bash completion for docker network ls --filter
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c8195c7cd5
Component: cli
2017-06-02 00:07:21 +00:00
79fb54f431 Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 3f44418168
Component: cli
2017-06-02 00:07:21 +00:00
001436e214 remove =false from options that default to false in the docs
This re-aligns the docs with what the cmd line now does.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 421578fbd4
Component: cli
2017-06-02 00:07:21 +00:00
ba1c78537a Add filter for network ls to hide predefined net
Add filter support for `network ls` to hide predefined network,
then user can use "docker network rm `docker network ls -f type=custom`"
to delete a bundle of userdefined networks.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: ed4cf608e2
Component: cli
2017-06-02 00:07:21 +00:00
6751d5384e remove --format from bash completion for docker network rm
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a36ca600a0
Component: cli
2017-06-02 00:07:21 +00:00
9d5a5ba719 Update link for Weave Net plugin docs
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
Upstream-commit: c8ba44360f
Component: cli
2017-06-02 00:07:21 +00:00
318570eaba Better function names in bash completion
The new names make it easier to distinguish between helper functions and
functions that actually perform completion by modifying the global COMPOPT
variable.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c227b6ac11
Component: cli
2017-06-02 00:07:21 +00:00
7b918f92d1 Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 499d634f32
Component: cli
2017-06-02 00:07:21 +00:00
94dadfbef1 Use computed plugin lists in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 57a8c59820
Component: cli
2017-06-02 00:07:21 +00:00
736589dc45 Add --format support to images command
- rename `api/client/ps` to `api/client/formatter`
- add a a image formatter

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1e3c5bbe15
Component: cli
2017-06-02 00:07:21 +00:00
00547ff6cf Change the quiet flag behavior in the build command
Right now, the quiet (-q, --quiet) flag ignores the output
generated from within the container.

However, it ought to be quiet in a way that all kind
of diagnostic output should be ignored, unless the build
process fails.

This patch makes the quiet flag behave in the following way:
 1. If the build process succeeds, stdout contains the image ID
    and stderr is empty.
 2. If the build process fails, stdout is empty and stderr
    has the error message and the diagnostic output of that process.

If the quiet flag is not set, then everything goes to stdout
and error messages, if there are any, go to stderr.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: fbb25d42f0
Component: cli
2017-06-02 00:07:21 +00:00
45d5c529e5 Update restart description
add a note around restart policies only working in detached mode

Signed-off-by: Aidan Feldman <aidan.feldman@gmail.com>

Update restart description with Mary's comments.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4620840d57
Component: cli
2017-06-02 00:07:21 +00:00
ddaab301eb docs: userguide: labels-custom-metadsata.md: update syntax for emtpy value labels
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 8008a57ffb
Component: cli
2017-06-02 00:07:21 +00:00
6bc3ef36d5 Explain 'json' function a bit better
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Upstream-commit: 1b77149fd4
Component: cli
2017-06-02 00:07:20 +00:00
0224aaea75 docs: extend: authorization.md: add a note about confidential stuff in Err
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e5b94ba3ef
Component: cli
2017-06-02 00:07:20 +00:00
898c408fdb authZ: more fixes
- fix naming and formatting
- provide more context when erroring auth
- do not capitalize errors
- fix wrong documentation
- remove ugly remoteError{}

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: d00b518979
Component: cli
2017-06-02 00:07:20 +00:00
32503bfb53 Fix typo error and update index
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 752b902123
Component: cli
2017-06-02 00:07:20 +00:00
033ad3c0cc pkg: authorization: add Err to tweak response status code
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e79f2fcc21
Component: cli
2017-06-02 00:07:20 +00:00
dcace8d27d Add a DOCKER_API_VERSION env var
Closes: #11486

Just for @ahmetalpbalkan  :-)

Fixed some comment formatting too while in there.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 8b3b2571d7
Component: cli
2017-06-02 00:07:20 +00:00
f4d9e49a60 Updated REX-Ray plugin platform support.
REX-Ray added Google Compute Engine support: https://github.com/emccode/rexray/issues/113

Signed-off-by: Ray Tsang <rayt@google.com>
Upstream-commit: 5e6c121c37
Component: cli
2017-06-02 00:07:20 +00:00
fdbc2abdeb docs: extend: plugins_volume.md: Err default to empty string
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 5ea58b57cb
Component: cli
2017-06-02 00:07:20 +00:00
d0accd62d9 Add capability to specify mount propagation per volume
Allow passing mount propagation option shared, slave, or private as volume
property.

For example.
docker run -ti -v /root/mnt-source:/root/mnt-dest:slave fedora bash

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: b2cbaa03af
Component: cli
2017-06-02 00:07:20 +00:00
84aa7c81c3 bash completion for docker daemon --authz-plugin
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9339b4abb5
Component: cli
2017-06-02 00:07:20 +00:00
70ce8f415c Fix small missing equal sign for 'docker daemon --cluster-store-opt'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: c54cb6f490
Component: cli
2017-06-02 00:07:20 +00:00
6ec23a0705 Add zsh completion for 'docker daemon --authz-plugin'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 1df420553c
Component: cli
2017-06-02 00:07:20 +00:00
1c4c464a30 Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: b91f98d9f1
Component: cli
2017-06-02 00:07:20 +00:00
cf2cd0632d Change authz plugin argument name
Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 53c1cb81c0
Component: cli
2017-06-02 00:07:20 +00:00
4c35bc9676 Fixing documentation comments by @thaJeztah
Signed-off-by: Dima Stopel <dima@twistlock.com>
Upstream-commit: a8a3c47ee5
Component: cli
2017-06-02 00:07:20 +00:00
dfdc43d2c4 Fixing documentation according to comments by @moxiegirl and @thaJeztah
Signed-off-by: Dima Stopel <dima@twistlock.com>
Upstream-commit: 00962f362b
Component: cli
2017-06-02 00:07:20 +00:00
075414f1ae Docker authorization plug-in infrastructure enables extending the functionality of the Docker daemon with respect to user authorization. The infrastructure enables registering a set of external authorization plug-in. Each plug-in receives information about the user and the request and decides whether to allow or deny the request. Only in case all plug-ins allow accessing the resource the access is granted.
Each plug-in operates as a separate service, and registers with Docker
through general (plug-ins API)
[https://blog.docker.com/2015/06/extending-docker-with-plugins/]. No
Docker daemon recompilation is required in order to add / remove an
authentication plug-in. Each plug-in is notified twice for each
operation: 1) before the operation is performed and, 2) before the
response is returned to the client. The plug-ins can modify the response
that is returned to the client.

The authorization depends on the authorization effort that takes place
in parallel [https://github.com/docker/docker/issues/13697].

This is the official issue of the authorization effort:
https://github.com/docker/docker/issues/14674

(Here)[https://github.com/rhatdan/docker-rbac] you can find an open
document that discusses a default RBAC plug-in for Docker.

Signed-off-by: Liron Levin <liron@twistlock.com>
Added container create flow test and extended the verification for ps
Upstream-commit: 67d3265c4b
Component: cli
2017-06-02 00:07:20 +00:00
83692c5c04 Adding authorization subsystem documentation
Signed-off-by: Dima Stopel <dima@twistlock.com>
Upstream-commit: 87f1223216
Component: cli
2017-06-02 00:07:20 +00:00
60efabba8f Update docs for addition of transfer manager
Closing the HTTP connection requesting a push or pull will cancel the
push or pull. This behavior also applies to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: fa96356872
Component: cli
2017-06-02 00:07:19 +00:00
d617c7385c Check minimum kernel memory limit to be 4M
Fixes: #18405

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: d9278dd4a8
Component: cli
2017-06-02 00:07:19 +00:00
5dd1c0387f The docs now explain that images with repo:tag as <none>:<none> are dangling images.
Signed-off-by: Sambuddha Basu <sambuddhabasu1@gmail.com>
Upstream-commit: 93ce6fd9f5
Component: cli
2017-06-02 00:07:19 +00:00
562373192d Improve bash completion for docker network disconnect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b4a012656c
Component: cli
2017-06-02 00:07:19 +00:00
d3e37fa710 docs: markdown and textual fixups in reference/run.md
This fixes markdown formatting, and formatting of tables;

 - Our markdown engine doesn't support spanning rows, so
   re-wrapped table contents.
 - Added a CSS-styles to prevent "code" blocks in tables
   from wrapping
 - The "logging drivers" table didn't have a header
 - Aligned table borders in source code for better readability.
 - Standardize on using `-it` in stead of -i -t or -ti
 - Some markup issues
 - Some minor textual fixups

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7071c15b5f
Component: cli
2017-06-02 00:07:19 +00:00
a356fd2640 update bash completion for seccomp
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: ac40ecf711
Component: cli
2017-06-02 00:07:19 +00:00
f15205a41d newtork -> network (minor spelling correction)
...yeah, that was bugging me. :)

Signed-off-by: Chris Weyl <cweyl@alumni.drew.edu>
Upstream-commit: 66eef79e58
Component: cli
2017-06-02 00:07:19 +00:00
8c726d1e3f Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 9480c4763d
Component: cli
2017-06-02 00:07:19 +00:00
d72d6e7f0b docs: fix weight-deivce option args
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 7880dcf5f2
Component: cli
2017-06-02 00:07:19 +00:00
3701e83b63 Add format flag to network inspect
…for consistency as docker inspect and docker volume inspect supports it too

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c6162061d9
Component: cli
2017-06-02 00:07:19 +00:00
131de84a7e Address review comments.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c5f725e1c7
Component: cli
2017-06-02 00:07:19 +00:00
d37fd961d4 Add docs and man page entry for --volume-driver
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 22ce4b4448
Component: cli
2017-06-02 00:07:19 +00:00
372ae86505 Add NETWORK_NAME_or_ID value for --net= option
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: deae0706ea
Component: cli
2017-06-02 00:07:19 +00:00
bb03409926 update order and address review notes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 178a2cfe7c
Component: cli
2017-06-02 00:07:19 +00:00
476932a722 add examples in search.md
Signed-off-by: gwx296173 <gaojing3@huawei.com>
Upstream-commit: 01c09480dc
Component: cli
2017-06-02 00:07:19 +00:00
98ddc49784 Add OomScoreAdj to configure container oom killer preferences
libcontainer v0.0.4 introduces setting `/proc/self/oom_score_adj` to
better tune oom killing preferences for container process. This patch
simply integrates OomScoreAdj libcontainer's config option and adjust
the cli with this new option.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e9287cd43a
Component: cli
2017-06-02 00:07:19 +00:00
16c00f11eb This patch adds --tmpfs as a option for mounting tmpfs on directories
It will Tar up contents of child directory onto tmpfs if mounted over

This patch will use the new PreMount and PostMount hooks to "tar"
up the contents of the base image on top of tmpfs mount points.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 65120e8851
Component: cli
2017-06-02 00:07:18 +00:00
6e75b48631 Improvement of docker top Man Page
Some users expect that the `docker top $CONT` command displays information from the inside container perspective.
They expect that the `docker top $CONT` command displays same information as the `docker exec $CONT ps -ef` command. But it does not.

That's why the `docker top` man page shall explicitly state that the `docker top $CONT` displays information from the host's point of view.

Signed-off-by: Pavel Pospisil <pospispa@gmail.com>
Upstream-commit: 70efcb00b4
Component: cli
2017-06-02 00:07:18 +00:00
317ce91965 Deprecate -f flag from docker tag
Closes #9798

@maintainers please note that this is a change to the UX. We no longer
require the -f flag on `docker tag` to move a tag from an existing image.
However, this does make us more consistent across our commands,
see https://github.com/docker/docker/issues/9798 for the history.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ecfc3613b2
Component: cli
2017-06-02 00:07:18 +00:00
00c64032bc Add docs for option --isolation
Add docs for `run`/`create`/`build` command option `isolation`

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 67eea4d814
Component: cli
2017-06-02 00:07:18 +00:00
1ce2809f7f Make discovery ttl and heartbeat configurable
Docker daemon uses kv-store as the host-discovery backend.
Discovery module tracks the liveness of a node through a simple
keepalive mechanism.  The keepalive mechanism depends on every
node performing heartbeat by registering itself with the discovery
module (via KV-Store Put operation). And for every Put operation,
the discovery module in all other nodes will receive a Watch
notification. That keeps the node alive.
Any node that fails to register itself within the TTL timer is
considered dead and removed from the discovery database.

The default timer (heartbeat = 20 seconds & ttl = 60 seconds)
works fine for small clusters.  But for large clusters, these
default timers are extremely aggressive and that causes high CPU
& most of the processing is spent managing the node discovery
and that impacts normal daemon operation.

Hence we need a way to make the discovery ttl and heartbeat
configurable.  As the cluster size grows, the user can change
these timers to make sure the daemon scales.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: c072458308
Component: cli
2017-06-02 00:07:18 +00:00
38c7b31652 Fixing the volume options doc
Fixes #15896
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 4fbaeb5f25
Component: cli
2017-06-02 00:07:18 +00:00
a0e62d215b docs: fixups for plugin drivers in docker info
Plugin drivers were added to docker info in
https://github.com/docker/docker/pull/17300

but not added to the example output in the online
docs.

Also fixed mixed tabs/spaces in the API documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 41afe87367
Component: cli
2017-06-02 00:07:18 +00:00
dc34f6ee69 Fixed broken links, and updated some to https
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 0f6787a636
Component: cli
2017-06-02 00:07:18 +00:00
10ae101c34 Add more to tag's -f flag's help
Was noticed in #9798

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: a7eb9308d5
Component: cli
2017-06-02 00:07:18 +00:00
e3edcc1609 Add API change to docs
Add API change description to docs due to `docker network inspect`
returns different data structure.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 87ba148cab
Component: cli
2017-06-02 00:07:18 +00:00
6be47e4a6c Add some docs about build-arg's impact on the cache
Closes #18017

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ec3aa7ede2
Component: cli
2017-06-02 00:07:18 +00:00
c1135453ba Enhance docker network rm to delete multi net
This commit enhance `docker network rm` command to allow user to delete
multi networks at the same time.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 007df1d494
Component: cli
2017-06-02 00:07:18 +00:00
6d7ca0ef19 Fixes found by docs validation tool
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: d63c19c4ea
Component: cli
2017-06-02 00:07:18 +00:00
3b49273779 Add '-L' option for cp
Fixes #16555

Original docker `cp` always copy symbol link itself instead of target,
now we provide '-L' option to allow docker to follow symbol link to real
target.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 92d0c4bc45
Component: cli
2017-06-02 00:07:18 +00:00
6dc1204713 modifying docker --since and --until to support nanoseconds and time zones
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Upstream-commit: 0eb79491dd
Component: cli
2017-06-02 00:07:18 +00:00
c182950c75 Re-implement --before and --since as options for --filter
* This commit will mark --before and --since as deprecated, but leave their behavior
  unchanged until they are removed, then re-implement them as options for --filter.

* And update the related docs.

* Update the integration tests.

Fixes issue #17716

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 562c2df97d
Component: cli
2017-06-02 00:07:18 +00:00
4000ade31b Addition of "--shm-size" to which size of /dev/shm is changed.
- Optional "--shm-size=" was added to the sub-command(run, create,and build).
- The size of /dev/shm in the container can be changed
  when container is made.
- Being able to specify is a numerical value that applies number,
  b, k, m, and g.
- The default value is 64MB, when this option is not set.
- It deals with both native and lxc drivers.

Signed-off-by: NIWA Hideyuki <niwa.hiedyuki@jp.fujitsu.com>
Upstream-commit: fa2f024bc6
Component: cli
2017-06-02 00:07:18 +00:00
928e9e0c9a Small changes to storage driver/commands ref
Entering V's comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: cd4fc83dd1
Component: cli
2017-06-02 00:07:17 +00:00
fd7016c7a6 Use fs cgroups by default
Our implementation of systemd cgroups is mixture of systemd api and
plain filesystem api. It's hard to keep it up to date with systemd and
it already contains some nasty bugs with new versions. Ideally it should
be replaced with some daemon flag which will allow to set parent systemd
slice.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 941952972e
Component: cli
2017-06-02 00:07:17 +00:00
01bd0ad8c4 Fix a small typo in volume_inspect.md
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3317b8b16d
Component: cli
2017-06-02 00:07:17 +00:00
786163b516 zsh: ensure we have enough commands to store in the cache
Otherwise, the cache would be invalid and won't be refreshed soon. This
can happen when the user has the completion installed before docker is
installed.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 00ea341609
Component: cli
2017-06-02 00:07:17 +00:00
7ec7373309 zsh: remove lxc-related completion
LXC support has been deprecated and the related completion has been
removed in #17700 but was added back in #17334.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 7eac998e7d
Component: cli
2017-06-02 00:07:17 +00:00
8e9e9a12e6 Add zsh completion for log options
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 2788cfa614
Component: cli
2017-06-02 00:07:17 +00:00
9c2296cf9c Add pkg/parsers/architecture and pkg/platform
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8ab8a0f3c5
Component: cli
2017-06-02 00:07:17 +00:00
e68ca3e6e8 /info: Add keys Architecture, OSType
- introduces Swarm-relevant keys, see #13634
  - docs updated

Signed-off-by: Olle Jonsson <olle.jonsson@gmail.com>
Upstream-commit: 1de6fda301
Component: cli
2017-06-02 00:07:17 +00:00
b13bcd56d3 Relabel BTRFS Content on container Creation
This change will allow us to run SELinux in a container with
BTRFS back end.  We continue to work on fixing the kernel/BTRFS
but this change will allow SELinux Security separation on BTRFS.

It basically relabels the content on container creation.

Just relabling -init directory in BTRFS use case. Everything looks like it
works. I don't believe tar/achive stores the SELinux labels, so we are good
as far as docker commit.

Tested Speed on startup with BTRFS on top of loopback directory. BTRFS
not on loopback should get even better perfomance on startup time.  The
more inodes inside of the container image will increase the relabel time.

This patch will give people who care more about security the option of
runnin BTRFS with SELinux.  Those who don't want to take the slow down
can disable SELinux either in individual containers or for all containers
by continuing to disable SELinux in the daemon.

Without relabel:

> time docker run --security-opt label:disable fedora echo test
test

real    0m0.918s
user    0m0.009s
sys    0m0.026s

With Relabel

test

real    0m1.942s
user    0m0.007s
sys    0m0.030s

Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 212fe5f2d0
Component: cli
2017-06-02 00:07:17 +00:00
c6c59e87c6 Supported added for reterving Plugin list for Network and Volume.
Also, plugin information in docker info output.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Upstream-commit: b1287de07b
Component: cli
2017-06-02 00:07:17 +00:00
d75645ebf8 Allow configurable metadata for Splunk log driver
Add support of `tag`, `env` and `labels` for Splunk logging driver.
Removed from message `containerId` as it is the same as `tag`.

Signed-off-by: Denis Gladkikh <denis@gladkikh.email>
Upstream-commit: a148373062
Component: cli
2017-06-02 00:07:17 +00:00
3f98c82117 fix doc
Signed-off-by: Zhang Kun <zkazure@gmail.com>

fix doc

Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: e71bd977cf
Component: cli
2017-06-02 00:07:17 +00:00
1b35ef26d9 bash completion for docker {run,create} --volume-driver
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d998542977
Component: cli
2017-06-02 00:07:17 +00:00
5f568c0605 Support multi-dir wildcards in .dockerignore
Closes #13113

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 4978171903
Component: cli
2017-06-02 00:07:17 +00:00
6d94a558c9 Add Weave Network Plugin to docs/extend/plugins.md
Signed-off-by: pidster <pid@pidster.com>
Upstream-commit: 564b68091e
Component: cli
2017-06-02 00:07:17 +00:00
3804fbd740 Add support for blkio.weight_device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: e303d6cc9f
Component: cli
2017-06-02 00:07:17 +00:00
29e36723a8 docker-login man/doc add security info
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: d6bac18914
Component: cli
2017-06-02 00:07:17 +00:00
16da59f6de docs: fix link to "run reference"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e1f83cb82b
Component: cli
2017-06-02 00:07:16 +00:00
a1344a583d Add zsh completion for 'docker {run,create} --volume-driver'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: c14094b895
Component: cli
2017-06-02 00:07:16 +00:00
e5cbd3704c more notary documentation
Signed-off-by: Viktor Stanchev <me@viktorstanchev.com>
Upstream-commit: cfe0fadee2
Component: cli
2017-06-02 00:07:16 +00:00
c6af22c130 Include xfsprogs in build environment.
devmapper uses xfs by default now. So include xfsprogs in build
environment. Also update docs to reflect the new default.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 555f500ab4
Component: cli
2017-06-02 00:07:16 +00:00
33385ee8ee Adding in Contiv plugins
Fixes #17764
Also fixed problem where the menu ordering was off
Fix the wrap

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 08918a09ea
Component: cli
2017-06-02 00:07:16 +00:00
2201b8350a Align configuration of bash completion with existing values
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2c0feab2a1
Component: cli
2017-06-02 00:07:16 +00:00
2701f1ceb8 Removing made up word
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f5f5b31358
Component: cli
2017-06-02 00:07:16 +00:00
e9341465ae Fix bash completion on systems where extglob is not set
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7fa96238a6
Component: cli
2017-06-02 00:07:16 +00:00
2a910ab5a6 Windows: Add default isolation exec driver option
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f5fdafc1
Component: cli
2017-06-02 00:07:16 +00:00
b76ab8584e Update plugins.md
Signed-off-by: Gou Rao <gou@portworx.com>
Upstream-commit: f94eb3af9e
Component: cli
2017-06-02 00:07:16 +00:00
572c3b97c4 Update plugins.md
Add OpenStorage to Docker plugin list.

Signed-off-by: Gou Rao <gou@portworx.com>
Upstream-commit: ee8a0a8cd4
Component: cli
2017-06-02 00:07:16 +00:00
8be9d4f383 Fixing wrong volume doc format
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 161b465e47
Component: cli
2017-06-02 00:07:16 +00:00
17a77b775b Add zsh completion for 'docker stats --all -a'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 661cab4af3
Component: cli
2017-06-02 00:07:16 +00:00
5728fa8a19 Fix man pages
Add contents and fix format problem for man pages.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 1a495e2d47
Component: cli
2017-06-02 00:07:16 +00:00
5a8a374f3e bash completion for docker stats --all
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2607803a34
Component: cli
2017-06-02 00:07:16 +00:00
3222bcadf4 Allow docker stats without arguments
This patch adds the ability to run `docker stats` w/o arguments and get
statistics for all running containers by default. Also add a new
`--all` flag to list statistics for all containers (like `docker ps`).
New running containers are added to the list as they show up also.
Add integration tests for this new behavior.
Docs updated accordingly. Fix missing stuff in man/commandline
reference for `docker stats`.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 4668b6ed6c
Component: cli
2017-06-02 00:07:16 +00:00
dcd7b065fd Fix missing -d flag in docker.fish
Signed-off-by: Guilhem Lettron <guilhem@lettron.fr>
Upstream-commit: f239640a2e
Component: cli
2017-06-02 00:07:16 +00:00
f054c65ab0 Updated link to https.
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 2d5de1dd85
Component: cli
2017-06-02 00:07:16 +00:00
3412f77bee Fixed link to contribution page in docs/README.md.
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: c681d6812a
Component: cli
2017-06-02 00:07:15 +00:00
50fbc6f6bd Remove exec-driver global daemon option.
Each platform has only a driver now.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: f9b805f16f
Component: cli
2017-06-02 00:07:15 +00:00
5ab60b10fd Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: c5ed875bd9
Component: cli
2017-06-02 00:07:15 +00:00
831fc32309 Windows: Add isolation to ps filter
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b6c711690c
Component: cli
2017-06-02 00:07:15 +00:00
71b2b853cc Fix docs typo and wrong word
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: e8a0a5c4f4
Component: cli
2017-06-02 00:07:15 +00:00
39ae201697 fix documentation inconsistency for volume create
the example command uses `/world` but the description refers to `/src`

Signed-off-by: Harold Cooper <hrldcpr@gmail.com>
Upstream-commit: e793642ac9
Component: cli
2017-06-02 00:07:15 +00:00
ce4e79a2a8 Change 'docker run' exit codes to distinguish docker/contained errors
The purpose of this PR is for users to distinguish Docker errors from
contained command errors.
This PR modifies 'docker run' exit codes to follow the chroot standard
for exit codes.
Exit status:
125 if 'docker run' itself fails
126 if contained command cannot be invoked
127 if contained command cannot be found
the exit status otherwise

Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: c48ec056d5
Component: cli
2017-06-02 00:07:15 +00:00
7f5cb98ede multiple mount/unmount req with same volume name
Updating docs to handle mount/unmount requests with same volume name. Issue #17585

Signed-off-by: Moorthy RS <rsmoorthy@gmail.com>
Upstream-commit: 904cadc0c2
Component: cli
2017-06-02 00:07:15 +00:00
b4acd55a6d Updating networking docs with technical information
- the /etc/hosts read caveat due to dynamic update
- information about docker_gwbridge
- Carries and closes #17654
- Updating with last change by Madhu
- Updating with the IPAM api 1.22

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 2d486b08c8
Component: cli
2017-06-02 00:07:15 +00:00
6e6828db93 Fixing ZooKeeper and some other nits Nathan found
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 7e68b5f73b
Component: cli
2017-06-02 00:07:15 +00:00
8050e305f6 First pass at consolidating
Removing old networking.md
Updating dockernetworks.md with images
Adding information on network plugins
Adding blurb about links to docker networking
Updating the working documentation
Adding Overlay Getting Started
Downplaying links by removing refs/examples, adding refs/examples for network.
Updating getting started to reflect networks not links
Pulling out old network material
Updating per discussion with Madhu to add Default docs section
Updating with bridge default
Fix bad merge
Updating with new cluster-advertise behavior
Update working and NetworkSettings examples
Correcting example for default bridge discovery behavior
Entering comments
Fixing broken Markdown Syntax
Updating with comments
Updating all the links

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 02a859b9f3
Component: cli
2017-06-02 00:07:15 +00:00
986b7e312c Update kill.md
Added Note to show users that signals will not propagate to the container if the preferred exec form isn't used.

Signed-off-by: Eric Rosenberg <ehaydenr@gmail.com>
Upstream-commit: 05242a4c60
Component: cli
2017-06-02 00:07:15 +00:00
b0b9294f03 Updating network commands: adding man pages
Adding Related information blocks
Final first draft pass: ready for review
Review comments
Entering comments from the gang
Updating connect to include paused

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 4985b20ea1
Component: cli
2017-06-02 00:07:15 +00:00
2de3c9f772 Fix missing double quote in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 7f6859ce5a
Component: cli
2017-06-02 00:07:15 +00:00
bc09bd9da3 zsh: allow option stacking for short options without arguments
This enables Zsh to understand commands like "docker run -it
ubuntu". However, by enabling this, this also makes Zsh completes
"docker run -u<tab>" with "docker run -uapprox" which is not valid. The
users have to put the space or the equal sign themselves before trying
to complete.

Therefore, this behavior is disabled by default. To enable it:

    zstyle ':completion:*:*:docker:*' option-stacking yes
    zstyle ':completion:*:*:docker-*:*' option-stacking yes

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: b10fb43048
Component: cli
2017-06-02 00:07:15 +00:00
052dd3f6a8 zsh: allow short options to specify their arguments with "="
This is allowed by Docker and helps the completion to not get confused
when a user uses this notation. This will also help to enable stacking
of short options since Zsh needs that to not stack options with
arguments.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 2102746489
Component: cli
2017-06-02 00:07:15 +00:00
8c65a8b8f6 Add zsh completion for 'docker build' multi tags
+ Fix some others multi options

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 060e6e1935
Component: cli
2017-06-02 00:07:14 +00:00
644e4c5a10 Fix repeatable options in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4332d3b5d8
Component: cli
2017-06-02 00:07:14 +00:00
0d90750323 Tweaking some things
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: cd95e0a5c5
Component: cli
2017-06-02 00:07:14 +00:00
474ccf50b2 Add splunk log driver to zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 526c844004
Component: cli
2017-06-02 00:07:14 +00:00
3be895e8da Add Splunk logging driver #16207
Allow to send Splunk logs using Http Event Collector

Signed-off-by: Denis Gladkikh <denis@gladkikh.email>
Upstream-commit: 1e2a27568b
Component: cli
2017-06-02 00:07:14 +00:00
e16c15092c Add ability to add multiple tags with docker build
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 9d9976ae3a
Component: cli
2017-06-02 00:07:14 +00:00
3e5032bf12 bash completion for log driver options env and labels
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a41d4dbdde
Component: cli
2017-06-02 00:07:14 +00:00
a897c3f32c Zsh completion for 'docker network inspect' multiple networks
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: f06b7a7713
Component: cli
2017-06-02 00:07:14 +00:00
b10cc3ac63 bash completion can be configured to complete network IDs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: be7caf2647
Component: cli
2017-06-02 00:07:14 +00:00
a2346eda68 bash completion for docker network inspect supports multiple networks
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b20b7584de
Component: cli
2017-06-02 00:07:14 +00:00
5f40c7f270 Fix some errant links
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 428a089858
Component: cli
2017-06-02 00:07:14 +00:00
1a8d32cc2e changes from review - which -> that
Signed-off-by: Jeremy Unruh <jeremybunruh@gmail.com>
Upstream-commit: 91fbce30e8
Component: cli
2017-06-02 00:07:14 +00:00
8f5cb8d6a6 changes from review - move up to conform to alphabetical order
Signed-off-by: Jeremy Unruh <jeremybunruh@gmail.com>
Upstream-commit: 3e901572a5
Component: cli
2017-06-02 00:07:14 +00:00
cac5b20d4f docs: Add Netshare volume plugin to extend/plugins
Signed-off-by: Jeremy Unruh <jeremybunruh@gmail.com>
Upstream-commit: 48a8ca15d8
Component: cli
2017-06-02 00:07:14 +00:00
ef216a0fb8 bash completion for docker cp supports copying both ways
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6b43a0aa73
Component: cli
2017-06-02 00:07:14 +00:00
cbff938ed8 bash completion for new docker network create options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a2bbb2c61c
Component: cli
2017-06-02 00:07:14 +00:00
00a2827cb7 Add zsh completion for 'docker network create -o --opt'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 4e6212f389
Component: cli
2017-06-02 00:07:14 +00:00
9e47fd5a5a Update ambassador image, use the socat -t option
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: edbb82c900
Component: cli
2017-06-02 00:07:14 +00:00
eb88c834cf MINOR typo fix.
Signed-off-by: GabrielNicolasAvellaneda <avellaneda.gabriel@gmail.com>
Upstream-commit: aa9830907a
Component: cli
2017-06-02 00:07:13 +00:00
a5c27ff0c7 Bash completion for restart policy unless-stopped
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 28f2bdf335
Component: cli
2017-06-02 00:07:13 +00:00
a8b3e2deea bash completion: support for dm.use_deferred_* options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 321a5b38e7
Component: cli
2017-06-02 00:07:13 +00:00
565f5031db docs: fix storage driver options list
This fixes the indentation of the storage driver
options list.

Also wraps/reformats some examples to prevent
horizontal scrollbars on the rendered HTML

Fixes #17140

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 91e898094f
Component: cli
2017-06-02 00:07:13 +00:00
80cce1f5ce Deprecate -c cli short variant flag in docker cli
- build
- create

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4c506e1df7
Component: cli
2017-06-02 00:07:13 +00:00
a9f41b5a62 Add missing options to bash completion for docker import
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c3c2867b15
Component: cli
2017-06-02 00:07:13 +00:00
cc1819978a bash completion: minor refactoring for consistency
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9d4969150a
Component: cli
2017-06-02 00:07:13 +00:00
d40cef7233 Add missing options to bash completion for docker build
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0ef21aeab2
Component: cli
2017-06-02 00:07:13 +00:00
dd502cefea Zsh completion : all --<option>= flag values may be given in the next argument
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 88664b18b9
Component: cli
2017-06-02 00:07:13 +00:00
0372f2a433 Add zsh completion for 'docker import -m --message'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 1040139182
Component: cli
2017-06-02 00:07:13 +00:00
fe064e150d Deprecate 'docker run -c' option in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 570a5f17bf
Component: cli
2017-06-02 00:07:13 +00:00
622facd72b Add zsh completion for 'unless-stopped' restart policy
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: dbf572a81d
Component: cli
2017-06-02 00:07:13 +00:00
014a8fa50f Add zsh completion for 'docker build --build-arg'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 96af7e18b9
Component: cli
2017-06-02 00:07:13 +00:00
52c421ec6b Remove '-n -l --latest' options from 'docker network ls' in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b6b1fc6a34
Component: cli
2017-06-02 00:07:13 +00:00
ef15f35c65 Add zsh completion for '--ipam-driver --subnet --ip-range --gateway --aux-address' for 'docker network create'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: d6ac5c6556
Component: cli
2017-06-02 00:07:13 +00:00
de10af7bd7 Added network to docker --help and help cleanup
Fixes https://github.com/docker/docker/issues/16909

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 3a779b2995
Component: cli
2017-06-02 00:07:13 +00:00
e15d2f0090 use Server Version
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: dd1d35285b
Component: cli
2017-06-02 00:07:13 +00:00
a1b4133afe add clarity to -p option
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 445552696c
Component: cli
2017-06-02 00:07:13 +00:00
eaf51eb079 Improve the way we deliver Examples in command line. (Add descriptive titles)
Signed-off-by: Jian Zhang <zhangjian.fnst@cn.fujitsu.com>
Upstream-commit: c897310c29
Component: cli
2017-06-02 00:07:13 +00:00
e44fcd2712 Add bash completion for docker inspect --size
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3a89624209
Component: cli
2017-06-02 00:07:12 +00:00
9a66bfc2e3 add size to inspect
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: de3e44577a
Component: cli
2017-06-02 00:07:12 +00:00
900900b4d7 updating docs for EXPOSE option on run command; fixes #16634
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Upstream-commit: d83594a46d
Component: cli
2017-06-02 00:07:12 +00:00
98088a6131 Bash completion for docker network
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 966ebe7b62
Component: cli
2017-06-02 00:07:12 +00:00
7dc7d29f7b Refactor bash completion: pull out subcommand parsing
`docker network` is the second command with subcommands.

This refactoring pulls out parsing and processing of subcommands
from `docker volume` completion and thus makes its logic available
for other commands.

Also enables `__docker_pos_first_nonflag` for subcommand completion.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 26294f39f2
Component: cli
2017-06-02 00:07:12 +00:00
9c1b81f536 various man page typos
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: f7a88ba8a8
Component: cli
2017-06-02 00:07:12 +00:00
5b54323be8 volume create error on conflict option
Signed-off-by: Kun Zhang <zkazure@gmail.com>
Upstream-commit: eb960e4eb7
Component: cli
2017-06-02 00:07:12 +00:00
26c4f55b5c Add CMD and EXPOSE instruction example
Signed-off-by: Mihuleacc Sergiu <mihuleac.sergiu@gmail.com>
Upstream-commit: 2af4a1ef4b
Component: cli
2017-06-02 00:07:12 +00:00
f6c311219b Document updates for cluster-store-opt
This updates the docs for the daemon based on the new cluster-store-opt
for TLS support.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f10d93f394
Component: cli
2017-06-02 00:07:12 +00:00
38cbcb9edf fix fish completion; wrong image names bug; close #16672
Signed-off-by: Viktor Stanchev <me@viktorstanchev.com>
Upstream-commit: dd91c424fa
Component: cli
2017-06-02 00:07:12 +00:00
5ccdc08796 Add zsh completion for 'docker network'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: cbc9cbde21
Component: cli
2017-06-02 00:07:12 +00:00
fb5c95b1a3 Default the tcp port to 2376 if tls is on, and 2375 if not
Refactor so that the Host flag validation doesn't destroy the user's input,
and then post process the flags when we know the TLS options

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 0095e6fc23
Component: cli
2017-06-02 00:07:12 +00:00
d4f3c46baf Enabled GitHub Flavored Markdown
GitHub flavored markdown is now supported for links and images. Also, ran LinkChecker and FileResolver. Yay!
Fixes from Spider check
Output for docker/docker now goes into engine directory

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: e641a0f363
Component: cli
2017-06-02 00:07:12 +00:00
f6b62e78b4 Add user namespace enable flag --userns-remap in experimental build
This adds the capability to turn on user namespace support when using an
experimental build Docker daemon binary using the `--userns-remap` flag.

Also documentation is added to the experimental docs.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 1adb722255
Component: cli
2017-06-02 00:07:12 +00:00
a227b1db85 Add zsh completion for '--cluster-store-opt'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 64c577bdd8
Component: cli
2017-06-02 00:07:12 +00:00
9250a37135 add clarity/fix typos man/docker-build
add needed clarity for
1)  using STDIN to pass build context
2)  --cpu-shares flag use

also a few typos

Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 40ec99e60a
Component: cli
2017-06-02 00:07:12 +00:00
5196a71aac Add bash completion for --cluster-store-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4fcea52287
Component: cli
2017-06-02 00:07:12 +00:00
d7d36514c0 man update for docker run with host volumes
Signed-off-by: Mike Brown <brownwm@us.ibm.com>

cleaning up docker run -v documentation for man and web reference guide

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Upstream-commit: b5a037443d
Component: cli
2017-06-02 00:07:11 +00:00
49b87bae2e Sync with remote API
Signed-off-by: Luca Marturana <lucamarturana@gmail.com>

Sync also container events

Signed-off-by: Luca Marturana <lucamarturana@gmail.com>

Sync also man page

Signed-off-by: Luca Marturana <lucamarturana@gmail.com>
Upstream-commit: f8a62fd1c5
Component: cli
2017-06-02 00:07:11 +00:00
845db3988b Add description for "--cpu-shares=0".
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 92512fdf32
Component: cli
2017-06-02 00:07:11 +00:00
ccc6356be8 Add TLS support for discovery backend
This leverages recent additions to libkv enabling client
authentication via TLS so the discovery back-end can be locked
down with mutual TLS.  Example usage:

    docker daemon [other args] \
        --cluster-advertise 192.168.122.168:2376 \
        --cluster-store etcd://192.168.122.168:2379 \
        --cluster-store-opt kv.cacertfile=/path/to/ca.pem \
        --cluster-store-opt kv.certfile=/path/to/cert.pem \
        --cluster-store-opt kv.keyfile=/path/to/key.pem

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 323fb21864
Component: cli
2017-06-02 00:07:11 +00:00
3a46a763dc Create extpoint for graphdrivers
Allows people to create out-of-process graphdrivers that can be used
with Docker.

Extensions must be started before Docker otherwise Docker will fail to
start.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7beb4061e1
Component: cli
2017-06-02 00:07:11 +00:00
36d10565e6 update dockernetwork.md and network api
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: b923d8af3e
Component: cli
2017-06-02 00:07:11 +00:00
f33e7e36a6 Fixing issues in command ordering. Adding index.md
Adjust bullets
Entering Seb's comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: d45666f869
Component: cli
2017-06-02 00:07:11 +00:00
690359813b clarify dockerignore semantics
Signed-off-by: Grant Reaber <grant.reaber@gmail.com>
Upstream-commit: 42fe72228d
Component: cli
2017-06-02 00:07:11 +00:00
0e98ff8444 Mention more realistic examples are available
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: d86cfdfb84
Component: cli
2017-06-02 00:07:11 +00:00
49281f044b Don't put dockerfiles in one continuous code block
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 090ad2bb8a
Component: cli
2017-06-02 00:07:11 +00:00
ae63a50726 Networking API and UX documentation
More doc updates will follow

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: da80c0929a
Component: cli
2017-06-02 00:07:11 +00:00
40051ff694 change flag name to better follow the other flags that start with disable;
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 0afb6cc862
Component: cli
2017-06-02 00:07:11 +00:00
606d386d6d devmapper: Provide option to enabled deferred device deletion
Provide a command line option dm.use_deferred_deletion to enable deferred
device deletion feature. By default feature will be turned off.

Not sure if there is much value in deferred deletion being turned on
without deferred removal being turned on. So for now, this feature can
be enabled only if deferred removal is on.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: fba8aeb14b
Component: cli
2017-06-02 00:07:11 +00:00
9eb4fc2912 Update documentation on the revert on env validation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2a36a93d04
Component: cli
2017-06-02 00:07:11 +00:00
41270896e7 Add zsh completion for 'docker daemon --no-legacy-registry'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 53089d74fe
Component: cli
2017-06-02 00:07:11 +00:00
ba5c93f531 Fix man and commandline docs
- missing help option in `docs/reference/commandline/*.md` (some files
  have it, the other I fixed didn't)
- missing `[OPTIONS]` in Usage description
- missing options
- formatting
- start/stop idempotence

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: cbd33a2b27
Component: cli
2017-06-02 00:07:11 +00:00
530fe2b9f7 Add bash completion for --no-legacy-registry
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1b1a0a0835
Component: cli
2017-06-02 00:07:10 +00:00
4144683a0f Documentation for filtering events by label
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f361ebdea6
Component: cli
2017-06-02 00:07:10 +00:00
2dcd0d901a typo man/search
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: a15bc5d01a
Component: cli
2017-06-02 00:07:10 +00:00
3e4a3f9b84 Add zsh completion for --cluster-store and --cluster-advertise options for docker daemon
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 88ef8f31aa
Component: cli
2017-06-02 00:07:10 +00:00
c6d4699aa4 bash completion for docker daemon --cluster-*
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3fce5e1084
Component: cli
2017-06-02 00:07:10 +00:00
cda415abcc Command line, manpage and deprecation documentation.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
Upstream-commit: 2f288fe894
Component: cli
2017-06-02 00:07:10 +00:00
e482ad5647 Add dns-opt option to docker daemon man page
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 841fc5d155
Component: cli
2017-06-02 00:07:10 +00:00
2a1240949d Add builtin nodes discovery
Use `pkg/discovery` to provide nodes discovery between daemon instances.

The functionality is driven by two different command-line flags: the
experimental `--cluster-store` (previously `--kv-store`) and
`--cluster-advertise`. It can be used in two ways by interested
components:

1. Externally by calling the `/info` API and examining the cluster store
   field. The `pkg/discovery` package can then be used to hit the same
   endpoint and watch for appearing or disappearing nodes. That is the
   method that will for example be used by Swarm.
2. Internally by using the `Daemon.discoveryWatcher` instance. That is
   the method that will for example be used by libnetwork.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f95e9f7c72
Component: cli
2017-06-02 00:07:10 +00:00
ddf084d760 Touch up "Dockerfile reference"
- add example for `docker build -f ...`
- modifiy `FROM` explaination into bullet points
- add/clarify examples for `LABEL` and `ADD` instructions
- fix review comments (PR #16109)

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: 0039e46e3e
Component: cli
2017-06-02 00:07:10 +00:00
6a2b5a7a84 Add documentation note that LABEL allows environment replacement
Signed-off-by: Tim Waugh <twaugh@redhat.com>
Upstream-commit: a8db81a89a
Component: cli
2017-06-02 00:07:10 +00:00
e10877ef64 man page for docker daemon command
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 2e8a8547d9
Component: cli
2017-06-02 00:07:10 +00:00
c7f7b0b0c5 Add support for memory reservation
Signed-off-by: qhuang <qhuang@10.0.2.15>
Upstream-commit: d5b1d055b8
Component: cli
2017-06-02 00:07:10 +00:00
055dc01851 Format output of docker info
Format those info which will only be displayed when daemon is
in debug mode.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 1ba09d5d08
Component: cli
2017-06-02 00:07:10 +00:00
ed090ff91e fix typo in man page
- resolve #16536

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: b112dcfed4
Component: cli
2017-06-02 00:07:10 +00:00
e4e2ea0cbd Docs: correct the description of docker cp
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 9ec9856889
Component: cli
2017-06-02 00:07:10 +00:00
f67f9bd91a Catchup missing changes for the zsh completion
- felixr/docker-zsh-completion@6ae6279: Add --privileged flag to docker exec command in zsh completion
 - felixr/docker-zsh-completion@259ea00: Remove -h help flag from subcommands in zsh completion
 - felixr/docker-zsh-completion@5f77b29: Add docker ps --format flag to zsh completion
 - felixr/docker-zsh-completion@a1f39f8: Add --config flag to zsh completion
 - felixr/docker-zsh-completion@6a503b4: Filter zsh completions of inspect command by --type
 - felixr/docker-zsh-completion@d286ccd: Add --ulimit flag to build command to zsh completion
 - felixr/docker-zsh-completion@bdc1261: Add support for kernel memory limit in zsh completion
 - felixr/docker-zsh-completion@c8ce164: Add docker volume command and subcommands in zsh completion
 - felixr/docker-zsh-completion@7f996bf: Add docker daemon command to zsh completion
 - felixr/docker-zsh-completion@4ccd292: Be more generic when parsing "docker ps" output.
 - felixr/docker-zsh-completion@cd0f1b9: Fix container completion by name
 - felixr/docker-zsh-completion@8bf9041: Use "docker ps --no-trunc" to build completion.
 - felixr/docker-zsh-completion@b721bbb: Only keep the last name for a running/stopped container
 - felixr/docker-zsh-completion@6791b3e: Fix "docker run --stop-signal" completion
 - felixr/docker-zsh-completion@961f628: Try some heuristics to determine the canonical container name

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 65c5e2b950
Component: cli
2017-06-02 00:07:10 +00:00
5c93fb306b Bash completion: avoid 'compopt: command not found' errors on Mac OS
The shell builtin `compopt` is not available on the outdated bash
version 3.2.57 that ships with Mac OS.
It is used in Docker's bash completion to suppress trailing spaces
in advanced completions of hash map options, e.g. `--log-opt`.

If `compopt` is not available, the new behavior is to do nothing,
i.e. the user will have to delete the additional space.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 7310f4a2bd
Component: cli
2017-06-02 00:07:10 +00:00
f758afda44 Touch up 'docker logs' documentation.
* Update format for 'Note:' to match other pages.
* Add link to Go's RFC3339Nano timestamp information.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: 83a6b3e927
Component: cli
2017-06-02 00:07:10 +00:00
e0b0bc40ce bash completion: use generic tag log driver option
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: eb684d2bad
Component: cli
2017-06-02 00:07:09 +00:00
c3a791a764 reference: capability all should be ALL
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3058fcf68b
Component: cli
2017-06-02 00:07:09 +00:00
94ac212f5c add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: 708318b076
Component: cli
2017-06-02 00:07:09 +00:00
85e27f63c7 docker restarts running OR stopped containers, docs edit rm "running"
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: fac1158156
Component: cli
2017-06-02 00:07:09 +00:00
015504bdec Add missing '[OPTIONS]' arg to documentation for 'docker version'.
Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: 17fda32a53
Component: cli
2017-06-02 00:07:09 +00:00
81561fcf99 Update the instructions for building experimental docker binaries
There is no dynbinary target.

Signed-off-by: Tom Denham <tom@tomdee.co.uk>
Upstream-commit: cd90efa040
Component: cli
2017-06-02 00:07:09 +00:00
0a7b038a58 incorporate doc review comments
Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
Upstream-commit: 9fab23902f
Component: cli
2017-06-02 00:07:09 +00:00
a49195f1d6 Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
Upstream-commit: 40a2dac738
Component: cli
2017-06-02 00:07:09 +00:00
8a794fe86d Add support for DNS options
Signed-off-by: Tim Hockin <thockin@google.com>
Upstream-commit: 8bdf17d8fe
Component: cli
2017-06-02 00:07:09 +00:00
e19ee5c257 Fix bash completion when extglob is not set
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f5eb62c180
Component: cli
2017-06-02 00:07:09 +00:00
e91c3f51fc Revert "Make daemon to start with no userlandproxy by default"
This reverts commit bf2b8ec8165468d7454f6bd86f4a78e7e8b58d8e.

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 4948783f7c
Component: cli
2017-06-02 00:07:09 +00:00
9c7329f418 updates to readme documents for manual page
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Upstream-commit: ccb5d7469a
Component: cli
2017-06-02 00:07:09 +00:00
4feecc2ab5 typo
Signed-off-by: Bill Wang <ozbillwang@gmail.com>
Upstream-commit: aba3fa1040
Component: cli
2017-06-02 00:07:09 +00:00
6a0da0245a update documentation styling as per suggestions
Signed-off-by: Amen Belayneh <amenbelayneh@gmail.com>
Upstream-commit: 8ff51d3827
Component: cli
2017-06-02 00:07:09 +00:00
3fef8fffb2 add a documentation note on backslash usage in shell form of RUN
Signed-off-by: Amen Belayneh <amenbelayneh@gmail.com>
Upstream-commit: 0ece7ed9d4
Component: cli
2017-06-02 00:07:09 +00:00
e50ac3ff79 fix doc about vol
Signed-off-by: xlgao-zju <xlgao@zju.edu.cn>
Upstream-commit: d204132ee6
Component: cli
2017-06-02 00:07:09 +00:00
b5335d2b04 Add log reading to the journald log driver
If a logdriver doesn't register a callback function to validate log
options, it won't be usable.  Fix the journald driver by adding a dummy
validator.

Teach the client and the daemon's "logs" logic that the server can also
supply "logs" data via the "journald" driver.  Update documentation and
tests that depend on error messages.

Add support for reading log data from the systemd journal to the
journald log driver.  The internal logic uses a goroutine to scan the
journal for matching entries after any specified cutoff time, formats
the messages from those entries as JSONLog messages, and stuffs the
results down a pipe whose reading end we hand back to the caller.

If we are missing any of the 'linux', 'cgo', or 'journald' build tags,
however, we don't implement a reader, so the 'logs' endpoint will still
return an error.

Make the necessary changes to the build setup to ensure that support for
reading container logs from the systemd journal is built.

Rename the Jmap member of the journald logdriver's struct to "vars" to
make it non-public, and to make it easier to tell that it's just there
to hold additional variable values that we want journald to record along
with log data that we're sending to it.

In the client, don't assume that we know which logdrivers the server
implements, and remove the check that looks at the server.  It's
redundant because the server already knows, and the check also makes
using older clients with newer servers (which may have new logdrivers in
them) unnecessarily hard.

When we try to "logs" and have to report that the container's logdriver
doesn't support reading, send the error message through the
might-be-a-multiplexer so that clients which are expecting multiplexed
data will be able to properly display the error, instead of tripping
over the data and printing a less helpful "Unrecognized input header"
error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
Upstream-commit: a821292ec8
Component: cli
2017-06-02 00:07:08 +00:00
8d0688201f Make daemon to start with no userlandproxy by default
This PR makes a user visible behavior change with userland
proxy disabled by default and rely on hairpin NAT to be enabled
by default. This may not work in older (unsupported) kernels
where the user will be forced to enable userlandproxy if needed.

      - Updated the Docs
      - Changed the integration-cli to start with userlandproxy
	desiabled by default.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 3dff6170d6
Component: cli
2017-06-02 00:07:08 +00:00
016d3c3aa6 Add STOPSIGNAL instruction to dockerfiles.
This way, images creators can set the exit signal their programs use.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: f5b80326a1
Component: cli
2017-06-02 00:07:08 +00:00
a522975349 Signal to stop a container.
Allow to set the signal to stop a container in `docker run`:
- Use `--stop-signal` with docker-run to set the default signal the container will use to exit.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 36a36bdaf5
Component: cli
2017-06-02 00:07:08 +00:00
1ef4dd2a6c Add awslogs driver for Amazon CloudWatch Logs
Signed-off-by: Samuel Karp <skarp@amazon.com>
Upstream-commit: 0d2d916b13
Component: cli
2017-06-02 00:07:08 +00:00
6cdd6e3a6b update docker volume man pages
- added --help option
- fixed several formatting problems

Also added --help to volume inspect reference page.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e8447c157d
Component: cli
2017-06-02 00:07:08 +00:00
aef04c70b9 bash completion for docker volume
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6c98ca574f
Component: cli
2017-06-02 00:07:08 +00:00
0d8d6d57ac Add missing ps placeholder to the docs.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 54a47bdcaa
Component: cli
2017-06-02 00:07:08 +00:00
e92eccedb6 man docker-tag minor fixup
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 1f974f76ad
Component: cli
2017-06-02 00:07:08 +00:00
5b7698a1f6 Fix usage for docker volume inspect and docker volume rm
For both commands, volume is _not_ optional. Several volumes may
be specified.
Both commands now use the same name (VOLUME) for the command argument.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 849b5b6d67
Component: cli
2017-06-02 00:07:08 +00:00
dc9efd3901 Typo in cp.md
Closes #16124

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 56b46dca76
Component: cli
2017-06-02 00:07:08 +00:00
4bb65211ba move pachyderm PFS link above rex ray link in docs/extend/plugins.md
Signed-off-by: Peter Edge <peter.edge@gmail.com>
Upstream-commit: b2fbeee10e
Component: cli
2017-06-02 00:07:08 +00:00
2d36f8b768 Add link to Pachyderm PFS volume driver plugin in plugins.md
Signed-off-by: Peter Edge <peter.edge@gmail.com>
Upstream-commit: bf2625bf1f
Component: cli
2017-06-02 00:07:08 +00:00
f264c481a4 Fix minor typo in docs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2edd24ea80
Component: cli
2017-06-02 00:07:08 +00:00
169732b97d correct man docker-pull
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: ecbf92d66c
Component: cli
2017-06-02 00:07:08 +00:00
af60232055 add --insecure-registry warning to online docs
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 5d85be4a3c
Component: cli
2017-06-02 00:07:08 +00:00
dba900f55b man Dockerfile ADD/COPY/FROM clarify
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 621debd575
Component: cli
2017-06-02 00:07:08 +00:00
63a3c51013 clarify --insecure-registry in man docker
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: c90013c460
Component: cli
2017-06-02 00:07:08 +00:00
034997662b Remove PortMapping from container NetworkSettings
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 1c26392626
Component: cli
2017-06-02 00:07:07 +00:00
5c0a31aa05 Add docker ps --filter=… image completion
I missed that on #15919, thanks @albers

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1cf99bf127
Component: cli
2017-06-02 00:07:07 +00:00
d3348772c2 Warning message for lvm devmapper running on top of loopback devices
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: d5394a0d5f
Component: cli
2017-06-02 00:07:07 +00:00
14dfc30977 Update shell completion on docker ps for ancestor
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8387eacede
Component: cli
2017-06-02 00:07:07 +00:00
b36315741b ubuntu-14-10-x64 is not a valid image on digital ocean
Signed-off-by: Jordan Jennings <jjn2009@gmail.com>
Upstream-commit: d05294bae4
Component: cli
2017-06-02 00:07:07 +00:00
f286f8afde Add 'ancestor' ps filter for image
Makes it possible to filter containers by image, using
--filter=ancestor=busybox and get all the container running busybox
image and image based on busybox (to the bottom).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 67f663c7bf
Component: cli
2017-06-02 00:07:07 +00:00
41371def9d Added note about process interaction with container in detached mode
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

Added note about process interaction with container in detached mode

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Upstream-commit: 23effb34d7
Component: cli
2017-06-02 00:07:07 +00:00
2b021a1765 Update filtering chapters on ps/images references
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 898614f30a
Component: cli
2017-06-02 00:07:07 +00:00
ccd9b5c29e Builder counts from 1
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6d275805ad
Component: cli
2017-06-02 00:07:07 +00:00
fb53625655 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1f10226bfd
Component: cli
2017-06-02 00:07:07 +00:00
53111401ba adding message option to the import subcommand
Signed-off-by: Taylor Jones <monitorjbl@gmail.com>
Upstream-commit: f4060b1f65
Component: cli
2017-06-02 00:07:07 +00:00
3eda380217 Update plugins.md
Add Convoy to Docker plugin list.

Signed-off-by: Sheng Yang <sheng.yang@rancher.com>
Upstream-commit: a5f2ecff80
Component: cli
2017-06-02 00:07:07 +00:00
fe402d05bb Copy edits for typos
Signed-off-by: Ed Costello <epc@epcostello.com>
Upstream-commit: a5c18a853e
Component: cli
2017-06-02 00:07:07 +00:00
74c0fd37cc Add unless-stopped restart policy
Fixes #11008

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: df39b0146b
Component: cli
2017-06-02 00:07:07 +00:00
ff311ecafd explain how to make it work on awazon ec2.
Signed-off-by: Klein Florian <florian.klein@free.fr>
Upstream-commit: e1733b4db6
Component: cli
2017-06-02 00:07:07 +00:00
a302fd9a45 Change all optional unit to [unit]
As suggested before, we should change every signal one.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: b243bbed9c
Component: cli
2017-06-02 00:07:07 +00:00
0ae8a6bd4d Revert "Fix broken links at plugins documentation"
This reverts commit 354147df012dd35f82e59e3511d9be4fc7610352.

Signed-off-by: Álex González <agonzalezro@gmail.com>
Upstream-commit: 445e4600f2
Component: cli
2017-06-02 00:07:07 +00:00
e076ea4c2f Fix broken links at plugins documentation
Signed-off-by: Álex González <agonzalezro@gmail.com>
Upstream-commit: b64dba4262
Component: cli
2017-06-02 00:07:07 +00:00
7528eacd46 Make run and rmi bash completions configurable
Allow the user to configure how Docker's bash completion works for the
"events", "history", "inspect", "run", "rmi" and "save" commands through the
following environment variables:

DOCKER_COMPLETION_SHOW_IMAGE_IDS
  "none" - Show names only (default)
  "non-intermediate" - Show names and ids, but omit intermediate image IDs
  "all" - Show names and ids, including intermediate image IDs

DOCKER_COMPLETION_SHOW_TAGS
  "yes" - include tags in completion options (default)
  "no"  - don't include tags in completion options

Fixes #9474.

Signed-off-by: Rory Hunter <roryhunter2@gmail.com>
Upstream-commit: e7d0fd2b23
Component: cli
2017-06-02 00:07:06 +00:00
1386a1809c Add support for kernel memory limit
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 5731775665
Component: cli
2017-06-02 00:07:06 +00:00
0d081855af specify the docker run --rm action
Signed-off-by: He Simei <hesimei@zju.edu.cn>
Upstream-commit: 90cf0587f1
Component: cli
2017-06-02 00:07:06 +00:00
57f4813b6b fix format man-commit
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 91502290a5
Component: cli
2017-06-02 00:07:06 +00:00
ecd5fc0b6e add -H to SYNOPSIS man-history
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 1c26439cbb
Component: cli
2017-06-02 00:07:06 +00:00
2fafbcba32 Add gists provided by Mary
This adds the example gists, provided by Mary Anthony,
also fixes a link to the old /terms/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 27b1ab4116
Component: cli
2017-06-02 00:07:06 +00:00
64d754f612 run.md: --expose does NOT override Dockerfile EXPOSE
run.md states that the operator can override all defaults set in the Dockerfile, and explicitly says that `--expose` overrides the `EXPOSE` instruction. Neither of these are true. An `EXPOSE` instruction cannot be overridden, `--expose` can only add additional exposed ports.

This change fixes the instructions, and also takes the liberty of crisping up the grammar and phrasing in a place or two.

Signed-off-by: Spencer Brown <spencer@spencerbrown.org>
Upstream-commit: a419da588f
Component: cli
2017-06-02 00:07:06 +00:00
3376746a0c add weight to daemon page so it renders in order
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 4ddb2c2a8d
Component: cli
2017-06-02 00:07:06 +00:00
83978ae0df add missing instruction
Signed-off-by: bin liu <liubin0329@gmail.com>
Upstream-commit: 08481e81ca
Component: cli
2017-06-02 00:07:06 +00:00
cf8e51051f Add format description in run doc
And only set false to --oom-kill-disable, we just need the default
value to show.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 1219ef846c
Component: cli
2017-06-02 00:07:06 +00:00
c1c4fe18cf Adding support to publish on custom host port ranges
Signed-off-by: Don Kjer <don.kjer@gmail.com>

Changing vendor/src/github.com/docker/libnetwork to match lindenlab/libnetwork custom-host-port-ranges-1.7 branch
Upstream-commit: 49acf8c522
Component: cli
2017-06-02 00:07:06 +00:00
30c6af4269 fix SYNOPSIS alphabetical order man-create
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: 7c7faab3d2
Component: cli
2017-06-02 00:07:06 +00:00
374c800384 remove references to 'source repository'
- rewrite intro to Dockerfile reference usage section to remove
   references to 'source repository'
- Closes #14714
- Fixes:  #8648
- Updating with Seb's comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: e0d42a679c
Component: cli
2017-06-02 00:07:06 +00:00
73a2904d6e Updating hashcode links to commands
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 58a37fe8cf
Component: cli
2017-06-02 00:07:06 +00:00
22fab2f19a reference/run: Some editorial changes
Based on the suggestions from @moxiegirl, some changes to make the wording more clear.

Signed-off-by: Kai Blin <kai@samba.org>
Upstream-commit: eb1d7c01a2
Component: cli
2017-06-02 00:07:06 +00:00
622db7d10b reference/run: Add some articles
Signed-off-by: Kai Blin <kai@samba.org>
Upstream-commit: 33e158b9fc
Component: cli
2017-06-02 00:07:06 +00:00
143c265b75 reference/run: Add a paragraph break
Signed-off-by: Kai Blin <kai@samba.org>
Upstream-commit: d4b510c608
Component: cli
2017-06-02 00:07:06 +00:00
99a3735fd0 reference/run: Clarify the use of numeric UIDs
it is possible to pass an UID that has not been created inside the container, clarify this in the docs.
This should fix issue #14795

Signed-off-by: Kai Blin <kai@samba.org>
Upstream-commit: 7cc23c78c0
Component: cli
2017-06-02 00:07:06 +00:00
519334c5f4 add documentation clarifying behavior of VOLUME instruction
Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com>
Upstream-commit: d3dae7f652
Component: cli
2017-06-02 00:07:05 +00:00
20d188cf61 Fix bash completion for log driver options
This option was incorrectly ported to the new `daemon` subcommand
structure.

Beside the obvious effect that completion of `docker daemon --log-opt`
did not work, this also caused completion of `docker` and `docker xxx`
to fail on macs with

> bash: words: bad array subscript

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 8d6fd1542f
Component: cli
2017-06-02 00:07:05 +00:00
5a08821360 Fixing docs to remove references to links under terms/
Removed terms/ directory

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Upstream-commit: 56632110e0
Component: cli
2017-06-02 00:07:05 +00:00
74afd8bfe2 typo man-inspect
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: f2f1c6eb79
Component: cli
2017-06-02 00:07:05 +00:00
05097b2cf9 Updated test to check for exec --privileged side-effects
Also improving documentation for same feature as part of
docker/docker#14113 docs review.

Signed-off-by: Tim Dettrick <t.dettrick@uq.edu.au>
Upstream-commit: e577c15cec
Component: cli
2017-06-02 00:07:05 +00:00
229ae40481 Revert "Revert "Add docker exec run a command in privileged mode""
This reverts commit 40b71adee390e9c06471b89ed845132b4ec80177.

Original commit (for which this is effectively a rebased version) is
72a500e9e5929b038816d8bd18d462a19e571c99 and was provided by Lei Jitang
<leijitang@huawei.com>.

Signed-off-by: Tim Dettrick <t.dettrick@uq.edu.au>
Upstream-commit: d0fa83e285
Component: cli
2017-06-02 00:07:05 +00:00
6a133e788e Add info on how to build experimental binaries
..also update the text that says "TO.BE.DETERMINED" to the actual URL
where the experimental nightlies are published.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 47f2d2bc86
Component: cli
2017-06-02 00:07:05 +00:00
3db9619f22 Add storage options to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: cefc964f4c
Component: cli
2017-06-02 00:07:05 +00:00
ee38886f4e Add options for the json-file logging driver to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0f17194e5f
Component: cli
2017-06-02 00:07:05 +00:00
1467924768 Update bash completion for docker run
Also fixed sort order of options using `sort -d`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a287253ec5
Component: cli
2017-06-02 00:07:05 +00:00
8f5fcbdfc7 fix link
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 0ce172b578
Component: cli
2017-06-02 00:07:05 +00:00
913a4fa94d Fix #8048 : make docker images repository:tag work
Make command like "docker images ubuntu:14.04" work and filter out the
image with the given tag.

Closes #8048.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a395c4af01
Component: cli
2017-06-02 00:07:05 +00:00
32fd4e2f42 Remove -h flag from completion and daemon reference
All docker subcommands support `-h` as an alias for `--help`
unless they have `-h` aliased to something else like `docker run`,
which uses `-h` for `--hostname`.

`-h` is not included in the help messages of the commands, though.

It ist visible in
* reference: only in `docker daemon` reference,
  see output of `grep -Rse --help=false docs`
* man pages: only in `docker` man page
  see output of `grep -RF '**-h**' man`

For consistency reasons, this commit removes `-h` as an alias for
`--help` from the reference page, man page and the bash completion.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 91300d7db0
Component: cli
2017-06-02 00:07:05 +00:00
b0c12747dd Add missing storage drivers to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9fafadf6fc
Component: cli
2017-06-02 00:07:05 +00:00
6be3a78a28 Change all docker -d to docker daemon
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 4454b68474
Component: cli
2017-06-02 00:07:05 +00:00
30eef932c8 Add docker ps --format to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c3bbab15c2
Component: cli
2017-06-02 00:07:05 +00:00
ebdbcae978 Remove note from docker version 1.3 on Env variables
Fixes #14734

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 66516a7ec3
Component: cli
2017-06-02 00:07:05 +00:00
2d140c2360 Make official install instructions use curl instead of wget
YOU GO CURL

Fixes #14650

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 706aec15dc
Component: cli
2017-06-02 00:07:05 +00:00
9f58da3aec typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Upstream-commit: 73a167ddda
Component: cli
2017-06-02 00:07:04 +00:00
cca08cfd4e - Remove references to sudo in basics.md; see sudo instructions top of file
- Removing references to Boot2Docker replacing with Docker Machine
- Removing sudo warnings in instances where appropriate (no sudo in file)
- Updating with comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 8bd8ac0170
Component: cli
2017-06-02 00:07:04 +00:00
da30fbe58c Add --config to bash completion
The custom configuration will also be used in docker invocations made
by the completion script itself, just like `-H`.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f3f1340aa0
Component: cli
2017-06-02 00:07:04 +00:00
b95d84714e Removing deprecated notice to update mkdocs.yml in docs README
Signed-off-by: Laurent Erignoux <lerignoux@gmail.com>
Upstream-commit: a440956eab
Component: cli
2017-06-02 00:07:04 +00:00
f7d6fc62e0 make man/docker.1.md consistent with docker --help
"Options:" listed when you run "docker --help" and "docker daemon
--help" do not match the options listed in "man/docker.1.md".  This PR
makes 'docker --help', 'docker daemon --help' and 'man docker' consistent.
Also 2 typo fixes.

Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: d1d55cfc9a
Component: cli
2017-06-02 00:07:04 +00:00
395e73d119 Typo fix: man/docker-tag.1.md
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: ba34adf83a
Component: cli
2017-06-02 00:07:04 +00:00
d9331e0bf3 Docs: Add Blockbridge volume plugin
Signed-off-by: Stephen Rust <srust@blockbridge.com>
Upstream-commit: 495b191c8f
Component: cli
2017-06-02 00:07:04 +00:00
3851ff8dba Filter completions of docker inspect by --type
Completion now filters the images and containers by given
`--type`.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 57062f2a44
Component: cli
2017-06-02 00:07:04 +00:00
1b7459896b Several fixes in formatting
- fixing headings in run.md
- creating a table for readability
- adding index for logging
- moving logging overview into logging
- Updating with Seb's comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 587955f557
Component: cli
2017-06-02 00:07:04 +00:00
a19c3b4886 Docker stats: display Block IO stats
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 2b4f09abe4
Component: cli
2017-06-02 00:07:04 +00:00
647a177c61 Fix completion of commands after a global option with arg
Without this fix, `docker -l info ` would not complete the commands.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3de0756fd1
Component: cli
2017-06-02 00:07:04 +00:00
925fae2cca Add completion of global options to docker daemon
It's a bit confusing: the "global options" are valid as "global options"
for all client commands (i.e. all but daemon).
Example: `docker --log-level info run`

For `docker daemon`, these "global options" are only valid as "command
options".
Example: `docker daemon --log-level info`

As command completion cannot tell which command the user is going to
type next, completion for the daemon command has to allow illegal
syntaxes like
`docker --log-level info daemon --log-level info`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 35e75dc3e7
Component: cli
2017-06-02 00:07:04 +00:00
d83fe75fd2 Fix a couple broken links
Signed-off-by: Jay Kamat <github@jgkamat.33mail.com>
Upstream-commit: 803b7df5d6
Component: cli
2017-06-02 00:07:04 +00:00
bbec853a6b Multiple fixes to 'docker stats' output:
* Add space between values in docker stats output for easier parsing

  Old output could not be parsed easily because there were columns
  that did not have any separator. Also values that are together
  without any space is difficult to read even for humans.

* Update unit.HumanSize comment to match what the does actually does

Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
Upstream-commit: ab0de17526
Component: cli
2017-06-02 00:07:04 +00:00
ecd79f9a49 Add docker daemon to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 48ad74a01c
Component: cli
2017-06-02 00:07:04 +00:00
9558cba19c [#15027] Fix broken link and edit link text to match section heads
Signed-off-by: David Cramer <davcrame@cisco.com>
Upstream-commit: 4999a7b62c
Component: cli
2017-06-02 00:07:04 +00:00
d9d9241080 Copy edits for typos
Signed-off-by: Ed Costello <epc@epcostello.com>
Upstream-commit: 67f43a0a8b
Component: cli
2017-06-02 00:07:04 +00:00
f1e06e2bd3 daemon.md: do fix placement of exec driver heading
Options for zfs storage driver were incorrectly placed
under 'exec driver options' header. Move the header to
the correct place.

Now, this is the second time I am fixing this. First time
it was commit 68efb27, but the following commit 9af7afb
screwed it up again, so the header appears twice now.

Get rid of the the wrong one.

Cc: David Calavera <david.calavera@gmail.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Upstream-commit: 7480a999ca
Component: cli
2017-06-02 00:07:04 +00:00
9150f65bd7 Remove references to boot2docker replace with docker-machine
- boot2docker is deprecated in the 1.8.0
- docker-machine replaces it
- this fixes #14563
- Updating with thaJetzah comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: b775ca48e0
Component: cli
2017-06-02 00:07:04 +00:00
a535e62ee9 Fix Plugins links
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 2d2b607e1c
Component: cli
2017-06-02 00:07:03 +00:00
2bae062cf7 Fix file mode for docker bash completion
A bash completion file shouldn't have a executable bit set.
Just change file mode to 644 (instead of 755).

Signed-off-by: Dieter Reuter <dieter.reuter@me.com>
Upstream-commit: 371f131e2a
Component: cli
2017-06-02 00:07:03 +00:00
3549c38d45 Put the network UI and overlay docs in separate files
.. and link to them separately. They are different features.

Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
Upstream-commit: 82de777c9d
Component: cli
2017-06-02 00:07:03 +00:00
1084eb751d Updated volume-driver plugin api docs
There was a mistake in the plugin_volume.md file regarding the /VolumeDriver.Remove call.

Added fix and a better explanation.

Signed-off-by: Bardia Keyoumarsi <b.keyoumarsi@gmail.com>
Upstream-commit: e1b8ab477e
Component: cli
2017-06-02 00:07:03 +00:00
0cf3c17dc2 Minor edits to Environment variables section
* Clarify the list of supported instructions.
* Clarify behavior of ONBUILD, based on comments by @SvenDowideit, @theJeztah in PR #14735.
* Reorder list of instructions in alphabetical order.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: 8a1164778d
Component: cli
2017-06-02 00:07:03 +00:00
0df373b9b1 Carry man page for 14637
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 1eea853f2d
Component: cli
2017-06-02 00:07:03 +00:00
673df29363 Fix docker-rm man page formatting
Signed-off-by: Denis Ollier <larchunix@users.noreply.github.com>
Upstream-commit: 4b6f59e6ac
Component: cli
2017-06-02 00:07:03 +00:00
29d9d04015 Add missing documentation to cli/import.md
PR #11907 added support for import using file (path), but it missed
the update of cli/import.md. This fixes that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 32d52f1244
Component: cli
2017-06-02 00:07:03 +00:00
711f0d0ac6 Fix typo
Signed-off-by: John Tims <john.k.tims@gmail.com>
Upstream-commit: ec19c839c6
Component: cli
2017-06-02 00:07:03 +00:00
6faa369765 Fix typo in JSON config example, in the CLI documetation
Signed-off-by: Michał Czeraszkiewicz <czerasz.hosting@gmail.com>
Upstream-commit: d0b639feb0
Component: cli
2017-06-02 00:07:03 +00:00
88f42b2275 Rename to flags and environment variables to content trust
Update help line to allow 90 characters instead of 80

The trust flag pushes out the help description column wider, requiring more room to display help messages.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 57094eec6e
Component: cli
2017-06-02 00:07:03 +00:00
692c177a60 Add cmdline docs for signing and verification flows
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
Upstream-commit: 53d11aa48e
Component: cli
2017-06-02 00:07:03 +00:00
4869d3d87d Document that load supports compressed tarballs.
As per
ecdbf86884/pkg/archive/archive.go (L96)

Signed-off-by: Andy Rothfusz <github@developersupport.net>
Upstream-commit: e52d8f2291
Component: cli
2017-06-02 00:07:03 +00:00
61b854bffc Update docs to use the new docker daemon command
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: a79a020ed7
Component: cli
2017-06-02 00:07:03 +00:00
a0ea158993 Fixing dangling link in docs/reference/commandline/run.md
Signed-off-by: Mohammed Aaqib Ansari <maaquib@gmail.com>
Upstream-commit: 2bf81f0efb
Component: cli
2017-06-02 00:07:03 +00:00
150a4a9870 add to docs that ports do not get exposed when using --net
Signed-off-by: paetling <paetling@gmail.com>
Upstream-commit: 3e68e38f22
Component: cli
2017-06-02 00:07:03 +00:00
e94877f883 Complete all known driver options if no log driver was specified
Without this fix, `docker --log-opt ` would not complete anything
because the completions were driver specific.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4f3ba975fb
Component: cli
2017-06-02 00:07:03 +00:00
9d8a40e4ad Fix problem with = in completion of docker global options
Without this fix, `docker --log-driver fluentd --log-opt fluentd-tag=b`
would complete `b` to `build`.
Completion of the commands has to be nailed to __docker_pos_first_nonflag

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 763ba5078d
Component: cli
2017-06-02 00:07:03 +00:00
63142db1f7 Fix typo in builder.mb .dockerignore example
Signed-off-by: jgeiger <jgeiger@gmail.com>
Upstream-commit: 21ba115188
Component: cli
2017-06-02 00:07:02 +00:00
Lei
2d2192c579 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: f793c1b50c
Component: cli
2017-06-02 00:07:02 +00:00
e64aee5651 added REX-Ray as volume plugin to plugin docs
Signed-off-by: Clinton Kitson <clintonskitson@gmail.com>
Upstream-commit: 7fd94dfdba
Component: cli
2017-06-02 00:07:02 +00:00
Lei
a6c3628cea Docs: update the devicemapper default basesize from 10G to 100G
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: ba3e24187c
Component: cli
2017-06-02 00:07:02 +00:00
0bcbde5ebd Split reader interface from logger interface
Implement new reader interface on jsonfile.
Moves jsonlog decoding from daemon to jsonfile logger.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c9cf4a479a
Component: cli
2017-06-02 00:07:02 +00:00
7317401756 ps --format: Add config.js doc, fix gofmt, add integration tests
Re-add the docs from @calavera's PR to the moved cli cmd reference docs.
Fix gofmt and vet issues from carried commits
Add integration test for using format with --no-trunc and multi-names
Fix custom_test map order dependency on expected value check
Add docs to reference/commandline/ps.md
Remove "-F" flag option from original carried PR content

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 5f2fd60890
Component: cli
2017-06-02 00:07:02 +00:00
48f9bbaaa9 Docker ps custom formatting.
Docker-DCO-1.1-Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1a9819b613
Component: cli
2017-06-02 00:07:02 +00:00
6ea0293e06 Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: b3db7b8fce
Component: cli
2017-06-02 00:07:02 +00:00
738ed44f7d Second level completions for --log-opt
Advanced completion for some log driver options:
gelf-address, syslog-address, syslog-facility.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ad1ca76a0b
Component: cli
2017-06-02 00:07:02 +00:00
622fdc9393 Completion: Add support for '=' in arguments to __docker_pos_first_nonflag
This solves several problems that arise from the special treatment of
"=" in Bash.
The fix was required as some log drivers have options in a key=value
form. It also addresses the --option=value and the negated boolean syntax
(--boolean=false).

Note that this is not a general fix for these problems, it is limited to
the __docker_pos_first_nonflag function.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f7eb7787da
Component: cli
2017-06-02 00:07:02 +00:00
d423291b54 Driver-specific completions for --log-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d3098f54ab
Component: cli
2017-06-02 00:07:02 +00:00
31610116ef Add missing log drivers to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e00293bec8
Component: cli
2017-06-02 00:07:02 +00:00
ef4e017a4c zsh: update zsh completion for docker command
zsh completion is updated with the content of
felixr/docker-zsh-completion.

 - felixr/docker-zsh-completion@a93e1cb7bd Fix completion of repositories with tags
 - felixr/docker-zsh-completion@590ea70596 Respect provided `--host` flag when invoking docker
 - felixr/docker-zsh-completion@6c557babaa Several cosmetic improvements
 - felixr/docker-zsh-completion@5b63cc591a Update completion for `inspect`
 - felixr/docker-zsh-completion@b7d8f2f7cc Order completions alphabetically
 - felixr/docker-zsh-completion@63f6a06224 Factor completion for `build`, `create` and `run`
 - felixr/docker-zsh-completion@ade49ee47f Enforce positional arguments being last
 - felixr/docker-zsh-completion@850b6b6d95 Update completion for build/commit/export/exec/history/import
 - felixr/docker-zsh-completion@01bfd8c075 Remove completion for `insert` and duplicate of `import`
 - felixr/docker-zsh-completion@c64a1d730a Update completion for `stats` to add `--no-stream` flag
 - felixr/docker-zsh-completion@5e81d78b52 Update completion for `log` to add `--since` flag
 - felixr/docker-zsh-completion@b3c146a1a2 Update completion for `run` to add `--group-add` flag
 - felixr/docker-zsh-completion@8d4f196ad8 Don't trigger expensive completion function for flags
 - felixr/docker-zsh-completion@bd5aaa124d Add completion for `--help` everywhere
 - felixr/docker-zsh-completion@3a67a0e8c4 Return appropriate status code on completion
 - felixr/docker-zsh-completion@4dfcb450ea Add Steve as a regular contributor.
 - felixr/docker-zsh-completion@996a1c6def Add completion for top-level flags
 - felixr/docker-zsh-completion@b6df75905f Ensure short/long option are not allowed twice
 - felixr/docker-zsh-completion@75b6a500a0 Complete repositories with tags only on repository match
 - felixr/docker-zsh-completion@5e6292135f Factorize completion of images/repositories/tags
 - felixr/docker-zsh-completion@1c504eb677 Handle repositories with ":"
 - felixr/docker-zsh-completion@0a05bf818b Update completion for `pause' and `unpause'
 - felixr/docker-zsh-completion@b3a63253e2 Containers name can include Swarm host

In summary:

 - Swarm support
 - Handling repositories with ":"
 - Rework how completion of images/repositories/tags work:
    - felixr/docker-zsh-completion@5e6292135f
    - felixr/docker-zsh-completion@75b6a500a0
    - felixr/docker-zsh-completion@a93e1cb7bd

The remaining changes are here to sync changes done in Docker repository
(mostly from PR #14074 and #14555, by @sdurrheimer). With some minor changes:

 - boolean flags don't complete their arguments (true/false)
 - reuse of `--host` argument is done with `$opt_arg` to avoid parsing
   error
 - build/create/run common options are factorized out
 - `--help` flag is handled differently
 - `pause` and `unpause` accepts several containers as far as I know, so
   the change is reverted
 - some more, but difficult to notice (more completion for some flags I think)

Some labels are reverted, mostly because I did the merge by copy/pasting
new options instead of modifying existing options.

This commit is partial. The way the `--help` option is handled triggered
a major change due to the way things are quoted. Those changes were
partially and programmaticaly reverted in this commit only to minimize
the changes to review. The next commit will restore the full changes.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: c15fdb2435
Component: cli
2017-06-02 00:07:02 +00:00
f6603824ca Bump go-md2man to 1.0.3
Fixes an issue with curly braces being escaped when they should not be.
This was particularly an issue in places where `--format '{{ ...  }}'`
is used in the man docs.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6db65bfd6c
Component: cli
2017-06-02 00:07:02 +00:00
d41bceaee4 docs: Updated for docker cp and its API changes
Documented changes to API to enable new `docker cp` behavior.

Added documentation on `docker cp` usage and behavior.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 7e6f0aaece
Component: cli
2017-06-02 00:07:02 +00:00
08e6f56c35 Promote volume drivers from experimental to master.
Remove volume stubs and use the experimental path as the only path.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 356a7beb31
Component: cli
2017-06-02 00:07:02 +00:00
1591eec643 Update documentation according to opts updates
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: bbabc8172c
Component: cli
2017-06-02 00:07:02 +00:00
9e714bcbbe Fix man pages
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 4a332a2e4e
Component: cli
2017-06-02 00:07:02 +00:00
20868b16c2 Simplify swappiness check
As suggested in https://github.com/docker/docker/pull/14004/files#r34022527

The concern there is we can't differentiate whether user explicitly
asked for an invalid value of -1 or he did not specify anything.

I don't think this would be a problem, because:
 - like all other default values like zero, we can't differentiate
   user specify it or not, most of which, zeros are also invalid, so
   default is default, we show these default values in help info,
   so users would know if they set value as default, it'll be like
   they set nothing.
 - we can't do this kind of string check in REST api request, so
   it'll make the behave different from docker command and RESTapi.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 7e4cf8a7ec
Component: cli
2017-06-02 00:07:02 +00:00
a40aa70084 add support for maximum log size, and max number of log files
Signed-off-by: wlan0 <sidharthamn@gmail.com>
Upstream-commit: 7dac74d442
Component: cli
2017-06-02 00:07:01 +00:00
e7122a31a2 Separate plugin sockets and specs.
Check if there is a plugin socket first under `/run/docker/plugins/NAME.sock`.
If there is no socket for a plugin, check `/etc/docker/plugins/NAME.spec` and
`/usr/lib/docker/plugins/NAME.spec` for spec files.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 412d99db51
Component: cli
2017-06-02 00:07:01 +00:00
2eca0b71ce Several cosmetic improvements in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 66c1b06bc4
Component: cli
2017-06-02 00:07:01 +00:00
e5d2433008 Zsh completion update for the following commits:
- Add fluentd logging driver to zsh completion #12876
- Add inspect --type flag to zsh completion #13187
- Respect -H option in zsh completion #13195
- Fix number of argument limit for pause and unpause in zsh completion

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 31c530fd42
Component: cli
2017-06-02 00:07:01 +00:00
4d9fd958f3 Modify man pages for image-naming
This PR adds recommendations in man pages to use only [a-z0-9-_.] when
naming and tagging images.  The purpose of this is to add consistency
and to make image naming caps rules seem less arbitrary.

This PR addresses confusion with:
1. BaseImage:Tagged (not allowed)
2. baseimage:Tagged (allowed)
3. baseimage/tagged:V1 (allowed)
4. baseimage/Tagged:V1 (not allowed)

Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: bf09f5d572
Component: cli
2017-06-02 00:07:01 +00:00
7d2ef56baf zsh: remove Vincent Bernat from reviewers for ZSH completion
Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 3a6ca4b1d8
Component: cli
2017-06-02 00:07:01 +00:00
6dbeaaf4d7 Docs: fix commandline doc create.md and run.md
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 30dbdd7943
Component: cli
2017-06-02 00:07:01 +00:00
b93f7135a0 Adds documentation for additional groups.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 7301088482
Component: cli
2017-06-02 00:07:01 +00:00
0d5c36bb7c add --format flag to docker version
Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com>
Upstream-commit: 90f2c9cf90
Component: cli
2017-06-02 00:07:01 +00:00
6553295dca Add some missing events to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 23256b7438
Component: cli
2017-06-02 00:07:01 +00:00
2396d45eac Robert P.J. Day found this problems in man pages
Example in docker search has an extranious -t
docker rmi has a typo

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: fe4c479f32
Component: cli
2017-06-02 00:07:01 +00:00
88ba0fa858 Add the memory swappiness tuning option to docker.
Memory swappiness option takes 0-100, and helps to tune swappiness
behavior per container.
For example, When a lower value of swappiness is chosen
the container will see minimum major faults. When no value is
specified for memory-swappiness in docker UI, it is inherited from
parent cgroup. (generally 60 unless it is changed).

Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Upstream-commit: b553af956f
Component: cli
2017-06-02 00:07:01 +00:00
d25588047e Align 'docker commit' docs with the code
It was missing some variants and 'maintainer' isn't actually supported.
Also sorted the list of allowed cmds in the code just to make it easier
to diff with the docs.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c88c5588bf
Component: cli
2017-06-02 00:07:01 +00:00
bd5d4ae937 update reference to config file
`docker login` in 1.7 produces a config file in `~/docker/config.json`
instead of a `~/.dockercfg`.

Signed-off-by: Nate Brennand <nate.brennand@clever.com>
Upstream-commit: 839e00bb6f
Component: cli
2017-06-02 00:07:01 +00:00
2f100155de Add support for DOCKER_CONFIG/--config to specific config file dir
Carry #11675

Aside from what #11675 says, to me a key usecase for this is to support
more than one Docker cli running at the same time but each may have its
own set of config files.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 408d7deaf7
Component: cli
2017-06-02 00:07:01 +00:00
9edf496500 Fix docs for oom-kill-disable
Addresses: #14440

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 5c0cf9dbf7
Component: cli
2017-06-02 00:07:01 +00:00
4ab1afc9a1 Update run.md
Put a space after the `###` in the Example section. On the github parser the result file looks ok, but in the docker page (<https://docs.docker.com/reference/run/>) looks ugly.

Signed-off-by: Átila Camurça <camurca.home@gmail.com>
Upstream-commit: fe4c3c26a3
Component: cli
2017-06-02 00:07:01 +00:00
2405e27120 Mention network driver plugins and point to protocol docs
Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
Signed-off-by: Tom Denham <tom.denham@metaswitch.com>
Upstream-commit: 6bfc07abd2
Component: cli
2017-06-02 00:07:01 +00:00
07e7c8577e Clarify that nproc is not for per container
Fix ulimit nproc spec in daemon

Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
Upstream-commit: db7a29716e
Component: cli
2017-06-02 00:07:01 +00:00
bc7ab3cdf2 Fixing the table rendering in reference/run.md
Signed-off-by: Peeyush Gupta <gpeeyush@linux.vnet.ibm.com>
Upstream-commit: 7277df6cee
Component: cli
2017-06-02 00:07:00 +00:00
57bfdb01b7 Revert "Fix implicit DeviceMapper selection"
This reverts commit 0a376291b2213699f986a7bca1cc8c4f4ed00f8d.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 083daaeb2b
Component: cli
2017-06-02 00:07:00 +00:00
2ef0c4da9d daemon.md: fix placement of exec driver heading
Options for zfs storage driver were incorrectly placed
under 'exec driver options' header. Move the header to
the correct place.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Upstream-commit: 19e5936533
Component: cli
2017-06-02 00:07:00 +00:00
433942510e Fix example in cmdline help text to have correct output
Showing "$$ exit 13" caught my eye and wasn't correct.
While in there I also made it so the following paragraph didn't go past 80 chars

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 11e73c0252
Component: cli
2017-06-02 00:07:00 +00:00
f3727792b8 Update docker commit man page re: volumes
Update the man page for 'docker commit' to make explicit the fact that
'commit' does not save data in volumes.

Addresses comments in #7583

Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
Upstream-commit: 569b77dda2
Component: cli
2017-06-02 00:07:00 +00:00
114a1b5710 Clarify .dockerignore example for Markdown files
The current documentation correctly states that dockerignore pattern
searches are non-recursive. However, the example given for Markdown
files seems to contradict this by saying that `*.md` will exclude *all*
Markdown files. This commit clarifies the situation by explicitly
specifying that `*.md` will only exclude files in the root directory of
the project.

Signed-off-by: Tim Wraight <tim.wraight@tangentlabs.co.uk>
Upstream-commit: 85ff60eb74
Component: cli
2017-06-02 00:07:00 +00:00
f73c587d92 Fix a broken anchor tag on the CLI builder page
Signed-off-by: Chris McKinnel <chrismckinnel@gmail.com>
Upstream-commit: c4541d3793
Component: cli
2017-06-02 00:07:00 +00:00
00bf9b7e19 Document the location of experimental binary
Some devs might want to download the binary directly,
especially for systems where the install script does not
work.

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 54ebf2ac44
Component: cli
2017-06-02 00:07:00 +00:00
61c7fe428b Fix for broken link
The link pointed to experimental.md, but that didn't exist. It looks like README.md was intended. Probably experimental.md was renamed.

Signed-off-by: Leen Besselink <github@consolejunkie.net>
Upstream-commit: 572844ad99
Component: cli
2017-06-02 00:07:00 +00:00
758bcff07d Fix implicit DeviceMapper selection
DeviceMapper must be explicitly selected because the Docker binary might not be linked to the right devmapper library.

With this change, Docker fails fast if the driver detection finds the devicemapper directory but the driver is not the default option.
The option `override_udev_sync_check` doesn't make sense anymore, since the user must be explicit to select devicemapper, so it's being removed.
Docker fails to use devicemapper only if Docker has been built statically unless the option was explicit.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1028f69f59
Component: cli
2017-06-02 00:07:00 +00:00
43f540b400 Unify docker commands' usage in man and help
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 75186acbff
Component: cli
2017-06-02 00:06:59 +00:00
4aa2c173ed Flag Addition: --type flag added for docker inspect command
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 24e7d40f42
Component: cli
2017-06-02 00:06:59 +00:00
8de5fd2e46 Plugins JSON spec.
Allow full configuration of external plugins via a JSON document.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7cd538db6f
Component: cli
2017-06-02 00:06:59 +00:00
52722c7f40 Typo in memory-swap flag
Fixes #14253

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: f7e2399648
Component: cli
2017-06-02 00:06:59 +00:00
25210bf840 Closes #13323 and carries
Entering comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 5fbf370b98
Component: cli
2017-06-02 00:06:59 +00:00
f01f7d0493 Typo
Signed-off-by: Eric Sage <eric.david.sage@gmail.com>
Upstream-commit: 2feacfe882
Component: cli
2017-06-02 00:06:59 +00:00
d2eb4d3e3e docs: fix file's permissions
The README.md and the *.png should not have the executable
permissions, remove them.

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
Upstream-commit: 11b6e1b9fd
Component: cli
2017-06-02 00:06:59 +00:00
12591b7963 Update English expressions by review comments
Signed-off-by: TAGOMORI Satoshi <tagomoris@gmail.com>
Upstream-commit: 398c74e0a9
Component: cli
2017-06-02 00:06:59 +00:00
8f232c6c53 Add new logging driver: fluentd
Signed-off-by: TAGOMORI Satoshi <tagomoris@gmail.com>
Upstream-commit: c240006d20
Component: cli
2017-06-02 00:06:59 +00:00
d9083672d0 Fix docs for #14047
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c2049a1703
Component: cli
2017-06-02 00:06:59 +00:00
23b01970ec Update plugins_volume.md
Signed-off-by: Mark Oates <fl0yd@me.com>
Upstream-commit: a5791e2541
Component: cli
2017-06-02 00:06:59 +00:00
b95868bcf0 man: convert docker/docs/man to docker/man
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
Upstream-commit: e438dd5f6e
Component: cli
2017-06-02 00:06:59 +00:00
36c7167e96 Splitting out the cli command into parts.
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 4f9fac3803
Component: cli
2017-06-02 00:06:59 +00:00
ea0f82ab96 Set exit code of old running container as 137
Signed-off-by: Chun Chen <chenchun.feed@gmail.com>
Upstream-commit: 686e6d31e7
Component: cli
2017-06-02 00:06:59 +00:00
0bd517dc5c Breaking logging driver material out of run
- creating index which is overview of configuring logs
- linking to individual journald/fluent material
- leaving behind table and link to index in run

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 2e3dc04935
Component: cli
2017-06-02 00:06:59 +00:00
6c14839c1e Move zfs options doc to the storage section.
Zfs options belong to the storage section, but they were added under the exec driver section.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1a184988a2
Component: cli
2017-06-02 00:06:59 +00:00
9ae79c61c1 Add --log-opt to specify facility for syslog driver
Signed-off-by: Dennis Docter <dennis@d23.nl>
Upstream-commit: 6970c146e0
Component: cli
2017-06-02 00:06:59 +00:00
870bf94b3d Typo
Signed-off-by: Tobias Bradtke <webwurst@gmail.com>
Upstream-commit: eeceb060e4
Component: cli
2017-06-02 00:06:59 +00:00
f0b564c133 Update documentation for compose/swarm/network
Thanks to @aanand for help debugging

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 5a85af0b24
Component: cli
2017-06-02 00:06:58 +00:00
dee47b32fe Add link to compose/swarm/network to readme
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: c7abe26ac1
Component: cli
2017-06-02 00:06:58 +00:00
d78016c6ec Add experimental Compose/Swarm/multi-host networking guide
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: eea6efd4d8
Component: cli
2017-06-02 00:06:58 +00:00
33262015d7 Vendoring in libnetwork for native multihost networking
- brings in vxlan based native multihost networking
- added a daemon flag required by libkv for dist kv operations
- moved the daemon flags to experimental

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: bd624770e1
Component: cli
2017-06-02 00:06:58 +00:00
f7d91b77b4 Update the zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: becaec720e
Component: cli
2017-06-02 00:06:58 +00:00
6bd6747ee8 Support downloading remote tarball contexts in builder jobs.
Signed-off-by: Moysés Borges <moysesb@gmail.com>
Upstream-commit: d7b3d72cfc
Component: cli
2017-06-02 00:06:58 +00:00
5673a4860d Initial Services docs
Signed-off-by: Dave Tucker <dt@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: b06c14eda9
Component: cli
2017-06-02 00:06:58 +00:00
c0b7ae4429 work on #11094 allow import from local file
Signed-off-by: Gildas Cuisinier <gildas.cuisinier@gcuisinier.net>
Upstream-commit: c1571b2a74
Component: cli
2017-06-02 00:06:58 +00:00
0384565fd6 Network UI / API docs
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: e1c14885ee
Component: cli
2017-06-02 00:06:58 +00:00
0cead707d2 Fixing seds, deleting old stuff
Signed-off-by: Mary Anthony <mary@docker.com>

Upding sed, adding script to avoid redirects, remove mkdos

Signed-off-by: Mary Anthony <mary@docker.com>

Ignoring graphics with sed

Signed-off-by: Mary Anthony <mary@docker.com>

Fixing kitematic image

Signed-off-by: Mary Anthony <mary@docker.com>

Removing draft

Signed-off-by: Mary Anthony <mary@docker.com>

Fixing link

Signed-off-by: Mary Anthony <mary@docker.com>

removing from the menu

Signed-off-by: Mary Anthony <mary@docker.com>

Updatiing order of project material

Signed-off-by: Mary Anthony <mary@docker.com>

Removing from Regsitry v2 content per Olivier

Signed-off-by: Mary Anthony <mary@docker.com>

tweaking the touchup

Signed-off-by: Mary Anthony <mary@docker.com>

Removing include; only used four places; hugo global var replace

Signed-off-by: Mary Anthony <mary@docker.com>

Entering fixes from page-by-page

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 9916538ad8
Component: cli
2017-06-02 00:06:58 +00:00
9e52d04ed0 docker-inspect: Extend docker inspect to export image/container metadata related to graph driver
Export image/container metadata stored in graph driver. Right now 3 fields
DeviceId, DeviceSize and DeviceName are being exported from devicemapper.
Other graph drivers can export fields as they see fit.

This data can be used to mount the thin device outside of docker and tools
can look into image/container and do some kind of inspection.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 147a754d4a
Component: cli
2017-06-02 00:06:58 +00:00
a823c0de7c Remove sources/ under docs directory
See #13936.

Signed-off-by: ChaYoung You <yousbe@gmail.com>
Upstream-commit: 7507a5b7ab
Component: cli
2017-06-02 00:06:58 +00:00
18a7041c64 retooling for hugo
Tweaking for Hugo
Updating the Dockerfile with new sed; fix broken link on Kitematic
Fixing image pull for Dockerfile
Removing docs targets

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: d1d033701e
Component: cli
2017-06-02 00:06:58 +00:00
93ac1a1540 Add --net=container with --publish --publish-all --expose error out
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: bd7b88932c
Component: cli
2017-06-02 00:06:58 +00:00
b2011f7d28 Carry of PR #13520
Removinig files

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 2b50e0f852
Component: cli
2017-06-02 00:06:58 +00:00
63b67a1bf6 Update plugins.md
Fixed broken link.

Signed-off-by: Amy Lindburg <amy.lindburg@docker.com>

Update plugins.md

Some other broken links!

Signed-off-by: Amy Lindburg <amy.lindburg@docker.com>

Update plugin_api.md

FIxing broken links.

Signed-off-by: Amy Lindburg <amy.lindburg@docker.com>

Update plugins_volume.md

Fixing more links.

Signed-off-by: Amy Lindburg <amy.lindburg@docker.com>
Upstream-commit: 097c3c2e8e
Component: cli
2017-06-02 00:06:58 +00:00
b89d530f48 Update man page Dockerfile to use go-md2man v1.0.1 and go-lang 1.4
The main Dockerfile to was updated - this update brings the
sub-directory specific file inline with it.

Fixes #12866

Signed-off-by: Brian Exelbierd <bex@pobox.com>
Upstream-commit: 6e8bfc5d5e
Component: cli
2017-06-02 00:06:58 +00:00
47692c55ca Updating with fix for first line and the vieux/amy comment on website
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 5f9164db14
Component: cli
2017-06-02 00:06:58 +00:00
83f9474db9 Moving man pages out of docs
Adding in other areas per comments
Updating with comments; equalizing generating man page info
Updating with duglin's comments
Doug is right here again;fixing.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 77868b76b9
Component: cli
2017-06-02 00:06:57 +00:00
9db872a7cb add UDP GELF logging-driver
allows to send container logs to Graylog or Logstash.

Signed-off-by: Marius Sturm <marius@graylog.com>
Upstream-commit: 972214455d
Component: cli
2017-06-02 00:06:57 +00:00
a2cd41b75e Default events since to current time
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f062b77f18
Component: cli
2017-06-02 00:06:57 +00:00
32fcb04cb0 Typo psuedo - pseudo
Signed-off-by: ponsfrilus <ponsfrilus@gmail.com>
Upstream-commit: 355f241838
Component: cli
2017-06-02 00:06:57 +00:00
30efafda8e [docs] Update builder docs on last-modified times
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 1de916edad
Component: cli
2017-06-02 00:06:57 +00:00
4b5cfedb3d Fix COPY/ADD quoted/json form
Minor tweak to the quoted/json form and made man page look like the Dockerfile
docs.  W/o the `,` people may think there should be a space delimited list.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0e820ef647
Component: cli
2017-06-02 00:06:57 +00:00
2ea058a0df Minor doc edit to add clarity around the --volume path format
Also add a comment to the ValidatePath func so devs/reviewers
know exactly what its looking for.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 5683dcc183
Component: cli
2017-06-02 00:06:57 +00:00
10f4910ae5 Remove reference to experimental release
Remove reference to experimental releases as it is really a nightly
channel rather than a scheduled release.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 299e90305c
Component: cli
2017-06-02 00:06:57 +00:00
35f2690cb1 Rename EXPERIMENTAL.md to README.md
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: c632793d43
Component: cli
2017-06-02 00:06:57 +00:00
f875350449 Moving experimental
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 17d4c36de4
Component: cli
2017-06-02 00:06:57 +00:00
a45546e8b2 Update urls from .com to .org.
I added 301 redirects from dockerproject.com to dockerproject.org but may as
well make sure everything is updated anyways.

Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 9ac00da7ce
Component: cli
2017-06-02 00:06:57 +00:00
97da5d91c7 Allow duration strings as --since/--until
Fixes #13107. This change enables Go duration strings
computed relative to the client machine’s time to be used
as input parameters to `docker events --since/--until`
and `docker logs --since` arguments.

Added unit tests for pkg/timeutils.GetTimestamp as well.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 326cf83bcc
Component: cli
2017-06-02 00:06:57 +00:00
250204b7d0 Wrap lines for journald docs
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: cf8790f920
Component: cli
2017-06-02 00:06:57 +00:00
4e4f09e126 Change address to syslog-address in syslog docs
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f9f6d8a353
Component: cli
2017-06-02 00:06:57 +00:00
6ca4003cae Add syslog-tag option for syslog log-driver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 0558f93aa9
Component: cli
2017-06-02 00:06:57 +00:00
c21bc4b39a Updating after the pr went through
Updating with comments.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 0cc368b423
Component: cli
2017-06-02 00:06:57 +00:00
4181f4409b Fix spelling mistakes in documentation
While reading  some of the docs I noticed a few errors, so I ran
misspellings (https://pypi.python.org/pypi/misspellings) on markdown files

Signed-off-by: Joe Gordon <joe.gordon0@gmail.com>
Upstream-commit: bb27aa0ce9
Component: cli
2017-06-02 00:06:57 +00:00
c83888d194 Add a "Created" state for new containers that haven't been run yet
Closes #13353

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 835d319cc0
Component: cli
2017-06-02 00:06:57 +00:00
1fe4f2fc90 Premature newline insertions
Noticed that there were a few newlines in the middle of a \`...\` blocks that
made the text look funny when displayed in HTML.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 8eec36a1ea
Component: cli
2017-06-02 00:06:57 +00:00
aa4333719a Add note about overlay not being production ready
Add a paragraph in cli.md mentioning that overlay is not a production
ready graphdriver.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: c23cfcf30d
Component: cli
2017-06-02 00:06:56 +00:00
72c09c48d3 Add syslog-address log-opt
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: ba522b3391
Component: cli
2017-06-02 00:06:56 +00:00
b291440ff0 Update bash completion for 1.7.0
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 342d0cd04c
Component: cli
2017-06-02 00:06:56 +00:00
ad5f4858d9 Add comment about ulimit format.
Fixes #12116

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 51fee8e7ae
Component: cli
2017-06-02 00:06:56 +00:00
d3bad84186 doc cli lint.
- 79 char line length (non-command).
- Consistent single space between sentences.
- Replace start of line tabs with spaces.
- Remove trailing white space.
- Consistent "**Note:**" style.
  https://docs.docker.com/project/doc-style/#notes
- Replace the ``` sections with indented code.

Signed-off-by: Lloyd Dewolf <foolswisdom@gmail.com>
Upstream-commit: 739c2672a7
Component: cli
2017-06-02 00:06:56 +00:00
8437669639 Modify volume mounts SELinux labels on the fly based on :Z or :z
This patch is extending the qualifiers on the -v command to allow
an admin to tell the system to relabel, content. There might be a
need for something similar for changing the DAC Permissions.

Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 011e17933c
Component: cli
2017-06-02 00:06:56 +00:00
7f3a5b193f Fixes title, line wrap, and Adds install area
Tibor's comment
Updating with the new plugins
Entering comments from Seb

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: b4bef542a7
Component: cli
2017-06-02 00:06:56 +00:00
6b897604a6 Revert "Add docker exec run a command in privileged mode"
This reverts commit 72a500e9e5929b038816d8bd18d462a19e571c99.

Signed-off-by: Jessica Frazelle <princess@docker.com>

Conflicts:
	daemon/execdriver/native/exec.go
	integration-cli/docker_cli_exec_test.go
	runconfig/exec.go
Upstream-commit: 05c0da3b96
Component: cli
2017-06-02 00:06:56 +00:00
eb09a34bbb Markdown changes (thanks to runcom for the rebase+squash handholding)
Signed-off-by: Jan-Jaap Driessen <janjaapdriessen@gmail.com>
Upstream-commit: dc770ac858
Component: cli
2017-06-02 00:06:56 +00:00
e9538f943d doc: cli images examples rm "| head".
It's a given that lines of example output might be truncated or come
from a contrived environment.

Signed-off-by: Lloyd Dewolf <foolswisdom@gmail.com>
Upstream-commit: 6dbd08344f
Component: cli
2017-06-02 00:06:56 +00:00
abafa590fe Document in the experimental section
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
(cherry picked from commit a31633c2707c78c2ffd684a5a3e576f310af0fb5)
Upstream-commit: f79ccc1171
Component: cli
2017-06-02 00:06:56 +00:00
8a2bc64772 Move Documentation changes out or this PR.
The will come in a follow up PR inside the experimental section.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7809f8a5ef
Component: cli
2017-06-02 00:06:56 +00:00
dda3050115 Mark volume drivers and plugins as experimental in the documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 93d3cc3101
Component: cli
2017-06-02 00:06:56 +00:00
7300398d11 Volumes refactor and external plugin implementation.
Signed by all authors:

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Signed-off-by: Luke Marsden <luke@clusterhq.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ef99ac464b
Component: cli
2017-06-02 00:06:56 +00:00
d0458318bb Experimental features placeholder
Signed-off-by: Mary Anthony <mary@docker.com>

Adding experimental features into the mix

Signed-off-by: Mary Anthony <mary@docker.com>

renaming file

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 12c58642ba
Component: cli
2017-06-02 00:06:56 +00:00
ea16c04a2a respect -H in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9c413dcfc4
Component: cli
2017-06-02 00:06:56 +00:00
4ae6d04e85 root dir for execdriver (/var/run/docker) should be configurable
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 7defdb0868
Component: cli
2017-06-02 00:06:56 +00:00
edfeb650e8 Add --uts=host to allow sharing the UTS namespace
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 02c900f4c5
Component: cli
2017-06-02 00:06:56 +00:00
0e414078ef Missing exec-opt[] option in CommandLine docs
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 2f114119bd
Component: cli
2017-06-02 00:06:56 +00:00
62f1457cde Add --since argument to docker logs cmd
Added --since argument to `docker logs` command. Accept unix
timestamps and shows logs only created after the specified date.

Default value is 0 and passing default value or not specifying
the value in the request causes parameter to be ignored (behavior
prior to this change).

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: a92995bc14
Component: cli
2017-06-02 00:06:56 +00:00
c0fea694cc docs: move zfs.fsname option to storage option section
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 4edc51e283
Component: cli
2017-06-02 00:06:56 +00:00
834b8aae09 Implement Docker on ZFS
Signed-off-by: Arthur Gautier <baloo@gandi.net>
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 35172ee021
Component: cli
2017-06-02 00:06:56 +00:00
e8a925c579 Allow links to be specified with only the name if this matches the alias
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 313659dd18
Component: cli
2017-06-02 00:06:56 +00:00
1ad8193325 Default MAC address generation is not random and should be stated in the documentation.
Signed-off-by: Gianluca Borello <g.borello@gmail.com>
Upstream-commit: ed206bfca4
Component: cli
2017-06-02 00:06:55 +00:00
37cbf376eb add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: edbbcc6dae
Component: cli
2017-06-02 00:06:55 +00:00
bbbac1c21c Add log opts flag to pass in logging options
Signed-off-by: wlan0 <sidharthamn@gmail.com>
Upstream-commit: 9949905359
Component: cli
2017-06-02 00:06:55 +00:00
8834d9e361 Add support --net=container with --mac-address,--add-host error out
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 68f8a90e3d
Component: cli
2017-06-02 00:06:55 +00:00
db297e1322 add blkio.weight support
We can use this to control block IO weight of a container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 19815c878d
Component: cli
2017-06-02 00:06:55 +00:00
35d282f75f Add --userland-proxy daemon flag
The `--userland-proxy` daemon flag makes it possible to rely on hairpin
NAT and additional iptables routes instead of userland proxy for port
publishing and inter-container communication.

Usage of the userland proxy remains the default as hairpin NAT is
unsupported by older kernels.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: ee666e8d4b
Component: cli
2017-06-02 00:06:55 +00:00
51de3c55fb Make the docs for --cgroup-parent better
Signed-off-by: Marianna <mtesselh@gmail.com>
Upstream-commit: 2cf6bfdc61
Component: cli
2017-06-02 00:06:55 +00:00
34c283fd66 Adding doc
Signed-off-by: Julien Barbier <write0@gmail.com>
Upstream-commit: 3fca935671
Component: cli
2017-06-02 00:06:55 +00:00
d3cd09fb11 Allow pulling stats once and disconnecting.
Adds a `stream` query param to the stats API which allows API users to
only collect one stats entry and disconnect instead of keeping the
connection alive to stream more stats.

Also adds a `--no-stream` flag to `docker stats` which does the same

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 485c6d868b
Component: cli
2017-06-02 00:06:55 +00:00
ca3e83257e spelling fix from Marc MERLIN
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 5b8040c935
Component: cli
2017-06-02 00:06:55 +00:00
a91cf05860 Use git url fragment to specify reference and dir context.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: bbfd8f5e04
Component: cli
2017-06-02 00:06:55 +00:00
d6953e86b7 journald log driver: use CONTAINER_ID field for container id
This patch modifies the journald log driver to store the container ID in
a field named CONTAINER_ID, rather than (ab)using the MESSAGE_ID field.
Additionally, this adds the CONTAINER_ID_FULL field containing the
complete container ID and CONTAINER_NAME, containing the container name.

When using the journald log driver, this permits you to see log messages
from a particular container like this:

    # journalctl CONTAINER_ID=a9238443e193

Example output from "journalctl -o verbose" includes the following:

    CONTAINER_ID=27aae7361e67
    CONTAINER_ID_FULL=27aae7361e67e2b4d3864280acd2b80e78daf8ec73786d8b68f3afeeaabbd4c4
    CONTAINER_NAME=web

Closes: #12864
Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
Upstream-commit: c6bcaacce7
Component: cli
2017-06-02 00:06:55 +00:00
0180f3810e Feature: option for disable OOM killer
Add cgroup support for disable OOM killer.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 16d979a292
Component: cli
2017-06-02 00:06:55 +00:00
94a4f91981 Only complete repos with "docker pull -a"
With this, `docker pull deb<tab>` will show all `debian:*` tags, as before, but `docker pull -a deb<tab>` will complete directly to just `debian`. 👍

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 14411fae61
Component: cli
2017-06-02 00:06:55 +00:00
7b62110c7d option to configure cgroups
Signed-off-by: Jessica Frazelle <jess@docker.com>
Upstream-commit: 109f9996a9
Component: cli
2017-06-02 00:06:55 +00:00
9956e4d35a Add docs for --exec-opt and setting native.cgroupdriver.
update man pages.
update bash completion.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 734430c44c
Component: cli
2017-06-02 00:06:55 +00:00
71cca65cf6 add support for exclusion rules in dockerignore
Signed-off-by: Dave Goodchild <buddhamagnet@gmail.com>
Upstream-commit: 63193b17b1
Component: cli
2017-06-02 00:06:55 +00:00
4da3316cfb Copy edits for typos
Signed-off-by: Ed Costello <epc@epcostello.com>
Upstream-commit: fcf01194a9
Component: cli
2017-06-02 00:06:55 +00:00
38c15ae6cd Document the extra depth argument in git contexts.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 72f4a6bc1c
Component: cli
2017-06-02 00:06:55 +00:00
23a611d95b Add cpu cfs quota to build
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 433f49684e
Component: cli
2017-06-02 00:06:55 +00:00
147f85cdb4 Fix typo in builder reference
Signed-off-by: Tristan Carel <tristan.carel@gmail.com>
Upstream-commit: 3f2bc86a4f
Component: cli
2017-06-02 00:06:54 +00:00
94d260e45d Makes headings in documentation consistent
Fixes #10673.

Signed-off-by: Rick Wieman <git@rickw.nl>
Upstream-commit: acc0eac695
Component: cli
2017-06-02 00:06:54 +00:00
1d8626a153 Add journald as a supported logger for containers
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 33e6a5b9c5
Component: cli
2017-06-02 00:06:54 +00:00
39d45439fe Update builder.md
Single value labels do not work in 1.6 and multi-label instructions only work when separated by non-EOL whitespace.
I also added an example snip from the inspect output with the labels that are included in this guide.

Signed-off-by: Jeff Nickoloff <jeff@allingeek.com>
Upstream-commit: 8bf56348e9
Component: cli
2017-06-02 00:06:54 +00:00
b9dcb44871 Remove some unsupported instructions in the docs.
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 66d3021b49
Component: cli
2017-06-02 00:06:54 +00:00
e28ed017e0 Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 6c60a3415c
Component: cli
2017-06-02 00:06:54 +00:00
76ce20a10c Add -H|--human flag to docker history
Add a flag to print sizes and dates in human readable format.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f00c5d0720
Component: cli
2017-06-02 00:06:54 +00:00
46f11b5f47 Allow specifying a default gateway for bridge networking
Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
Upstream-commit: 7604419278
Component: cli
2017-06-02 00:06:54 +00:00
3edad80714 Add .docker/config.json and support for HTTP Headers
This PR does the following:
- migrated ~/.dockerfg to ~/.docker/config.json. The data is migrated
  but the old file remains in case its needed
- moves the auth json in that fie into an "auth" property so we can add new
  top-level properties w/o messing with the auth stuff
- adds support for an HttpHeaders property in ~/.docker/config.json
  which adds these http headers to all msgs from the cli

In a follow-on PR I'll move the config file process out from under
"registry" since it not specific to that any more. I didn't do it here
because I wanted the diff to be smaller so people can make sure I didn't
break/miss any auth code during my edits.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 9dd7c2c70d
Component: cli
2017-06-02 00:06:54 +00:00
efac4ac77f Add cpuset-mems support for docker build
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 39840874a3
Component: cli
2017-06-02 00:06:54 +00:00
d9394807a2 add support for cpuset.mems
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 84861b2109
Component: cli
2017-06-02 00:06:54 +00:00
8a5fe0bed0 fix memory stats display document
Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
Upstream-commit: 2040dff996
Component: cli
2017-06-02 00:06:54 +00:00
38c9ef629e Add docker exec run a command in privileged mode
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: cae7221b8d
Component: cli
2017-06-02 00:06:54 +00:00
ab684537e4 Add -u|--user flag to docker exec for running command as a different user
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 3ca275df6d
Component: cli
2017-06-02 00:06:54 +00:00
6eff7eb501 change memory usage display
using standard unix postfixes add unit test for display
also change doc for memory usage display change
for example GiB will be GB

Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
Upstream-commit: a878ece032
Component: cli
2017-06-02 00:06:54 +00:00
a384008538 Add a note about PID 1 not terminating on SIGINT/SIGTERM.
Also re-arranged the description of CTRL-c to make it clearer.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Upstream-commit: 07ee4d5ec2
Component: cli
2017-06-02 00:06:54 +00:00
e99fbca7ff HTTPS URLs for docs top-level & man pages
This updates all of docs outside of sources.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: b22aaac047
Component: cli
2017-06-02 00:06:54 +00:00
0511c4cc92 'docker rmi -f IMAGE_ID' untag all names and delete the image
If an image has been tagged to multiple repos and tags, 'docker
rmi -f IMAGE_ID' will just untag one random repo instead of
untagging all and deleting the image. This patch implement
this. This commit is composed of:

        *untag all names and delete the image

        *add test to this feature

        *modify commandline/cli.md to explain this

Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: d5fb91f48c
Component: cli
2017-06-02 00:06:53 +00:00
23e3ea7abe devmapper: storage-opt override for udev sync
This provides an override for forcing the daemon to still attempt
running the devicemapper driver even when udev sync is not supported.

Intended to be a very clear impairment for those choosing to use it. If
udev sync is false, there will still be an error in the daemon logs,
even when the override is in place. The docs have an explicit WARNING.

Including link to the docs for users that encounter this daemon error
during an upgrade.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: c121c24125
Component: cli
2017-06-02 00:06:53 +00:00
36f1773fee cli: Better wording for daemon --log-driver
This flag is passed to the daemon CLI. In my opinion, "Container's
logging driver" is not accurate and refers to 'one container'.

Also the `syslog` driver was missing from the list. Having the list
of all logging drivers won't scale here (should be <80 chars per line)
and we have `rotation` driver coming up in the pipeline as well (gh11485).

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 298268dd0a
Component: cli
2017-06-02 00:06:53 +00:00
f1c92dcce0 Rebase + some fixes
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 31e77481ff
Component: cli
2017-06-02 00:06:53 +00:00
7d1130e17a Refine document by review comments
Signed-off-by: David Young <yangboh@cn.ibm.com>
Upstream-commit: 6ad4157d89
Component: cli
2017-06-02 00:06:53 +00:00
812276749f Add comment column in docker history command output
Signed-off-by: David Young <yangboh@cn.ibm.com>
Upstream-commit: b43ebd8449
Component: cli
2017-06-02 00:06:53 +00:00
5ed6667bf3 Fix a typo in /doc/sources/reference/run.md
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
Upstream-commit: cd83db8e07
Component: cli
2017-06-02 00:06:53 +00:00
0a62633cd3 Carry PR 12008 for contributor
Closes #8040
Remove a tic for the hawk

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 959ae3c211
Component: cli
2017-06-02 00:06:53 +00:00
5a729dc4e8 Fix 2 typos in /doc/sources/reference/run.md
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
Upstream-commit: 4836b6041a
Component: cli
2017-06-02 00:06:53 +00:00
35948fa830 docker info show logging driver info
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: 850a1672bb
Component: cli
2017-06-02 00:06:53 +00:00
4248a36d9f fix the space thing.
Signed-off-by: Simei He <hesimei@zju.edu.cn>
Upstream-commit: 4f146e1a81
Component: cli
2017-06-02 00:06:53 +00:00
8ef90f8053 minor edits.
Signed-off-by: Simei He <hesimei@zju.edu.cn>
Upstream-commit: 097e382e78
Component: cli
2017-06-02 00:06:53 +00:00
2b59eb2a38 fix issue #11676 #11754, disable RLIMIT_AS,edit DOCKER_OPTS
Signed-off-by: Simei He <hesimei@zju.edu.cn>
Upstream-commit: a4c88adc4d
Component: cli
2017-06-02 00:06:53 +00:00
87d832f221 fix typo in cli.md
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: e2ecc5c6de
Component: cli
2017-06-02 00:06:53 +00:00
89f22b4397 docs: fix bullet list and missing label filter
Some bullet lists didn't render as bullet-lists because
of a missing newline.

Also added missing "label" filter for `docker ps` and
slightly re-worded the header above the supported filters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 48add9c908
Component: cli
2017-06-02 00:06:53 +00:00
f7e21a2b4b Add some missing option to bash completion
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 26c3652d5e
Component: cli
2017-06-02 00:06:53 +00:00
14004cb76b Add support for more advanced ${xxx:...} syntax
Just ${xxx:+...} and ${xxx:-...} for now

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: efc478e33c
Component: cli
2017-06-02 00:06:52 +00:00
2568ea2e48 Fix heading level of logging drivers
Syslog was a heading-2, but should be heading-3;
changed the headings to heading-4 to match the
"network settings" section.

Also changed "Log driver" to "logging driver" for JSON.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 07995c4ef3
Component: cli
2017-06-02 00:06:52 +00:00
b86e6831ba Revison the some columns to make table clearer
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
Upstream-commit: 5ed0d9c3de
Component: cli
2017-06-02 00:06:52 +00:00
4d0c23a8b2 Remove dupllicated prefix to make table shorter & fix bugs
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn>
Upstream-commit: 5b000494ee
Component: cli
2017-06-02 00:06:52 +00:00
cf5a6d43f7 Add capabilities list information table.
Signed-off-by: Chen Qiu <21321229@zju.edu.cn>
Upstream-commit: 0864264159
Component: cli
2017-06-02 00:06:52 +00:00
e326deef86 Add missing filters to bash completion for docker images and docker ps
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d0fefccd8d
Component: cli
2017-06-02 00:06:52 +00:00
8a9d154752 Do not complete --cgroup-parent as _filedir
This is a follow-up on PR 11708, as suggested by tianon.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 4d5758b252
Component: cli
2017-06-02 00:06:52 +00:00
03dc80863d document dirperm1 fix for #783 in known issues
Since `dirperm1` requires a more recent aufs patch than many current OS release,
we cant remove #783 completely. This documents that docker will apply `dirperm1`
automatically for systems that support it

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: 729035faff
Component: cli
2017-06-02 00:06:52 +00:00
4bfc1c3bca Explain --net=host option usage
Fixes #11630

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 7ac28ecb2c
Component: cli
2017-06-02 00:06:52 +00:00
83fec2a376 #11465 Add additional doc for locagi registries onn pull command
Signed-off-by: John Willis <john.willis@docker.com>
Upstream-commit: e1cbe1c398
Component: cli
2017-06-02 00:06:52 +00:00
0f62af11ba Add Glossary to documentation
Closes #11057

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 5dad1f409f
Component: cli
2017-06-02 00:06:52 +00:00
293fc1d57e Add a missing definite article
Signed-off-by: Michael West <mwest@mdsol.com>
Upstream-commit: 229fa7b7b9
Component: cli
2017-06-02 00:06:52 +00:00
3ac223b9b7 Add man pages generation instructions.
Signed-off-by: Michael West <mwest@mdsol.com>
Upstream-commit: 443da2a625
Component: cli
2017-06-02 00:06:52 +00:00
71f6d6f041 Add some run option to bash completion
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 984a0d8dee
Component: cli
2017-06-02 00:06:52 +00:00
4fa12af301 Removing sudo from command line examples
We now advise people to configure docker group and
add to sudo.  Mac shouldn't use sudo.  Removed sudo
from command examples.  Left in installation to be removed
in installation doc sweep -- removing requires finer
grain control.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: fb7eb87b94
Component: cli
2017-06-02 00:06:52 +00:00
f979089af6 Removing sudo from examples
We now have instructions in our Unix installs about setting up
docker group to avoid sudo.  Also, Mac/Windows shouldn't use
sudo.  So, I've removed sudo from our examples and added a
section at the top reminding them that if they have to use
sudo to run docker they can change that.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: c4323175d9
Component: cli
2017-06-02 00:06:52 +00:00
7ad0b821b5 Rename Fds to File Descriptors in docker info
This makes the docker info more readable. Also change a log line
in a test file renaming Fds

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: bce6adadff
Component: cli
2017-06-02 00:06:52 +00:00
728ca1f0bb .: remove trailing white spaces
blame tibor this one ;-)
```
find . -type f -not -name '*.png' -not -name '*.go' -not -name '*.md'
-not -name '*.tar' -not -name '*.pem' -not -path './vendor/*' -not -path
'./.git/*' -not -path '*/testdata/*' -not -path './docs/*images*' -not
-path '*/testfiles/*' -not -path './bundles/*' -not -path
'./docs/*static*/*' -not -path './docs/*article-img/*' -exec grep -HnEl
'[[:space:]]$' {} \; | xargs sed -iE 's/[[:space:]]*$//'
```

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 1bca003519
Component: cli
2017-06-02 00:06:51 +00:00
dba480a36b Revert "Dealing with trailing whitespaces"
The validation script from #10681 is too pedantic, and does not handle
well situations like:

```
cat <<EOF   # or <<-EOF
	Whether the leading whitespace is stripped out or not by bash
	it should still be considered as valid.
EOF
```

This reverts commit 4e65c1c319afffc325853b88c9aef0c42ec83482.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3574eda4c1
Component: cli
2017-06-02 00:06:51 +00:00
0b778adb78 Add some info about what environment variables are available
Having the list in one spot makes it easier for people to see what's
avaiable instead of having to scan all of the docs and extract the info.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d25b8ec297
Component: cli
2017-06-02 00:06:51 +00:00
56ba763d48 add cpuset and examples to run.md
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 7618ff84f8
Component: cli
2017-06-02 00:06:51 +00:00
e97ca146b6 docs: add memory and swap memory usage examples
fix: https://github.com/docker/docker/issues/11629

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 645b49d05b
Component: cli
2017-06-02 00:06:51 +00:00
05cd256c83 Dealing with trailing whitespaces
Created a validation that detects all trailing whitespaces from every
text file that isn't *.go, *.md, vendor/*,
docs/theme/mkdocs/tipuesearch*

Removed trailing whitespaces from every text file except from vendor/*
builder/parser/testfiles*, docs/theme/mkdocs/tipuesearch* and *.md

Signed-off-by: André Martins <martins@noironetworks.com>
Upstream-commit: 1f934f1094
Component: cli
2017-06-02 00:06:51 +00:00
64fd7feaca fix docker ps help message
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
Upstream-commit: 653fdbc2f8
Component: cli
2017-06-02 00:06:51 +00:00
5d40224f3e Added missing code example in the RM command reference of command to delete all stopped containers
Signed-off-by: Natalie Parker <nparker@omnifone.com>
Upstream-commit: 886b571641
Component: cli
2017-06-02 00:06:51 +00:00
75d1a0ff30 restrict bash completion for hostdir arg to directories
The previous state assumed that the HOSTPATH argument referred to a
file. As clarified by moxiegirl in PR #11305, it is a directory.
Adjusted completion to reflect this.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fc2a7eea91
Component: cli
2017-06-02 00:06:51 +00:00
8ece884edf add syslog driver
Signed-off-by: wlan0 <sid@rancher.com>
Upstream-commit: 72bb856565
Component: cli
2017-06-02 00:06:51 +00:00
39d8bc547c Fix some escaping around env var processing
Clarify in the docs that ENV is not recursive

Closes #10391

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f32b6eb23c
Component: cli
2017-06-02 00:06:51 +00:00
1e74a9742a Implement build cancellation
Add the capability to cancel the build by disconnecting the client.

This adds a `cancelled` channel which is used to signal that a build
should halt. The build is halted by sending a Kill signal and noticing
that the cancellation channel is closed.

This first pass implementation does not allow cancellation during a
pull, but that will come in a subsequent PR.

* Add documentation of cancellation to cli and API

* Protect job cancellation with sync.Once

* Add TestBuildCancelationKillsSleep

* Add test case for build cancellation of RUN statements.

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: e9942aeb8a
Component: cli
2017-06-02 00:06:51 +00:00
ed9cbed2b2 doc: reference/run introduce -it .
Also:
- Fix "docker" cmd always "sudo docker" for docs.
- Fix "-ti" with "-it".
- fix "/docker" typo.

Signed-off-by: Lloyd Dewolf <foolswisdom@gmail.com>
Upstream-commit: f672cb24cb
Component: cli
2017-06-02 00:06:51 +00:00
21300d2002 Updating in light of new contributors guide
Link to new guide. Added a quickstart contributor guide for experienced people.
Converting narrative style to procedures for easier use. I think there is something missing in the
release publishing section...but it looks like it was missing in the original.
Updates per thaJeztah
Edits per Fred
Updating with comments from Sven

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: fc39612aaa
Component: cli
2017-06-02 00:06:51 +00:00
a3a26dede6 docs: cli: reorder rename command to be in alphabetical order
Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
Upstream-commit: 698b8d3ed0
Component: cli
2017-06-02 00:06:51 +00:00
0f6be90129 fix wrong tab completion
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: f86dcef486
Component: cli
2017-06-02 00:06:51 +00:00
c9fcb9fc79 Remove 'name' filter from docker events documentation
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: fe7a340316
Component: cli
2017-06-02 00:06:51 +00:00
d0069fd287 Adding integration tests for --cgroup-parent feature.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: d3a6b5adff
Component: cli
2017-06-02 00:06:50 +00:00
59ef98f403 Adding documentation for '--cgroup-parent' option.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: ae117d58d4
Component: cli
2017-06-02 00:06:50 +00:00
e6d3f9945a Allow setting resource constrains for build
Closes #10191

Allow `docker build` to set --cpu-shares, --cpuset, --memory,
--memory-swap for all containers created by the build.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: edc7c88640
Component: cli
2017-06-02 00:06:50 +00:00
dc6dc9b463 Modified docker export to allow an --output flag
Copied code from CmdSave into CmdExport. This should work, not an expert in the API calls being made. But it does make more sense to have a consistent export/save flag.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

checkpoint before edits on the export functions

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Added an --output flag to docker export and created tests.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

White space cleanup.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Docker-DCO-1.1-Signed-off-by: Joseph Kern <jkern@semafour.net> (github: jfrazelle)

checkpoint before edits on the export functions

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

White space cleanup.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Added text to reflect a new output option for the export command.

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Whitespace clean up

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>

Added man page documentation for the new --output flag in export

Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>
Upstream-commit: 4aa65f26aa
Component: cli
2017-06-02 00:06:50 +00:00
c59266e9ae Clarify behavior of docker cp
The STDOUT behavior of cp is not yet released in 1.50 so removed.
Also, tested against 1.5 all other behaviors and extended documentation to match.
Renamed HOSTPATH to HOSTDIR to give a self documenting name.

Adding back in the references to STDOUT
fix the command string
Entering Doug's comment re append and ~/tmp/foo in the glass
Adding in Doug's comments regarding PATHs and missing |-
Updating with James comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: f1cb33631f
Component: cli
2017-06-02 00:06:50 +00:00
edbfd74dae Updates to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e2b5fc47e3
Component: cli
2017-06-02 00:06:50 +00:00
ff8aabb69e Updating with Sven's comments and other tweaks
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: ade615a458
Component: cli
2017-06-02 00:06:50 +00:00
37e848aecb Fail docker logs on all logging drivers apart from 'json-file'
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e30532cf3f
Component: cli
2017-06-02 00:06:50 +00:00
2fb4844dac Default 'json-file' logging driver and none logging driver
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 1459501312
Component: cli
2017-06-02 00:06:50 +00:00
409acea418 Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: 2eaa831df5
Component: cli
2017-06-02 00:06:50 +00:00
3320d5612e Documentation changes for labels
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: bfca1f4258
Component: cli
2017-06-02 00:06:50 +00:00
a5708d1737 Docs changes for labels based on feedback
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 6b65e560cb
Component: cli
2017-06-02 00:06:50 +00:00
1b8ddaebbc Add labels documentation
Adds more documentation for labels and adds the label instruction to the
man-pages.

Also included is a document called "Labels - custom meta-data in Docker"
in the user-guide, this is still a work-in-progress I started to describe
the "namespaces" conventions, an example on storing structured data.

I ran a bit "out of steam" (writers block?) on that document, but kept
it in (for now), in case it still ends up useful.

The Remote API documentation changes will need to be moved to the
docker_remote_api_v1.18.md document when rebasing the whole PR.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: b5c9f3f13a
Component: cli
2017-06-02 00:06:50 +00:00
0857654a41 Add docs for container/image labels
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: f39af7acf4
Component: cli
2017-06-02 00:06:50 +00:00
bb1e827ed6 Allow specification of Label Name/Value pairs in image json content
Save "LABEL" field in Dockerfile into image content.

This will allow a user to save user data into an image, which
can later be retrieved using:

docker inspect IMAGEID

I have copied this from the "Comment" handling in docker images.

We want to be able to add Name/Value data to an image to describe the image,
and then be able to use other tools to look at this data, to be able to do
security checks based on this data.

We are thinking about adding version names,
Perhaps listing the content of the dockerfile.
Descriptions of where the code came from etc.

This LABEL field should also be allowed to be specified in the
docker import --change LABEL:Name=Value
docker commit --change LABEL:Name=Value

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 72b8275268
Component: cli
2017-06-02 00:06:50 +00:00
555c8026aa Add "eval" to every invocation of "boot2docker shellinit"
See http://unix.stackexchange.com/a/181581 for the rationale behind this change.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: fd05b908be
Component: cli
2017-06-02 00:06:50 +00:00
d2823eba52 docs: use more tables in run reference and minor fixups
This adds two more tables to the run reference documentation.

- the list of 'modes' for Network settings is now a table.
- the "note" for `--net="host"` was moved from the list to the detailed
  description.
- the 'options' for "Runtime constraints on CPU and memory" are
  now a table
- slightly re-worded the description for "memory" options, e.g.
  "It is not allowed..." was rewriten to "The *container* is not allowed..."
- fix example in "Runtime privilege, Linux capabilities, and LXC configuration"
  being indented twice
- slightly reduced indenting in some `usage` output to be better readable.
- fixes a typo `/ets/hosts` -> `/etc/hosts`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3359add082
Component: cli
2017-06-02 00:06:50 +00:00
e157861d81 Add some information about the docker build return code
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 18fea6ea4a
Component: cli
2017-06-02 00:06:49 +00:00
00b4bd449b move resources from Config to HostConfig
Cgroup resources are host dependent, they should be in hostConfig.

For backward compatibility, we just copy it to hostConfig, and leave it in
Config for now, so there is no regressions, but the right way to use this
throught json is to put it in HostConfig, like:
  {
      "Hostname": "",
      ...
      "HostConfig": {
	  "CpuShares": 512,
          "Memory": 314572800,
          ...
      }
  }

As we will add CpusetMems, CpusetCpus is definitely a better name, but some
users are already using Cpuset in their http APIs, we also make it compatible.

The main idea is keep using Cpuset in Config Struct, and make it has the same
value as CpusetCpus, but not always, some scenarios:
 - Users use --cpuset in docker command, it can setup cpuset.cpus and can
   get Cpuset field from docker inspect or other http API which will get
   config info.
 - Users use --cpuset-cpus in docker command, ditto.
 - Users use Cpuset field in their http APIs, ditto.
 - Users use CpusetCpus field in their http APIs, they won't get Cpuset field
   in Config info, because by then, they should already know what happens
   to Cpuset.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 40d499514f
Component: cli
2017-06-02 00:06:49 +00:00
e9c38c2803 Add "Docker" to Reference pull-down for Command Line
A minor thing, but I noticed that the "Reference" drop-down menu just
says "Command line".  This was fine when we just had one command line,
but now there's also 'Compose command line' and I suspect we may add
others later.  We should qualify the Docker one with the word "Docker"
in front

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 9e6338b24d
Component: cli
2017-06-02 00:06:49 +00:00
f6d132a377 Consistency in the restart policy docs
Signed-off-by: Mary Anthony <mary.anthony@docker.com>
Upstream-commit: 84883d9d6f
Component: cli
2017-06-02 00:06:49 +00:00
47635e7334 Change cli.md to show right docker rmi output
`docker rmi` output in docs/sources/reference/commandline/cli.md
is different from real scene. This commit fixes it.

Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: 90e99d521d
Component: cli
2017-06-02 00:06:49 +00:00
edf755a3af Use system's ephemeral port range for port allocation
Read `/proc/sys/net/ipv4/ip_local_port_range` kernel parameter to obtain
ephemeral port range that now sets the boundaries of port allocator
which finds free host ports for those exported by containers.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 6098d0f443
Component: cli
2017-06-02 00:06:49 +00:00
eaf96905f1 docs: api-enable-cors is deprecated,updated docs description
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: 0be893a352
Component: cli
2017-06-02 00:06:49 +00:00
56dbe81cee Minor tweak to build -f text to make it clear Dockerfile is in context
Closes #11289

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 10a12ec17e
Component: cli
2017-06-02 00:06:49 +00:00
934492366e Adds 'name' filter to the CLI reference.
Also sorts the filter and fixes the bullet list.

Signed-off-by: Rick Wieman <git@rickw.nl>
Upstream-commit: 1fcf42aa8d
Component: cli
2017-06-02 00:06:49 +00:00
db711ef85c Add system time to /info
This change adds daemon's system time as RFC3339Nano to the `/info` endpoint
and shows in a more readable format (UnixDate) in `docker -D info` output.

I will be using this to fix the clock skew between the remote test host and
the CI machines running `docker events`-related tests as they're using `--since`
and `--until` and the timestamps are not matching when daemon is not on the
same machine.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: cbbc74c2ac
Component: cli
2017-06-02 00:06:49 +00:00
4304688cd7 Fix a few code rendering errors in docs
Signed-off-by: ChristoperBiscardi <chris@docker.com>
Upstream-commit: 50caf393cb
Component: cli
2017-06-02 00:06:49 +00:00
91fa2d600e filter events by container name,id or partial id
Addresses #10645

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: d174e92779
Component: cli
2017-06-02 00:06:49 +00:00
dede462a29 Need to support new linux capability AUDIT_READ
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: e75c4494ed
Component: cli
2017-06-02 00:06:49 +00:00
8397f0209d Set default restart policy name to 'no' Closes #10874
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 688dc5977b
Component: cli
2017-06-02 00:06:49 +00:00
5b40eb5af0 Add --ulimit and --default-ulimit to bash completion
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: d8c4619844
Component: cli
2017-06-02 00:06:49 +00:00
d62485cc11 Add bash completion for docker events --filter and --until.
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 9690067dee
Component: cli
2017-06-02 00:06:49 +00:00
46e22930ae Fix docker start help message
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: a9394281b4
Component: cli
2017-06-02 00:06:48 +00:00
4ffbcead4d Add support for 'docker cp' to write to stdout
Closes #10805

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 30240ffc53
Component: cli
2017-06-02 00:06:48 +00:00
4ebb37f92b Show how to remove a file from the docs s3 bucket, and then invalidate the cloudflare cache
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 863f296d3a
Component: cli
2017-06-02 00:06:48 +00:00
0f5cfa4975 fix to cpu.shares documentation by @hqhq
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 5f274ccd57
Component: cli
2017-06-02 00:06:48 +00:00
512a13d62b docs: fix cpu.shares part in man pages
The original description has some mistakes and lack of many useful
information, I rewrite them to make it accurate and complete.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: ef5874f0a9
Component: cli
2017-06-02 00:06:48 +00:00
d8f9782fd3 Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 80728bcd7b
Component: cli
2017-06-02 00:06:48 +00:00
54ef332e9a Docs: add restart-policies to 'Run reference'
This moves some information on restart-policies from
the "command line" page to "run reference".

Also fixes some minor typos and adds a "NOTE"
about --rm and --restart not allowed to be combined.

Also removes inline CSS styles from tables,
which will be styled by the stylesheet, and fixes
some minor MarkDown errors (`<` -> &lt;)

depends on https://github.com/docker/docs-base/pull/1

resolves #11069

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 99a47ff600
Component: cli
2017-06-02 00:06:48 +00:00
d6cbeaf542 Tell users about how VOLUME initializes the new mount point/volume
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d69dea3c44
Component: cli
2017-06-02 00:06:48 +00:00
348a220c93 Fix docker build and docker run bash completion
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 5bc113a640
Component: cli
2017-06-02 00:06:48 +00:00
237e7669a6 docker info display http/https_proxy setting
Signed-off-by: Zhang Wentao <zhangwentao234@huawei.com>
Upstream-commit: 93b07b4a63
Component: cli
2017-06-02 00:06:48 +00:00
805c1892c0 Add cors header flag and leave boolean flag not changed
Deprecate api-enable-cors

Update docs & man files

Signed-off-by: harry zhang <resouer@163.com>
Upstream-commit: 92b48f975a
Component: cli
2017-06-02 00:06:48 +00:00
0c176b600d Fix 'docker ps --help' so the options don't span more than one line
and add a testcase to catch this in the future.

While in there I also:
- removed extra periods from the few options that had them (new test)
- made the --filter option consistent across all command

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 71a1c33533
Component: cli
2017-06-02 00:06:48 +00:00
d780896594 Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d20a7f0d85
Component: cli
2017-06-02 00:06:48 +00:00
af66fddb35 Support dockerfile and Dockerfile
Closes #10807

Adds support for `dockerfile` ONLY when `Dockerfile` can't be found.
If we're building from a Dockerfile via stdin/URL then always download
it a `Dockerfile` and ignore the -f flag.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 9574a12bad
Component: cli
2017-06-02 00:06:48 +00:00
ba91e1ac06 Notes should be indented
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 8ac0e4d95e
Component: cli
2017-06-02 00:06:48 +00:00
20da3725ba Update cli.md
Use `-it` combination in example instead of `-ti`, because this is how it used everywhere in examples.

Update dockerfile_best-practices.md

Fix typo in command name

Signed-off-by: Dmitry Gusev <dmitry.gusev@gmail.com>
Upstream-commit: aadc671cf0
Component: cli
2017-06-02 00:06:48 +00:00
d3e248b539 Correct --add-host documentation regarding host IP address retrieval
Fixes: 10855

The example was actually incorrect for many situations, and also, now
that we have IPv6 we should not that the example is for IPv4 and note
how to find IPv6 addresses.  Also, the device they want to connect to
could be the bridge, or main ethernet device, or some other device
name, so note that as well.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 3004c90b51
Component: cli
2017-06-02 00:06:48 +00:00
0ebeff7671 Implements stats for lxc driver
Implements stats and fixes stats test.

Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: 91b4e8ad56
Component: cli
2017-06-02 00:06:47 +00:00
81765c1180 pass --change changes to the import job
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 99ef14ddab
Component: cli
2017-06-02 00:06:47 +00:00
699ee445ac add docs for commit --change
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 6042a6f9a4
Component: cli
2017-06-02 00:06:47 +00:00
1b5e543305 a little re-writing
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 10560b0a8f
Component: cli
2017-06-02 00:06:47 +00:00
6e5bdec15f zsh: update zsh completion for docker command
zsh completion is updated with the content of
felixr/docker-zsh-completion.

ef4a3fce0437 Update completion for `wait' as per 1.5.0
ace5aa9c1282 Add completion for `stats'
91f112834865 Update completion for `search' as per 1.5.0
a5e4febe4bf6 Update completion for `save' as per 1.5.0
1cdbdb18a384 Add completion for `rename'
2f004bb724b9 Update completion for `pull' as per 1.5.0
773b88e0885b Update completion for `logs' as per 1.5.0
c57e5d5c4551 Update completion for `load' to favor archive files
9af7d12b487e Update completion for `images` as per 1.5.0
0d59e66aff30 update completion for `exec' to complete on commands
46b6c66760d7 Update completion for `events' as per 1.5.0
307e0bdc4c34 Update completion for `commit' as per 1.5.0
c4b331f38cc4 Update completion for `build' as per 1.5.0

Also added myself in the `MAINTAINERS` file.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: e49fa872b4
Component: cli
2017-06-02 00:06:47 +00:00
ea73b522bd cli: Add server OS/Arch info to 'version' cmd
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: b67b89f4cd
Component: cli
2017-06-02 00:06:47 +00:00
c047794822 Remove CLI doc entry related to API-only function
Closes #10278

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 209f3889e0
Component: cli
2017-06-02 00:06:47 +00:00
b5d06e072c Fixes #10457-Pause-and-unpause-accept-multi-containers
Applied multi parameters to pause and unpause.
Created a new test file dedicated for pause commands.
Created a new utility function to get a slice of paused containers.
Updated documentation

Signed-off-by: André Martins <martins@noironetworks.com>
Upstream-commit: d73a9d48f5
Component: cli
2017-06-02 00:06:47 +00:00
9ba45bbe34 Group published and exposed ports by contiguous ranges
Signed-off-by: Colm Hally <colmhally@gmail.com>
Upstream-commit: 6ecd6bb069
Component: cli
2017-06-02 00:06:47 +00:00
b8f84c577a add logpath to docker inspect.
Signed-off-by: Bradley Cicenas <bradley.cicenas@gmail.com>
Upstream-commit: f99a52dc6c
Component: cli
2017-06-02 00:06:47 +00:00
7719cf0e1f Shorten help messages for docker cmd flags
In order to fit printed messages to fit 80 chars,
rewording messages for `-H` and `--tls` flags.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: ee1b138b2b
Component: cli
2017-06-02 00:06:47 +00:00
7ee27fd32c Add bash completion for docker rename
Signed-off-by: Mike Dillon <mike@embody.org>
Upstream-commit: ceee2175bd
Component: cli
2017-06-02 00:06:47 +00:00
fd50a93b59 Fix bash completion for docker run -d
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3bb3eae782
Component: cli
2017-06-02 00:06:47 +00:00
28ebc7e0f5 Fix 'docker stats' help message
Closes #10771

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f91ddd939f
Component: cli
2017-06-02 00:06:47 +00:00
432a9fc0f7 Removes the feature to pull all image aliases.
It didn't work on v2 anyways. And an image with a lot of aliases was slow to
fetch.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)
Upstream-commit: 16b4b98c34
Component: cli
2017-06-02 00:06:47 +00:00
8a8f9ad087 Use newer help out for 'docker' and 'docker run'
Closes #10828

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 3820b31267
Component: cli
2017-06-02 00:06:47 +00:00
2bba386e30 Clean up explanation of doc branches.
Signed-off-by: Peter Salvatore <peter@psftw.com>
Upstream-commit: e2ac0fc917
Component: cli
2017-06-02 00:06:47 +00:00
e8160e6d23 Update docs for HTTP_PROXY
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 8c6610787a
Component: cli
2017-06-02 00:06:46 +00:00
8ec6a20c55 Update docker.fish
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)

Signed-off-by: Coenraad Loubser <coenraad@wish.org.za>
Upstream-commit: 01187a4030
Component: cli
2017-06-02 00:06:46 +00:00
2859cab687 Documentation on boolean flags is wrong #10517
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 2202790fcd
Component: cli
2017-06-02 00:06:46 +00:00
f0885a3ea4 Distinguish ENV from setting environment inline
It's ambiguous to say that `ENV` is _functionally equivalent to prefixing the command with `<key>=<value>`_. `ENV` sets the environment for all future commands, but `RUN` can take chained commands like `RUN foo=bar bash -c 'echo $foo' && bash -c 'echo $foo $bar'`. Users with a solid understanding of `exec` may grok this without confusion, but less experienced users may need this distinction.

Signed-off-by: Michael A. Smith <msmith3@ebay.com>

Improve Environment Handling Descriptions

- Link `ENV` and `Environment Replacement`
- Improve side-effects of `ENV` text
- Rearrange avoiding side effects text

Signed-off-by: Michael A. Smith <msmith3@ebay.com>
Upstream-commit: 95fe3a1a93
Component: cli
2017-06-02 00:06:46 +00:00
d738b0d9c0 Fix example about ps and linked containers
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 74279772e5
Component: cli
2017-06-02 00:06:46 +00:00
9882c59f32 Format awsconfig sample config correctly
Reflow change in commit 195f3a3f removed newlines in the config format.

This change reverts the sample config to the original formatting, which
matches the actual config format of a `awsconfig` file.

Signed-off-by: Katie McLaughlin <katie@glasnt.com>
Upstream-commit: 2fedce8411
Component: cli
2017-06-02 00:06:46 +00:00
d22e4aebf1 update docs for memory and memoryswap
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: c03b0700a4
Component: cli
2017-06-02 00:06:46 +00:00
5a74dcd37e For now, docker stats appears to be libcontainer only
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: e52b4ad35c
Component: cli
2017-06-02 00:06:46 +00:00
6d25d34bba Bash completion for docker kill
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 063a4f574a
Component: cli
2017-06-02 00:06:46 +00:00
f6eff1aac5 Fix a small spelling error in the dm.blkdiscard docs
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: aa33ee11d0
Component: cli
2017-06-02 00:06:46 +00:00
5b966c6a59 Docker attach documentation didn't make sense to me
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 89e02d9d88
Component: cli
2017-06-02 00:06:46 +00:00
f0ff9d086e Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 130c0bf094
Component: cli
2017-06-02 00:06:46 +00:00
352ffbf987 Spelling mistake in dockerlinks
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: c995dee4c1
Component: cli
2017-06-02 00:06:46 +00:00
3b006fc8cc docs: change events --since to fit RFC3339Nano
PR6931 changed time format to RFC3339Nano.
But the example in cli.md does not changed.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Upstream-commit: 2627488a27
Component: cli
2017-06-02 00:06:46 +00:00
5d0802d112 Fix docs so WORKDIR mentions it works for COPY and ADD too
The docs around COPY/ADD already mentioned that it will do a relative
copy/add based on WORKDIR, so that part is already ok.  Just needed to
tweak the WORKDIR section since w/o mentioning COPY/ADD it can be misleading.

Noticed by @phemmer

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 37fd964edb
Component: cli
2017-06-02 00:06:46 +00:00
875d536e72 Update fish completion for 1.5.0
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: dc7a9b9c0e
Component: cli
2017-06-02 00:06:46 +00:00
b52831aaaf Add completion for stats.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: e6158378b5
Component: cli
2017-06-02 00:06:46 +00:00
d76dbb5c6d Add bash completions for daemon flags, simplify with extglob
Implementing the deamon flags the traditional way introduced even more
redundancy than usual because the same list of options with flags
had to be added twice.

This can be avoided by using variables in the case statements when
using the extglob shell option.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 0dafe480ab
Component: cli
2017-06-02 00:06:46 +00:00
ec0d1c6463 Docker run -e FOO should erase FOO if FOO isn't set in client env
See #10141 for more info, but the main point of this is to make sure
that if you do "docker run -e FOO ..." that FOO from the current env
is passed into the container.  This means that if there's a value, its
set.  But it also means that if FOO isn't set then it should be unset in
the container too - even if it has to remove it from the env.  So,
   unset HOSTNAME
   docker run -e HOSTNAME busybox env
should _NOT_ show HOSTNAME in the list at all

Closes #10141

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 642218cefa
Component: cli
2017-06-02 00:06:45 +00:00
3de3e281b4 Update to docker stats documentation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 3296ada2ed
Component: cli
2017-06-02 00:06:45 +00:00
1bdb79875f Add documentation for stats feature
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 9da6238f41
Component: cli
2017-06-02 00:06:45 +00:00
417805a657 An initial quick import of documentation from Compose, Machine and Swarm
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: ff12640c2b
Component: cli
2017-06-02 00:06:45 +00:00
a556d8bf19 Add docs for --memory-swap.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: f870b2c6f5
Component: cli
2017-06-02 00:06:45 +00:00
5dccac542c Update the docs for --link accept container id
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: ca57d01f87
Component: cli
2017-06-02 00:06:45 +00:00
ef7ce74d6b Add the list of possible values for --log-level to help text
Closes #10034

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6f56148726
Component: cli
2017-06-02 00:06:45 +00:00
5e88125007 Document that ENV vars are not automatically updated
Unlike the entries in `/etc/hosts`, environment-variables for linked
containers are not automatically updated if the linked container is
restarted.

This adds a note to the documentation in;
https://docs.docker.com/userguide/dockerlinks/#environment-variables
and
https://docs.docker.com/reference/run/#env-environment-variables

To make users aware that this is the case and recommends them to use
the `/etc/hosts` entries in stead.

I added this change because users were expecting environment variables
to be updated automatically as well (https://github.com/docker/docker/issues/10164).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7c63b49df6
Component: cli
2017-06-02 00:06:45 +00:00
b6a4c9fe71 Add documentation for HTTP proxies
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 4939c04b28
Component: cli
2017-06-02 00:06:45 +00:00
88a2eb4a22 Support whitespaces in ADD and COPY continued
Add tests and documentation for this new feature.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 776f4e478e
Component: cli
2017-06-02 00:06:45 +00:00
686c224963 Fix typo.
Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com>
Upstream-commit: da1720cca2
Component: cli
2017-06-02 00:06:45 +00:00
a7ed566eb0 Add build --pull and evenets --filter flags to the docs for 1.4
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 11c19fc0f3
Component: cli
2017-06-02 00:06:45 +00:00
4b071354e8 Add backing filesystem info to docker info command where applicable
Fixes #9960

This adds the output of a "Backing Filesystem:" entry to `docker info`
to overlay, aufs, and devicemapper graphdrivers. The default list
includes a fairly complete list of common filesystem names from
linux/include/uapi/linux/magic.h, but if the backing filesystem is not
recognized, the code will simply show "<unknown>"

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 74b009e816
Component: cli
2017-06-02 00:06:45 +00:00
fb3a2bf634 Docs: Add note that export doesn't include volume data.
The documentation on `docker export` doesn't mention that
data in volumes is not included in the export.

This adds a note that volumes are not part of the export
and refers to the "Backup, restore, or migrate data volumes"
to give the user some pointers.

Relates to https://github.com/docker/docker/issues/10095

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 72aae7c046
Component: cli
2017-06-02 00:06:45 +00:00
8b57d28fc0 changed format of cli note
Signed-off-by: Nathan Hsieh <hsieh.nathan@gmail.com>
Upstream-commit: 40ee6737ea
Component: cli
2017-06-02 00:06:45 +00:00
3c02a08288 added note to man & cli docs on search limit
Signed-off-by: Nathan Hsieh <hsieh.nathan@gmail.com>
Upstream-commit: 1c6f4dc7fb
Component: cli
2017-06-02 00:06:45 +00:00
909c972594 Add --readonly for read only container rootfs
Add a --readonly flag to allow the container's root filesystem to be
mounted as readonly.  This can be used in combination with volumes to
force a container's process to only write to locations that will be
persisted.  This is useful in many cases where the admin controls where
they would like developers to write files and error on any other
locations.

Closes #7923
Closes #8752

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 221cd67e25
Component: cli
2017-06-02 00:06:45 +00:00
3af7c4551a Add a note that remote and Boot2Docker users should not type sudo
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: e14d0cf87e
Component: cli
2017-06-02 00:06:44 +00:00
1e0e65f98b Allow the container to share the PID namespace with the host
We want to be able to use container without the PID namespace.  We basically
want containers that can manage the host os, which I call Super Privileged
Containers.  We eventually would like to get to the point where the only
namespace we use is the MNT namespace to bring the Apps userspace with it.

By eliminating the PID namespace we can get better communication between the
host and the clients and potentially tools like strace and gdb become easier
to use.  We also see tools like libvirtd running within a container telling
systemd to place a VM in a particular cgroup, we need to have communications of the PID.

I don't see us needing to share PID namespaces between containers, since this
is really what docker exec does.

So currently I see us just needing docker run --pid=host

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: f4573ee0bc
Component: cli
2017-06-02 00:06:44 +00:00
07a134c3ff rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: d246ce1f3d
Component: cli
2017-06-02 00:06:44 +00:00
67ff33a519 Fix order of pause and port in command line documentation.
Signed-off-by: Andreas Köhler <andi5.py@gmx.net>
Upstream-commit: dde41d008e
Component: cli
2017-06-02 00:06:44 +00:00
52d9478b69 Adding IPv6 network support to docker
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: 663bc8e969
Component: cli
2017-06-02 00:06:44 +00:00
2cd1fe2d7b Add @ArikaChen's tip for using HTTPS proxy to pull
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
Upstream-commit: 2b97e7c82e
Component: cli
2017-06-02 00:06:44 +00:00
c0e17b6f88 Specify ENV variables are also used for CMD.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: fbe252581a
Component: cli
2017-06-02 00:06:44 +00:00
a07f74111e Allow for Dockerfile to be named something else.
Add a check to make sure Dockerfile is in the build context
Add docs and a testcase
Make -f relative to current dir, not build context

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 350d2e33b7
Component: cli
2017-06-02 00:06:44 +00:00
d5c66b30ea Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c88762b38b
Component: cli
2017-06-02 00:06:44 +00:00
5119c5b376 Fixed minor typo
Signed-off-by: Christian Stefanescu <st.chris@gmail.com>
Upstream-commit: c5bd80c738
Component: cli
2017-06-02 00:06:44 +00:00
f57d12a5d7 Explicitly mention that '-P' maps to random ports
as noted in https://github.com/boot2docker/boot2docker/issues/690

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: d8d520cfbc
Component: cli
2017-06-02 00:06:44 +00:00
87fbe5d3b9 --help option and help command should print to stdout not stderr
--help and help are successful commands so output should not go to error.

    QE teams have requested this change, also users doing docker help | less
    or docker run --help | less would expect this to work.

    Usage statement should only be printed when the user asks for it.
    Errors should print error message and then suggest the docker COMMAND --help
    command to see usage information.

    The current behaviour causes the user to have to search for the error message
    and sometimes scrolls right off the screen.  For example a error on a
    "docker run" command is very difficult to diagnose.

    Finally erros should always exit with a non 0 exit code, if the user
    makes a CLI error.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: ea4024d2bd
Component: cli
2017-06-02 00:06:44 +00:00
c998ef06dc Add docs Cloudfront cache invalidation
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
Upstream-commit: bc5dd0cd32
Component: cli
2017-06-02 00:06:44 +00:00
b19512b38c add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: c33d198609
Component: cli
2017-06-02 00:06:44 +00:00
8339d95317 Sort options in bash completion alphabetically
This introduces a sort order for options:

Arrange options sorted alphabetically by long name with the short
options immediately following their corresponding long form.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3fb5792b25
Component: cli
2017-06-02 00:06:44 +00:00
e3a5916d4a Add missing options to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1d3be0eae9
Component: cli
2017-06-02 00:06:44 +00:00
978d20a4ab Document that there is a delay before the --restart policy restart, and that its double the last one
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
Upstream-commit: 6345932ff1
Component: cli
2017-06-02 00:06:44 +00:00
23e65f459b Talk up the 1.4 change to initialise volumes at time
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
Upstream-commit: 04e44cef6b
Component: cli
2017-06-02 00:06:44 +00:00
1fa3bb9676 Add "OOM killed" event based on OOM state information
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: bd4bbf0034
Component: cli
2017-06-02 00:06:43 +00:00
f021a10a56 Allow for relative paths on ADD/COPY
Moved Tianon's PR from: https://github.com/docker/docker/pull/7870
on top of the latest code

Closes: #3936

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c5bc505744
Component: cli
2017-06-02 00:06:43 +00:00
4b167499c3 Update the documentation for #9356 fix
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 8b6198a7f2
Component: cli
2017-06-02 00:06:43 +00:00
b39e021d90 add Scott's link checker script, and fix what it finds
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 1cc7a4eb81
Component: cli
2017-06-02 00:06:43 +00:00
0f45110f91 Additions for 1.4.1 release
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: 0ed37792d6
Component: cli
2017-06-02 00:06:43 +00:00
a5eb2e896f Refactor completion for docker run and docker create
_docker_run and _docker_create had only one differing line.

This refactoring features:

- direct completion for both commands to the same function
- factor out the common arguments, sort & format them nicely
- compute the argument for _docker_pos_first_nonflag.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ce7267e597
Component: cli
2017-06-02 00:06:43 +00:00
58884a83d3 Update fish shell completions.
Fixes #9550

Signed-off-by: Barnaby Gray <barnaby@pickle.me.uk>
Upstream-commit: 6a94570d5a
Component: cli
2017-06-02 00:06:43 +00:00
f6a50ae86c add note to docs about overlay + btrfs
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: e6d8a17cf5
Component: cli
2017-06-02 00:06:43 +00:00
d686976ec8 Added description for 'docker run' command, -c/--cpu-shares flag
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 41d3d7dc72
Component: cli
2017-06-02 00:06:43 +00:00
d82196393d Forbid client piping to tty enabled container
Forbid `docker run -t` with a redirected stdin (such as `echo test |
docker run -ti busybox cat`). Forbid `docker exec -t` with a redirected
stdin. Forbid `docker attach` with a redirect stdin toward a tty enabled
container.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 76daef2b9a
Component: cli
2017-06-02 00:06:43 +00:00
c804d95895 Add a fuse example, combining both SYS_ADMIN and --device
inspired by #9448 and #9487

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
Upstream-commit: acd8287c74
Component: cli
2017-06-02 00:06:43 +00:00
a4952d1f24 add --cap-add=NET_ADMIN to make a new network device
inspired by #9452

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>
Upstream-commit: c5e525eb4c
Component: cli
2017-06-02 00:06:43 +00:00
0463b47ef4 Return docker's root dir in docker -D info
This adds the docker daemon's root directory to docker info when running
in debug mode.  This allows the user to view the root directory where
docker is writing and storing state.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f96a52c955
Component: cli
2017-06-02 00:06:43 +00:00
aedc6dbfed Note that using -lxc-conf to change things Docker manages has pitfalls
Signed-off-by: Sven Dowideit <SvenDowideit@docker.com>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: dc2868ee11
Component: cli
2017-06-02 00:06:43 +00:00
c792fd44dd fixes as per feedback
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 640fabe8da
Component: cli
2017-06-02 00:06:43 +00:00
84ddb26bc1 Try out a different phrase for --icc
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 87353ddc98
Component: cli
2017-06-02 00:06:43 +00:00
aaed4e0c16 Doc: described storage-driver options in cli reference
Documented --storage-opt=[] option in cli reference page. Content taken
from:

  daemon/graphdriver/devmapper/README.md

Signed-off-by: Michal Minar <miminar@redhat.com>

Docker-DCO-1.1-Signed-off-by: Michal Minar <miminar@redhat.com> (github: SvenDowideit)
Upstream-commit: 716e639748
Component: cli
2017-06-02 00:06:43 +00:00
31e804025e Man: describe --icc option better
Current description is misleading. It make an impression the --icc=false
prevents containers to talk with each other.

Signed-off-by: Michal Minar <miminar@redhat.com>

Docker-DCO-1.1-Signed-off-by: Michal Minar <miminar@redhat.com> (github: SvenDowideit)
Upstream-commit: 0f2e87fcf8
Component: cli
2017-06-02 00:06:42 +00:00
d332fa764a Auto-update documentation from the output of the cli.
I've re-jigged the run man page so that each option's text begins with the
cli's help text for that flag, and then ay subsequent lines in the man page
are carried forward.

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: f79055e610
Component: cli
2017-06-02 00:06:42 +00:00
86a734c304 Something changed, broke the docs release script, and it seems that --exclude still doesn't work, so I'm removing it
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: bc4f74bc1d
Component: cli
2017-06-02 00:06:42 +00:00
080c97a25c Rename the overlay storage driver
so that docker is started with `docker -d -s overlay` instead of `docker -d -s overlayfs`

Signed-off-by: Lénaïc Huard <lhuard@amadeus.com>
Upstream-commit: 12a763ba5a
Component: cli
2017-06-02 00:06:42 +00:00
4736be8026 Fix dead link cli.md
Upstream-commit: f7c051492c
Component: cli
2017-06-02 00:06:42 +00:00
90939c9f0c docs: man docker-images: inconsistent naming
Synopsis is mentioning "NAME" while description is describing "REPOSITORY".

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Upstream-commit: 82436ff167
Component: cli
2017-06-02 00:06:42 +00:00
10e21c9024 Fix dead link build.md
Upstream-commit: 5d4d002c23
Component: cli
2017-06-02 00:06:42 +00:00
819c49ea5c Correct inaccuracy in docker pull documentation
Signed-off-by: Alexander Boyd <alex@opengroove.org>
Upstream-commit: ed00fc5e27
Component: cli
2017-06-02 00:06:42 +00:00
9fe52b1bc3 Update documentation for EXPOSE
The documentation for EXPOSE seems to indicate, that EXPOSE is only relevant in
the context of links, which is not the case.

Signed-off-by: Jacob Atzen <jatzen@gmail.com>
Upstream-commit: d40014d096
Component: cli
2017-06-02 00:06:42 +00:00
1edc2957dc Removed extraneous )
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 407a4a1916
Component: cli
2017-06-02 00:06:42 +00:00
efb266cb50 Add an example of how to add your client IP to the container hosts file
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 00a5a3fa8a
Component: cli
2017-06-02 00:06:42 +00:00
53c6a1a222 Fix a small typo
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
Upstream-commit: ab60926400
Component: cli
2017-06-02 00:06:42 +00:00
61fcd6e040 Explain what the VIRTUAL SIZE means
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 11d4be9719
Component: cli
2017-06-02 00:06:42 +00:00
3c97fbae98 docs nits
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 3b475ff060
Component: cli
2017-06-02 00:06:42 +00:00
4eba96b318 events filtering
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 8434115c69
Component: cli
2017-06-02 00:06:42 +00:00
f6d19e6000 Minor bash completion cleanup
The -n and --networking options were removed because they are
unsupported. 
Bash completion should not reveal the existence of otherwise
undocumented unsupported options.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3addb4d642
Component: cli
2017-06-02 00:06:42 +00:00
17cd5ae6d6 Add missing options to bash completion for the run and create commands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 055b224c90
Component: cli
2017-06-02 00:06:42 +00:00
e486807e94 Allow git@ prefixes for any hosted git service
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 923e1ecbc5
Component: cli
2017-06-02 00:06:41 +00:00
138a6b67c4 zsh: correctly parse available subcommands
A lot of flags have been added on the output of `docker help`. Use a
more robust method to extract the list of available subcommands by
spotting the `Command:` line and the next blank line.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 69d7e8443d
Component: cli
2017-06-02 00:06:41 +00:00
2c34b10f2b Made wording a bit more generic.
Upstream-commit: 536f41a73e
Component: cli
2017-06-02 00:06:41 +00:00
c59a968f67 Fixed typo in documentation.
Upstream-commit: 536361ff18
Component: cli
2017-06-02 00:06:41 +00:00
4f24766563 build: add pull flag to force image pulling
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 494cc3ad71
Component: cli
2017-06-02 00:06:41 +00:00
67b39c281e overlayfs: add --storage-driver doc
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: acb8b1b5f6
Component: cli
2017-06-02 00:06:41 +00:00
451c603811 key=values -> key=value
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: ddef8db902
Component: cli
2017-06-02 00:06:41 +00:00
7c74f2adec add daemon labels
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 1d559f6ade
Component: cli
2017-06-02 00:06:41 +00:00
bd9d6fbc20 If an image has more than one repo name or tag, it'll be listed more than once
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 43cd8c9586
Component: cli
2017-06-02 00:06:41 +00:00
4ddb957d2d Make --tlsverify enable tls regardless of value specified
I also needed to add a mflag.IsSet() function that allows you to check
to see if a certain flag was actually specified on the cmd line.

Per #9221 - also tweaked the docs to fix a typo.

Closes #9221

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d9382df2b3
Component: cli
2017-06-02 00:06:41 +00:00
95803a3f8e Add an example that shows starting apache in the foreground
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 440a18bb50
Component: cli
2017-06-02 00:06:41 +00:00
f0d8c03c8f tlsverify flag has no dash
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 9af3e1ad09
Component: cli
2017-06-02 00:06:41 +00:00
1c7bca9662 Add support for ENV of the form: ENV name=value ...
still supports the old form: ENV name value

Also, fixed an issue with the parser where it would ignore lines
at the end of the Dockerfile that ended with \

Closes #2333

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 489d01ee7d
Component: cli
2017-06-02 00:06:41 +00:00
65c2bcbe2e Hostname -> Name
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 44071eb4ce
Component: cli
2017-06-02 00:06:41 +00:00
0b6b46ba85 add docs
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: d0e9a94ae0
Component: cli
2017-06-02 00:06:41 +00:00
f70d2bcde7 Be clearer in docs about COPY/ADD dirs
COPY/ADD just copies the contents of dirs, not dirs themselves.
This PR tries to clear that up in the docs.

Closes #8775

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: da3b6648fd
Component: cli
2017-06-02 00:06:41 +00:00
0b8c579ffe Updated sig-proxy text also in zsh completion script
Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 0205c641fa
Component: cli
2017-06-02 00:06:41 +00:00
13768dcc5d Corrected description of --sig-proxy
Signal proxy does work only in non-TTY mode (--tty=false). Man pages and
commands should not lie about it.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: fec9e65e60
Component: cli
2017-06-02 00:06:40 +00:00
e97e6e3e85 makes the -s --size option documentation clearer #8950
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: ef4fe0e404
Component: cli
2017-06-02 00:06:40 +00:00
300fafc9bd Add --log-level support
Next steps, in another PR, would be:
- make all logging go through the logrus stuff
- I'd like to see if we can remove the env var stuff (like DEBUG) but we'll see

Closes #5198

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: aa2c308471
Component: cli
2017-06-02 00:06:40 +00:00
e249c558a6 Allow IPC namespace to be shared between containers or with the host
Some workloads rely on IPC for communications with other processes.  We
would like to split workloads between two container but still allow them
to communicate though shared IPC.

This patch mimics the --net code to allow --ipc=host to not split off
the IPC Namespace.  ipc=container:CONTAINERID to share ipc between containers

If you share IPC between containers, then you need to make sure SELinux labels
match.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 4d80935bff
Component: cli
2017-06-02 00:06:40 +00:00
27f2fd60d8 Fix typo "infortmation" in docs for docker run
Upstream-commit: 7f24369ab5
Component: cli
2017-06-02 00:06:39 +00:00
50d98e557e Updated the COPY directive reference: Source can't be a URL for COPY (+ formatting error fixes)
Signed-off-by: Roman Dudin <katrmr@gmail.com>
Upstream-commit: 2c1368cd2f
Component: cli
2017-06-02 00:06:39 +00:00
47e5cb2293 Add some details about the lifecycle of commands started with docker exec
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: e4401e3fe1
Component: cli
2017-06-02 00:06:39 +00:00
7beca7812a Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Closes #8331

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0d41e6a758
Component: cli
2017-06-02 00:06:39 +00:00
3319e2c64a unify (en dash) to - when specifying options
Signed-off-by: Xie Shi <georgexsh@gmail.com>
Upstream-commit: fb4c349f40
Component: cli
2017-06-02 00:06:39 +00:00
e381bb96ca Fix apparent copy paste mistake
The note under the RUN header refers to the CMD instruction. It should refer to the RUN instruction instead.

Signed-off-by: Huu Nguyen <whoshuu@gmail.com>
Upstream-commit: 86e72c6e06
Component: cli
2017-06-02 00:06:39 +00:00
829695e78b enhancing set-macaddress docu #2
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: 7a545897fe
Component: cli
2017-06-02 00:06:39 +00:00
1eb6ea9888 enhancing set-macaddress docu
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: a9e9f21f0f
Component: cli
2017-06-02 00:06:39 +00:00
93b94d46f6 Adding docker-cli run param to set MAC address
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: ad1a9d8d2f
Component: cli
2017-06-02 00:06:39 +00:00
2c48eb8298 Clarify USER instruction documentation
Reuse WORKDIR wording to specify that the USER instructions affect the
following RUN, CMD, and ENTRYPOINT instructions.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 7caa149d5f
Component: cli
2017-06-02 00:06:39 +00:00
b0ca1476df adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 5b9405b388
Component: cli
2017-06-02 00:06:39 +00:00
98446ec813 Fix docker exec command help messages
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 01b86d0d32
Component: cli
2017-06-02 00:06:39 +00:00
a312a1076d add missing 'current filter' to ps
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 39b226dc84
Component: cli
2017-06-02 00:06:39 +00:00
f1eebaa357 Mapping change in code
Signed-off-by: Huayi Zhang <irachex@gmail.com>
Upstream-commit: 166109859e
Component: cli
2017-06-02 00:06:39 +00:00
d89be4ab41 Add docs for --dns-search=.
PR 6720 introduce that use `--dns-search=.` will not set `search` in `/etc/resolv.conf`.

Signed-off-by: Huayi Zhang <irachex@gmail.com>
Upstream-commit: deabfbc88f
Component: cli
2017-06-02 00:06:39 +00:00
a4a835cb0f Adds new Docs Style Guide.
Includes changes to mkdocs yml and removes style info from docs Read Me, adding a link instead.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)

Conflicts:
	docs/README.md

Revisions to style guide based on review.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)

More Style Guide revisions based on review.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)

A few more style guide copy edits

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: c90e4b1bc5
Component: cli
2017-06-02 00:06:37 +00:00
d8ba847ba4 Adding self to various maintainers files.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: d83b068933
Component: cli
2017-06-02 00:06:37 +00:00
31abb69581 Tweaks to Dockerfile tutorial
Made a few tweaks to Dockerfile tutorial links and removed some cruft from the tutorial itself.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: a6ba3f585b
Component: cli
2017-06-02 00:06:37 +00:00
0243ab522c Expose # of CPUs and memory available on docker info.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 588d30ecca
Component: cli
2017-06-02 00:06:37 +00:00
ab2803a8e5 builder: Update documentation WRT environment replacement
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 15192a0bc1
Component: cli
2017-06-02 00:06:37 +00:00
e55b45b1a6 Rewrite ENTRYPOINT documentation covering all the combinations with examples.
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 9efb51fbc1
Component: cli
2017-06-02 00:06:37 +00:00
5e95091151 Link to run reference from cli doc
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: aedfc62293
Component: cli
2017-06-02 00:06:37 +00:00
be92ef689d zsh: update zsh completion for docker command
zsh completion is updated with the content of
felixr/docker-zsh-completion.

The major change since the last merge is the addition of
exec/create (but they were already present in the docker repository) as
well as pause/unpause/logout/events and the use of short/long options
when they are available. Some missing options were also added.

12f00abd7178 Add completion for `exec'
4e2faa075f9a Merge `run' and `create' commands.
34134de077de Add missing long/short options for most commands.
d09f62339ab5 Add completion for `pause' and `unpause'
e4754c3b3b9d Add completion for `logout'
e0935eb3d5d2 Add completion for `events'
dae353cb9afb Add completion for `create`

Docker-DCO-1.1-Signed-off-by: Vincent Bernat <vincent@bernat.im> (github: vincentbernat)
Upstream-commit: c55facc917
Component: cli
2017-06-02 00:06:37 +00:00
6b65799e84 Fixed a minor docs issue in a Dockerfile Example
The Dockerfile Instruction to create the .vnc directory results in a failure :
-storepasswd failed for file: /root/.vnc/passwd

Signed-off-by: Madhu Venugopal <madhu@socketplane.io>
Upstream-commit: a6594e13ce
Component: cli
2017-06-02 00:06:37 +00:00
5d0a93226f Fix support for --env-file in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f1a49f2560
Component: cli
2017-06-02 00:06:37 +00:00
26175343ba Docs syntax fix
the flags must come before the container name.
Upstream-commit: ff38494bbe
Component: cli
2017-06-02 00:06:37 +00:00
8f6a45b8f7 Add info on --device flag permissions ':rwm'
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 981a612adf
Component: cli
2017-06-02 00:06:37 +00:00
5d203350cb Rewrite documentation for insecure registries
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	docs/sources/reference/commandline/cli.md
Upstream-commit: d227c88e19
Component: cli
2017-06-02 00:06:37 +00:00
ef8ce68f4e Add the possibility of specifying a subnet for --insecure-registry
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	registry/endpoint.go
Upstream-commit: 5b491e6942
Component: cli
2017-06-02 00:06:36 +00:00
da915828c4 Docs edits for dropping SSLv3 and under + release notes for 1.3.1
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	docs/sources/index.md
Upstream-commit: f58767aced
Component: cli
2017-06-02 00:06:36 +00:00
e49075d737 Do not verify certificate when using --insecure-registry on an HTTPS registry
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	registry/registry.go
	registry/registry_test.go
	registry/service.go
	registry/session.go
Upstream-commit: 8d6cc5b994
Component: cli
2017-06-02 00:06:36 +00:00
fe3d69425b Expand documentation for --insecure-registries
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: c773557121
Component: cli
2017-06-02 00:06:36 +00:00
20491c04c2 make http usage for registry explicit
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

Conflicts:
	daemon/config.go
	daemon/daemon.go
	graph/pull.go
	graph/push.go
	graph/tags.go
	registry/registry.go
	registry/service.go
Upstream-commit: 15490a58b2
Component: cli
2017-06-02 00:06:36 +00:00
20075627ab Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Add some information about the storage and execution driver choices

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 22c0b17eb2
Component: cli
2017-06-02 00:06:36 +00:00
6be37a99f8 Mention the mkdocs.yml file for adding new documents
and move the complicated discussion about branches lower down,
hopefully most won't need to know

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: eecd9e7003
Component: cli
2017-06-02 00:06:36 +00:00
c2df77647a Add DOCKER_TLS_VERIFY environment variable, equivalent to --tlsverify flag
This makes it possible to make the Docker client "secure by default"
without wrapping the binary in a shell alias so that `--tlsverify` is
always passed.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: 57d75938cd
Component: cli
2017-06-02 00:06:36 +00:00
0d447af2a5 Add more info on attach inspired by discussion in #2855
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: c5e74b80e2
Component: cli
2017-06-02 00:06:36 +00:00
7e0af2af23 Fix href in docs w.r.t. cgroups freezer pointer
Apparently, the [...] and (http...) need to be right after each other instead
of on different lines.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: b8ab535076
Component: cli
2017-06-02 00:06:36 +00:00
7f52110b02 Fix typo: reguardless should be regardless
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6ad404ac57
Component: cli
2017-06-02 00:06:36 +00:00
fd6cf0bbdc Add some docs about which env vars are defined in new containers
@SvenDowideit FYI

Closes #3087

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 3be32c5e8e
Component: cli
2017-06-02 00:06:36 +00:00
183d9b651f Fix security-opt docs
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 53ee6d2237
Component: cli
2017-06-02 00:06:36 +00:00
bb5e93ffdb Multiple fixes to the cli.md document.
*. Fixed headings so the side menu will now be consistent. Some sections
had H3s that were displaying and others did not leaving the left menu
very mismatched.

* Fixed several spelling errors.

* Re-formatted several long lines and badly laid out paragraphs.

* Fixed several double backticks.

* Added backticks to several outputs and variables.

* Removed two issues that are no longer valid.

* Removed several double spaces and extra lines.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: a62d8740bf
Component: cli
2017-06-02 00:06:36 +00:00
dc688c1670 Add ENV variables support to WORKDIR build command
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Docker-DCO-1.1-Signed-off-by: Adrien Folie <folie.adrien@gmail.com> (github: folieadrien)

Conflicts:
	builder/builder.go
		This file has been deleted.
Upstream-commit: 410719e6df
Component: cli
2017-06-02 00:06:36 +00:00
7f828fa717 Add note to docs about lack of shell processing in JSON form
Closes #5509

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 49323dfac9
Component: cli
2017-06-02 00:06:36 +00:00
9bfc7548cb Optimize the bash completion even further
The biggest/bestest change here is cutting down on the number of calls to Docker in the filtering helpers (`__docker_containers_running`, etc), especially calls to the really heavy `docker images`.

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Upstream-commit: f071599471
Component: cli
2017-06-02 00:06:36 +00:00
8147491203 add bash completion support for pause and unpause
Signed-off-by: Michael Scharf <github@scharf.gr>
Upstream-commit: e775b26a78
Component: cli
2017-06-02 00:06:36 +00:00
73c5d2d2df update docs
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: c5f3535b06
Component: cli
2017-06-02 00:06:35 +00:00
7038ac21eb Add --security-opts options to allow user to customize security configuration
security-opts will allow you to customise the security subsystem.

For example the labeling system like SELinux will run on a container.

    --security-opt="label:user:USER"   : Set the label user for the container
    --security-opt="label:role:ROLE"   : Set the label role for the container
    --security-opt="label:type:TYPE"   : Set the label type for the container
    --security-opt="label:level:LEVEL" : Set the label level for the container
    --security-opt="label:disabled"    : Turn off label confinement for the container

Since we are passing a list of string options instead of a space separated
string of options, I will change function calls to use InitLabels instead of
GenLabels.  Genlabels interface is Depracated.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 5619082f2b
Component: cli
2017-06-02 00:06:35 +00:00
41c0fbd731 Adding exec remote API documentation along with minor code cleanup.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 6f116d084a
Component: cli
2017-06-02 00:06:35 +00:00
842f6d1e97 Filter containers by status.
A continuation of #7616.
Adds `docker ps --filter=status=(restarting|running|paused|stopped)` option.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 5419043a5d
Component: cli
2017-06-02 00:06:35 +00:00
08787f1ac5 Doc update to clarify EXPOSE vs -p functionality.
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Upstream-commit: 1d2bb271ac
Component: cli
2017-06-02 00:06:35 +00:00
28be9d5897 Add more info about when build cache is invalidated/used - Issue #3636
Plus some edits as suggested by @jamtur01

Closes #3636

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0e82ab713b
Component: cli
2017-06-02 00:06:35 +00:00
7c55acb65b Add the 2 image events found using git grep 'Job("log"'
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: ed49f5cab1
Component: cli
2017-06-02 00:06:35 +00:00
f95548a29c The list of events that 'grep' told me about
docker(master) $ git grep 'LogEvent("' | sed 's/.*("//' | sed 's/").*//'
| sort | uniq | paste -s -d","
create,destroy,die,export,kill,pause,restart,start,stop,unpause

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 003ddf6100
Component: cli
2017-06-02 00:06:35 +00:00
da4bfdb14a add wildcard support to copy/add
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 1a83c9f87e
Component: cli
2017-06-02 00:06:35 +00:00
dc7a961ff2 Adding details on how to use .dockerignore file
Addresses #7724

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 62cc00b765
Component: cli
2017-06-02 00:06:35 +00:00
6df89ee708 Pull all image aliases for id. Closes #8141.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 3e3d368b74
Component: cli
2017-06-02 00:06:35 +00:00
20728b1521 Updated output from the docker cli help
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 5c9bb30d90
Component: cli
2017-06-02 00:06:35 +00:00
ce71b7d929 builder: Fix handling of VOLUME command where multiple volumes are
specified in a space delimited list.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 82ff6f0c9f
Component: cli
2017-06-02 00:06:35 +00:00
97a4071f4e Replace get.docker.io -> get.docker.com and test.docker.io -> test.docker.com
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: b6e3153734
Component: cli
2017-06-02 00:06:35 +00:00
dcdc597a18 Adding new Dockerfile Best Practices doc, and links thereto.
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: 85808d776d
Component: cli
2017-06-02 00:06:35 +00:00
f3ef53c1fa That URL isn't there anymore
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 056efbbe14
Component: cli
2017-06-02 00:06:35 +00:00
e34558a69d Doc update to clarify random port mapping on docker run -P
Signed-off-by: Dan Cotora <d@bluevision.ro>
Upstream-commit: d6d5dcd55a
Component: cli
2017-06-02 00:06:35 +00:00
83f8fd461d Adding additional documentation for fixed-cidr networking
Docker-DCO-1.1-Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu> (github: fkautz)

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: e938ac9e78
Component: cli
2017-06-02 00:06:35 +00:00
8116c5ab68 Implement allocating IPs from CIDR within bridge network
Fixes #4986

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 1798f72254
Component: cli
2017-06-02 00:06:34 +00:00
8abff83092 Fix detaching from attached container
Text was copied from man-pages https://raw.githubusercontent.com/docker/docker/master/docs/man/docker-attach.1.md

Signed-off-by: Jyrki Puttonen <jyrkiput@gmail.com>
Upstream-commit: 5afc964a9e
Component: cli
2017-06-02 00:06:34 +00:00
8c8167747e Cleanup: Fix cli docs: Sorted command headers.
Signed-off-by: Andrey Petrov <andrey.petrov@shazow.net>
Upstream-commit: 9c74cf01e2
Component: cli
2017-06-02 00:06:34 +00:00
17eed5a7b8 Add support for copy/add with multiple src files
Part one of solution for issue #6820

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6ea2cc5e0e
Component: cli
2017-06-02 00:06:34 +00:00
ff2b882022 Add an option to disable IP masquerading
For the cases where --bip option is used it is sometimes best to disable
IP masquerading as the provided bridge IP range may be routable.

Signed-off-by: Eugene Yakubovich <eugene.yakubovich@coreos.com>
Upstream-commit: a492b97cd0
Component: cli
2017-06-02 00:06:34 +00:00
409eb6c388 'an file' -> 'a file' grammar fix
Signed-off-by: Albert Callarisa Roca <albert@acroca.com>
Upstream-commit: 54f5e16a38
Component: cli
2017-06-02 00:06:34 +00:00
279a61f613 Allow extra lines in /etc/hosts
This adds a --add-host host:ip flag which appends lines to /etc/hosts.  This is needed in places where you want the container to get a different name resolution than it would through DNS.  This was submitted before as #5525, closed, and now I am re-opening.  It has come up 2 or 3 times in the last couple days.

Signed-off-by: Tim Hockin <thockin@google.com>
Upstream-commit: 14c0f0781d
Component: cli
2017-06-02 00:06:34 +00:00
c43880d27f Add create to contrib/completion
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 442ac2bc31
Component: cli
2017-06-02 00:06:34 +00:00
a9323afb14 docs fix
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 7786198ec8
Component: cli
2017-06-02 00:06:34 +00:00
9771e188f6 Add "docker create" support
This exposes the already existing "create container" operation.  It is
very similar to "docker run -d" except it doesn't actually start the
container, but just prepares it. It can then be manually started using
"docker start" at any point.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Conflicts:
	api/client/commands.go
	runconfig/parse.go
	server/container.go

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 5886a02980
Component: cli
2017-06-02 00:06:34 +00:00
56a0339c7a Fix for issue 7902.
Use utils.RFC3339NanoFixed ("2006-01-02T15:04:05.000000000Z07:00")
instead of time.RFC3339Nano to format our log timestamps - this way
things are aligned, in particular the nano seconds are padded with zeros

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: dbb8b6e280
Component: cli
2017-06-02 00:06:34 +00:00
a4d64054d2 Add exec to autocompletions
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 98c2ff06ed
Component: cli
2017-06-02 00:06:34 +00:00
3c778ccf71 Adding docker exec support in CLI.
Fixed a bug in daemon that resulted in accessing of a closed pipe.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: aa62097042
Component: cli
2017-06-02 00:06:34 +00:00
ba8f0967ab Removing 'exec' feature from the CLI until the docker daemon supports resizing of
tty sessions for exec'ed commands.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 09bfb139f1
Component: cli
2017-06-02 00:06:34 +00:00
129d7e93da Address review comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 733ac4b1e7
Component: cli
2017-06-02 00:06:34 +00:00
7bf6085352 Update cli.md to include 'docker exec' feature.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 4b80189b3b
Component: cli
2017-06-02 00:06:34 +00:00
c6cd0c88d2 Consistently use 'sudo docker' in examples
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 3ca630d381
Component: cli
2017-06-02 00:06:34 +00:00
644aab3397 Override prettyPrint's colour choice (red) for strings in quotes.
I've moved the docs.css to last so it can tweak any existing css, and
then set that to the same grey colour used for 'normal' text.

While testing I found and fixed an over-zealous line wrap.

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: b7cb370393
Component: cli
2017-06-02 00:06:34 +00:00
632772241e Add notes about single-quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f0b5f2601f
Component: cli
2017-06-02 00:06:34 +00:00
8473c65e11 Add daemon flag to specify public registry mirrors
Adds support for a --registry-mirror=scheme://<host>[:port]
daemon flag. The flag may be present multiple times. If
provided, mirrors are prepended to the list of endpoints used
for image pull. Note that only mirrors of the public
index.docker.io registry are supported, and image/tag resolution
is still performed via the official index.

Docker-DCO-1.1-Signed-off-by: Tim Smith <timbot@google.com> (github: timbot)
Upstream-commit: 7ecebf2877
Component: cli
2017-06-02 00:06:33 +00:00
b46d15a5d8 add -p PORT as a valid format specification
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 70abfec849
Component: cli
2017-06-02 00:06:33 +00:00
ed8d0aaefb Added --device flag to run reference
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 5547dedac3
Component: cli
2017-06-02 00:06:33 +00:00
4980a85e4f add a little documentation for docker pull
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: aa499ca76e
Component: cli
2017-06-02 00:06:33 +00:00
44c59108ac zsh: update zsh completion for docker command
zsh completion is updated with the content of
felixr/docker-zsh-completion.

The major change since the last merge is the removal of use of
sed/awk. This should help a lot OSX users who previously had to install
gawk and gsed.

Docker-DCO-1.1-Signed-off-by: Vincent Bernat <vincent@bernat.im> (github: vincentbernat)
Upstream-commit: 0296063f1e
Component: cli
2017-06-02 00:06:33 +00:00
d96d75fc36 Changes to Sven's cherry pick process
Added content and revised after walk-through

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: 65c06ca59a
Component: cli
2017-06-02 00:06:33 +00:00
710d6cbfe3 Add --force-rm to docker build command completion
Signed-off-by: Thomas LEVEIL <thomasleveil@gmail.com>
Upstream-commit: 0678d92b26
Component: cli
2017-06-02 00:06:33 +00:00
9ac8a8393d Adding Docs Deploy process to Docs ReadMe
Additions and revisions to Sven's cherry-pick process doc.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: 90d2156bc6
Component: cli
2017-06-02 00:06:33 +00:00
ae3f325e13 document the cherry-pick process I'm using to make docs updates
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 621e17a267
Component: cli
2017-06-02 00:06:33 +00:00
ee01ee5ef2 List all ports when calling docker port container
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 6f480a8667
Component: cli
2017-06-02 00:06:33 +00:00
c848822410 docker save: ability to save multiple images
Now from a single invocation of `docker save`, you can specify multiple
images to include in the output tar, or even just multiple tags of a
particular image/repo.

```
> docker save -o bundle.tar busybox ubuntu:lucid ubuntu:saucy fedora:latest
> tar tf ./bundle.tar | wc -l
42
> tar xOf ./bundle.tar repositories
{"busybox":{"latest":"2d8e5b282c81244037eb15b2068e1c46319c1a42b80493acb128da24b2090739"},"fedora":{"latest":"58394af373423902a1b97f209a31e3777932d9321ef10e64feaaa7b4df609cf9"},"ubuntu":{"lucid":"9cc9ea5ea540116b89e41898dd30858107c1175260fb7ff50322b34704092232","saucy":"9f676bd305a43a931a8d98b13e5840ffbebcd908370765373315926024c7c35e"}}
```

Further, this fixes the bug where the `repositories` file is not created
when saving a specific tag of an image (e.g. ubuntu:latest)

document multi-image save and updated API docs

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 28b535f825
Component: cli
2017-06-02 00:06:33 +00:00
48077e3b5b Update /etc/hosts when linked container is restarted
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: bbea6aa42d
Component: cli
2017-06-02 00:06:33 +00:00
3961f38c94 add the [OPTIONS] string automatically if there are flags defined
Signed-off-by: SvenDowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 8b869694be
Component: cli
2017-06-02 00:06:33 +00:00
a3daed06ec Revert "--help option and help command should print to stdout not stderr"
This reverts commit 61b129d81802e3c988cc0e67e488b24968dd748a.

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 116bf8fdfb
Component: cli
2017-06-02 00:06:33 +00:00
59c2a716ed --help option and help command should print to stdout not stderr
--help and help are successful commands so output should not go to error.

QE teams have requested this change, also users doing docker help | less
or docker run --help | less would expect this to work.

Usage statement should only be printed when the user asks for it.
Errors should print error message and then suggest the docker COMMAND --help
command to see usage information.

The current behaviour causes the user to have to search for the error message
and sometimes scrolls right off the screen.  For example a error on a
"docker run" command is very difficult to diagnose.

Finally erros should always exit with a non 0 exit code, if the user
makes a CLI error.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: f646304808
Component: cli
2017-06-02 00:06:33 +00:00
f5cecee8a9 Update flag usages and docs for max restart count
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 496b9b1977
Component: cli
2017-06-02 00:06:33 +00:00
33b2b9f6b8 Fixed a typo and added a bit based on Sven's feedback
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: e06e910b87
Component: cli
2017-06-02 00:06:33 +00:00
6fe3a11825 Added warning re: using root for dockerfile root. Fixes #7612
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: f30add12fe
Component: cli
2017-06-02 00:06:33 +00:00
972e9fca2a Cleanup: correct cli --volumes-from description
issue #7580 volumes-from comma separated list mentioned this case.

Options like --volumes-from=[] indicate they can be specified multiple times:
docker run -it --rm --volumes-from TEST_DATA --volumes-from TEST_DATA2 ubuntu bash

Signed-off-by: Deshi Xiao <dxiao@redhat.com>
Upstream-commit: 46121c5edd
Component: cli
2017-06-02 00:06:32 +00:00
fe6c696a10 update the cli / man page docs based on what is in master right now
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: d8b3ccd869
Component: cli
2017-06-02 00:06:32 +00:00
0be916edb1 Deprecate --restart on the daemon
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 0142098e67
Component: cli
2017-06-02 00:06:32 +00:00
2a85b5d64f Update docs based on feedback from review for --restart
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 9d8d982e5c
Component: cli
2017-06-02 00:06:32 +00:00
37792aa6c2 Add documentation and update restart rules.
Implement time backed backoff for restarting and fix failure count when
the maximum is 0

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 8f67e34cba
Component: cli
2017-06-02 00:06:32 +00:00
8af77489b3 Move remote API config out of daemon/
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 9f2253c926
Component: cli
2017-06-02 00:06:32 +00:00
214134c5dd docker ps: introducing filters
* starting with filtering for exit codes. `docker ps -a --filter 'exited=1'`
* API doc for filter parameter
* formatting filters for help usage
* tweaks for review

This requires https://github.com/dotcloud/docker/pull/4430

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: b1aa5d84a7
Component: cli
2017-06-02 00:06:32 +00:00
5e62cf124c fix for issue 7281
add missing comma per O.S. Tezer's commment

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d31f289d22
Component: cli
2017-06-02 00:06:32 +00:00
ffe707ea52 fix command output examples in cli documentation
f87a97f accidentally added a few too many `$` line prefixes

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
Upstream-commit: 827784fc31
Component: cli
2017-06-02 00:06:32 +00:00
14d1356fcf Make it clear that JSON array format should be used if CMD is used as default arguments
Signed-off-by: Xuecong Liao <satorulogic@gmail.com>
Upstream-commit: e778875858
Component: cli
2017-06-02 00:06:32 +00:00
588987f681 Revert rm -f deprecation use SIGKILL instead
`rm -f` was originally deprecated in favor of `rm --stop/--kill` since `rm
-f` was sending SIGTERM and potentially very slow.
Instead this will bring back `rm -f` but use SIGKILL isntead

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 3c5c02ba5a
Component: cli
2017-06-02 00:06:32 +00:00
1c8efb4405 Docker should use /var/lib/container/tmp for large temporary files.
/tmp is often a tmpfs file system and large temporary files could cause
docker commands to fail.  Also using /tmp potentially allows users on the
system to get access to content, or even attack the content.  Moving the tmpdir to
/var/lib/container/tmp will protect the data.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)

Conflicts:
	docker/docker.go
Upstream-commit: 6d9e4e513a
Component: cli
2017-06-02 00:06:32 +00:00
0ddf7346b7 Fix example of relative WORKDIR
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 83b89cd5cd
Component: cli
2017-06-02 00:06:32 +00:00
cc9ecd5a3b Standardize "apt-get install" usage across the repo
I might have missed some, but I think this is most of the offenders.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: cc74364de9
Component: cli
2017-06-02 00:06:32 +00:00
ab3f1442d0 Add OS to docker info
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 0e2490cad0
Component: cli
2017-06-02 00:06:32 +00:00
7d18ebcbe5 Fix incorrect path in ENTRYPOINT example
The ENTRYPOINT example uses "/usr/bin/ls" as path, but `ls` is located at `/bin/ls`.

Docker-DCO-1.1-Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (github: thaJeztah)
Upstream-commit: c290eb9a8c
Component: cli
2017-06-02 00:06:32 +00:00
5aee68c291 update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 4fc06d1790
Component: cli
2017-06-02 00:06:32 +00:00
4f7156cf7b user facing documentation changes in master atm
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: a5b9d338c1
Component: cli
2017-06-02 00:06:32 +00:00
f078103f43 Update docs on --sig-proxy to indicate that SIGKILL and SIGSTOP cannot be proxied
Docker-DCO-1.1-Signed-off-by: Matt Heon <mheon@redhat.com> (github: mheon)
Upstream-commit: 73a3580711
Component: cli
2017-06-02 00:06:32 +00:00
9c3b1e5f75 fix doc references
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: c66ab76c1a
Component: cli
2017-06-02 00:06:31 +00:00
34b3bfca6e Add logout command
"docker logout [SERVER]" will remove the registry server' credentials from
.dockercfg file. If a server is not specified, it will log user out of the
default docker registry server

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: eaca49cde5
Component: cli
2017-06-02 00:06:31 +00:00
f6da8c9b50 Added info re: image[:tag] to make docs consistent. Fixed a markdown issue.
Closes issue #6833

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: dbec9b15d4
Component: cli
2017-06-02 00:06:31 +00:00
5aea8966bf zsh: update zsh completion for docker command
zsh completion is updated with the content of
felixr/docker-zsh-completion.

Docker-DCO-1.1-Signed-off-by: Vincent Bernat <vincent@bernat.im> (github: vincentbernat)
Upstream-commit: 6f99c854b6
Component: cli
2017-06-02 00:06:31 +00:00
6a11dc1697 re-jig the info into all the places
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 4cb8ed8f9d
Component: cli
2017-06-02 00:06:31 +00:00
1572f061f5 Add cgroups freezer info
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: SvenDowideit)
Upstream-commit: ed82ad88da
Component: cli
2017-06-02 00:06:31 +00:00
4cfb9c2ec6 Add cli.md documentation for docker-pause and docker-unpause
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: c0199886cd
Component: cli
2017-06-02 00:06:31 +00:00
07dde65329 Adjust Link description to match target
The target document headline is "Managing data in containers" and so should the link be named.
Upstream-commit: ff64867b75
Component: cli
2017-06-02 00:06:31 +00:00
95dfbf2985 Update bash completion for "docker run --link" and "docker run -v" to complete on running containers and the local filesystem respectively
Also, add completion for "docker run -a" ("stdin", "stdout", and "stderr"), "docker run --env-file" (local filesystem), and some other minor code style tweaks.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: bfc4403d5f
Component: cli
2017-06-02 00:06:31 +00:00
84450b215f update api doc
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 4a685c6482
Component: cli
2017-06-02 00:06:31 +00:00
ebe091e975 add doc
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 1b9bc637e6
Component: cli
2017-06-02 00:06:31 +00:00
b90677256a General cleanup of the builder.md file
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 6c10e6fe81
Component: cli
2017-06-02 00:06:31 +00:00
cca16c6e5d Rewrote the ENTRYPOINT section in builder
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 7cf495874c
Component: cli
2017-06-02 00:06:31 +00:00
a9f791eac6 update CLI & api docs
Docker-DCO-1.1-Signed-off-by: Adrien Folie <folie.adrien@gmail.com> (github: folieadrien)
Upstream-commit: 1bb925be97
Component: cli
2017-06-02 00:06:31 +00:00
f8878bc07f Add --device flag to allow additional host devices in container
We add a --device flag which can be used like:

 docker run --device /dev/sda:/dev/xvda:rwm ubuntu /bin/bash

To allow the container to have read write permissions to access the host's /dev/sda via a node named /dev/xvda in the container.

Note: Much of this code was written by Dinesh Subhraveti dineshs@altiscale.com (github: dineshs-altiscale) and so he deserves a ton of credit.

Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: timthelion)
Upstream-commit: 57b53e22fe
Component: cli
2017-06-02 00:06:31 +00:00
6af4cb8e39 Fix typos
Docker-DCO-1.1-Signed-off-by: Bryan Bess <squarejaw@bsbess.com> (github: squarejaw)
Upstream-commit: 316fa6a218
Component: cli
2017-06-02 00:06:31 +00:00
529c06e716 Update bash completion to only complete on directories as the argument to "docker build"
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 9bb81450d9
Component: cli
2017-06-02 00:06:31 +00:00
6452b6495d Updated docker logs timestamp to RFC3339
Currently the docker logs timestamp flag generates log entries like:

    $ sudo docker logs -ft daemon_dave
    [May 10 13:06:17.934] hello world

It uses Go's StampMilli timestamp to generate the timestamp. The entry
is also wrapped in [ ].

This is non-standard operational timestamp and one that will require
custom parsing.

The new timestamp is RFC3999Nano and generates entries like:

    2014-05-10T17:42:14.999999999Z07:00 hello world

These are readily parsed by tools like ELK.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 64271a2aa3
Component: cli
2017-06-02 00:06:31 +00:00
b46f5536f0 Explain ADD invalidation more accurately
And also move it in to the `ADD` section, rather than being hidden in the `RUN` section.

Docker-DCO-1.1-Signed-off-by: Daniel Watkins <daniel@daniel-watkins.co.uk> (github: OddBloke)
Upstream-commit: 383db402ca
Component: cli
2017-06-02 00:06:31 +00:00
42d1fc470e Error if Docker daemon starts with BTRFS graph driver and SELinux enabled
The Docker btrfs graph driver does not interact well with SELinux at present.
If btrfs mounts the same file in several locations, the same SELinux label will
be applied to all mountpoints. In the context of the graph driver, things such
as shared libraries become inaccessible to containers due to SELInux, causing
all dynamically linked applications to fail when run in a container.

Consequently, error when we detect the daemon is being run with SELinux enabled
and the btrfs driver. Documentation has been added for this behavior.

Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
Upstream-commit: 8c2470323d
Component: cli
2017-06-02 00:06:31 +00:00
eb72e6e169 run.md: Fix references to cli
There are now no other occurrences of `#cli-` in this document.

TODO: Find other places with wrong links.
Upstream-commit: c23159c986
Component: cli
2017-06-02 00:06:30 +00:00
738c946189 Fix "Error while reading file" Fish completion
An unbalanced single quote caused Fish to fail to load the completion file with `source: Error while reading file “/etc/fish/completions/docker.fish”`.

Docker-DCO-1.1-Signed-off-by: Andrew France <andrew@avito.co.uk> (github: Odaeus)
Upstream-commit: 68f296e8fb
Component: cli
2017-06-02 00:06:30 +00:00
1ca7ae869d I'm going to wish I didn't do this
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 6f03f597ad
Component: cli
2017-06-02 00:06:30 +00:00
347f366c57 Update cli.md and man pages to match current cli
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 0db5ead653
Component: cli
2017-06-02 00:06:30 +00:00
f4a23ea0fe Lowercase world, because its not important.
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 094fa1b8fd
Component: cli
2017-06-02 00:06:30 +00:00
0cda470d70 update docs
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 0c845f3f41
Component: cli
2017-06-02 00:06:30 +00:00
30031e089b Implement tail for docker logs
Fixes #4330
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: a9bea1525c
Component: cli
2017-06-02 00:06:30 +00:00
2b487e12ac more docs for dockerignore
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: e7e6ff5e6f
Component: cli
2017-06-02 00:06:30 +00:00
05a6a78092 updated docs & tests
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: db5c70afe4
Component: cli
2017-06-02 00:06:30 +00:00
05b25490b7 Pause/freeze containers during commit
Initiates a pause before committing a container,
adds a pause option to the commit command, defaulting to 'true'.

Fixes bug: #6267
Fixes bug: #3675

Docker-DCO-1.1-Signed-off-by: Eric Windisch <ewindisch@docker.com> (github: ewindisch)
Upstream-commit: 3775c33ab9
Component: cli
2017-06-02 00:06:30 +00:00
6bd98835aa blindly make all uses of e\.?g\.? into e.g.,
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: dd0cd23fd7
Component: cli
2017-06-02 00:06:30 +00:00
f343b92dbb Formatting and consistency fixes to CLI and RUN references
* Removed double backticks.
* Reformatted paragraphs.
* Fixed consistent STDOUT/STDIN/STDERR references.
* Fixed several broken URLs.
* Fixed backtick mismatches.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: dce7a15eda
Component: cli
2017-06-02 00:06:30 +00:00
27dc8f3166 Update documentation noting that SIGCHLD is not proxied.
Docker's --sig-proxy option sends all signals but one to a container. The
exception s SIGCHLD, which is deliberately ignored as it doesn't make sense to
send such a signal to a process in a container. Documentation updates will make
this less confusing if anyone does attempt to do this.

Docker-DCO-1.1-Signed-off-by: Matt Heon <mheon@redhat.com> (github: mheon)
Upstream-commit: 382814d8d8
Component: cli
2017-06-02 00:06:30 +00:00
a489dcdfc6 Add .dockerignore support
Fixes #2224

Docker-DCO-1.1-Signed-off-by: Travis Cline <travis.cline@gmail.com> (github: tmc)
Upstream-commit: ebb9d58225
Component: cli
2017-06-02 00:06:30 +00:00
94b8274393 Add bash completion for "docker rm -f" and complete on all containers instead of just stopped containers when "-f" is specified
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: a744ade2a8
Component: cli
2017-06-02 00:06:30 +00:00
f20a110545 Anglicanisms: Grammatical correction (pos. adj. apost.)
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Upstream-commit: 742b229408
Component: cli
2017-06-02 00:06:30 +00:00
0eeca9686e Add the missing paren to the documentation for docker commit too
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: fe1e15dad4
Component: cli
2017-06-02 00:06:30 +00:00
328a706f73 Add Sockets (-H) list to docker -D info.
This will allow us to _know_ what the user's -H settings are, which may
be useful for debugging later.

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 6c8a3f798b
Component: cli
2017-06-02 00:06:30 +00:00
5f249933ce Fix typo in the docs.
Fix a minor typographical error inside `run.md`.
Upstream-commit: acbbeb39de
Component: cli
2017-06-02 00:06:30 +00:00
6d5a7032bc api/client/build: allow tar as context for docker build -
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
Upstream-commit: 56b7c20e46
Component: cli
2017-06-02 00:06:29 +00:00
ca4a74c898 be consistent in capitalization of Docker
Docker-DCO-1.1-Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com> (github: jonboulle)
Upstream-commit: 6cc9c5bd42
Component: cli
2017-06-02 00:06:29 +00:00
6ef7693177 Fix flag names
Upstream-commit: faeae5d7b7
Component: cli
2017-06-02 00:06:29 +00:00
95e82d22aa Clean up some uses on 'an' in builder docs
Upstream-commit: 983c74aced
Component: cli
2017-06-02 00:06:29 +00:00
b3b3cfe083 Fix minor typo and improve wording
Upstream-commit: 0e185f84fb
Component: cli
2017-06-02 00:06:29 +00:00
981c039714 Update bash-completion to reflect ability to push single tags
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: f66535d618
Component: cli
2017-06-02 00:06:29 +00:00
92390c2d1d Fix mode on contrib/completion/zsh/_docker (-x)
ZSH completion scripts aren't supposed to be executable - they're sourced by ZSH and aren't run directly.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 352a67bfd4
Component: cli
2017-06-02 00:06:29 +00:00
284a743d97 cleanup all mentions of insert
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: a34d496738
Component: cli
2017-06-02 00:06:29 +00:00
7b2c5a2fee The docker run --dns does not resolve hostname and having hostname in resolv.conf does not work.
Docker-DCO-1.1-Signed-off-by: Jan Pazdziora <jpazdziora@redhat.com> (github: adelton)
Upstream-commit: 2f908862e3
Component: cli
2017-06-02 00:06:29 +00:00
00fa207eb1 Updated CLI documentation for docker pull with notes on specifying URL
Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
Upstream-commit: 45496ca4f1
Component: cli
2017-06-02 00:06:29 +00:00
ebb615e67a Document the potential insecurity of --net host
Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
Upstream-commit: 12be909528
Component: cli
2017-06-02 00:06:29 +00:00
3e31de1e07 Guillaume is busy full-time on his new business, and no longer available
as a maintainer.

Best of luck on your e-commerce business Guillaume, and thanks for all
the great contributions!

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 5182afe46e
Component: cli
2017-06-02 00:06:29 +00:00
ccb97e17cc Fix spelling and grammar errors; remove seemingly out-of-place words
Docker-DCO-1.1-Signed-off-by: AJ Bowen <aj@gandi.net> (github: soulshake)
Upstream-commit: 3a348dab9b
Component: cli
2017-06-02 00:06:29 +00:00
d433dfda08 Fix several typos
Docker-DCO-1.1-Signed-off-by: Michael Prokop <github@michael-prokop.at> (github: mika)
Upstream-commit: 3ca0eb652b
Component: cli
2017-06-02 00:06:29 +00:00
e9a2e33699 Fix typo
Upstream-commit: 1fa4c8b6b0
Component: cli
2017-06-02 00:06:29 +00:00
a1e8edc426 Initial links
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: cf6acae39b
Component: cli
2017-06-02 00:06:29 +00:00
9a6efb2269 Add --storage-opt graph driver option and pass through to driver
This lets you add storage specific options for the daemon.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 655fe238c5
Component: cli
2017-06-02 00:06:29 +00:00
0b30245939 Clarify effect of docker start on started container in CLI docs
This behavior changed from v0.9 to v0.10, so document it to prevent
any confusion.

Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
Upstream-commit: 8fc62f6ec3
Component: cli
2017-06-02 00:06:29 +00:00
e6053e16c7 Revert "Initial links for Docker Hub rename"
This reverts commit 2819677c215bd409b4ce4da51f0ddfb303760796.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 52488445a5
Component: cli
2017-06-02 00:06:28 +00:00
9ec4ac9265 Initial links for Docker Hub rename
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: faffc555ab
Component: cli
2017-06-02 00:06:28 +00:00
3bdd41dcd9 Update builder.md
Upstream-commit: 1b06f322c5
Component: cli
2017-06-02 00:06:28 +00:00
c35401aba5 Change 'Uploading context' wording
Docker-DCO-1.1-Signed-off-by: Ryan Stelly <ryan.stelly@live.com> (github: FLGMwt)
Upstream-commit: 47f850e550
Component: cli
2017-06-02 00:06:28 +00:00
2319cfb40b IANA allocated Docker port: 2375
2375/2376 are assigned:
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=docker

For #1440

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 6fa1105051
Component: cli
2017-06-02 00:06:28 +00:00
1f72e75d6b Changed all references from Trusted Builds to Automated Builds
* Updated docker images output
* Deprecated docker images -t/--trusted option and replace with --automated
* Changed *trusted variables to *automated
* Changed added support for is_automated alongside deprecated is_trusted
* Updated man pages, docs and completion
* Updated API documentation

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 99e2e8c292
Component: cli
2017-06-02 00:06:28 +00:00
2c415bb0f9 filters: change untagged to dangling
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 601a4809db
Component: cli
2017-06-02 00:06:28 +00:00
e8e098d85d images: fix markdown documentation
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 3d4ff8babb
Component: cli
2017-06-02 00:06:28 +00:00
0ddbd168fe images filter: remove the redundant inverted filter
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: e31bafdc7a
Component: cli
2017-06-02 00:06:28 +00:00
713e0d074a filters, for images: docs
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 1f269e43a4
Component: cli
2017-06-02 00:06:28 +00:00
6e94a215db filters, for images: start with untagged/tagged boolean
This is a new feature and flag. (replaces the suggestion of a flag for
--untagged images).
The concept is to have a syntax to filter. This begins with this
filtering for the 'images' subcommand, and at that only filtering for
whether images are untagged.
  example like: docker rmi $(docker images -q --filter 'untagged=true')

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 1d715defb8
Component: cli
2017-06-02 00:06:28 +00:00
fbc53f4fc0 Adding User Guide
* Added User Guide section outlines.
* Added User Guide to menu.
* Moved HTTPS example to articles.
* Replaced Hello World example with User Guide.
* Moved use cases out of examples.
* Updated Introduction to add User Guide.
* Redirected migrated /use and /articles links.
* Added Docker.io section
* Added Dockerized section
* Added Using Docker section
* Added Docker Images section
* Added Docker Links section
* Added Docker Volumes section

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 74a03f6def
Component: cli
2017-06-02 00:06:28 +00:00
a1de49d92a add support for COPY to docker build
This adds a COPY command to docker build which works like ADD, but is
only for local files and it doesn't extract files.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 5f1114d955
Component: cli
2017-06-02 00:06:28 +00:00
d6721957f8 updated documentation for mentioning images vs containers
Docker-DCO-1.1-Signed-off-by: Robin Speekenbrink <robin@kingsquare.nl> (github: fruitl00p)

rebased by

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 311bc46669
Component: cli
2017-06-02 00:06:28 +00:00
a0154abda4 Replace 'private' with 'self-hosted' in a couple of places
Docker-DCO-1.1-Signed-off-by: Jérôme Petazzoni <jerome@docker.com> (github: jpetazzo)
Upstream-commit: 62f9cc3dee
Component: cli
2017-06-02 00:06:28 +00:00
8dd475f4d6 docs/reference/builder: fix USER doc
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
Upstream-commit: 7f3fe5c01e
Component: cli
2017-06-02 00:06:28 +00:00
343c206bbd bump remote api to 1.12 & add --force-rm to build
This adds a `--force-rm` flag to docker build which makes the Docker
daemon clean up all containers, even when the build has failed.

This new flag requires that we bump the remote API, so we also bump the
remote API version.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 1c4a18d8bf
Component: cli
2017-06-02 00:06:28 +00:00
ac2df4daba remove chmod 755: fixes #5941
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 8ee2a06dcf
Component: cli
2017-06-02 00:06:28 +00:00
059e07473f docs: cli.md; document docker version output
Commit 3cec63d56f9de6332aa3f33502695283d4feb054 changed the output of
docker version. Updating docs accordingly.

Docker-DCO-1.1-Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> (github: jmccrohan)
Upstream-commit: ef717d2e76
Component: cli
2017-06-02 00:06:27 +00:00
61adbaad6d Check uid ranges
Fixes #5647
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 2477e56243
Component: cli
2017-06-02 00:06:27 +00:00
649b28c285 Refactor b.tar -> busybox.tar
The file was saved as busybox.tar, but the ls commands named it b.tar.

Docker-DCO-1.1-Signed-off-by: Steven Burgess <steven.a.burgess@hotmail.com> (github: stevenburgess)
Upstream-commit: 1f30fd9bdb
Component: cli
2017-06-02 00:06:27 +00:00
0a385ffc57 Update the cli.md docs with the output of the docker command
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 3901bf025d
Component: cli
2017-06-02 00:06:27 +00:00
e3b393e561 changed deprecated option styles to supported ones
-name and -rm to --name and --rm
Upstream-commit: 043c294859
Component: cli
2017-06-02 00:06:27 +00:00
28e2d18a14 docs: explain when RUN cache gets invalidated
This adds a few lines to the RUN Dockerfile docs to explain how to
bypass the RUN caching and how ADD can also invalidate the cache for
these instructions.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 4fe816bff2
Component: cli
2017-06-02 00:06:27 +00:00
c17d1331c5 Add some more specific help for Dockerfile build contexts.
I've copy and pasted the error message so its googlable.

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 6a55530c56
Component: cli
2017-06-02 00:06:27 +00:00
9047b6bd9d Minor fixups to the Docs README
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: a8f2402b87
Component: cli
2017-06-02 00:06:27 +00:00
8e4c0ae838 Add a mention of 80 column lines and reflow the document to hide the
evidence.

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 93ee19119b
Component: cli
2017-06-02 00:06:27 +00:00
2abc152bba Add cpuset cpus support for docker
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 91667137f0
Component: cli
2017-06-02 00:06:27 +00:00
16aaa33d3f Cleaned up Network settings overview
Upstream-commit: 875f5489c4
Component: cli
2017-06-02 00:06:27 +00:00
b5ba629702 Added value format description for VOLUME instruction
In the documentation was not mentioned explicitly that VOLUME value
shoud be a valid JSON array. Because of this I spent time to discovering
the problem with my image where I put `VOLUME ['/data']` (with single quotes).
The `['/data']` mount point was parsed and mounted whole as a string without
any errors and warnings.

Docker-DCO-1.1-Signed-off-by: Max Shytikov <mshytikov@gmail.com> (github: mshytikov)
Upstream-commit: 44841e361a
Component: cli
2017-06-02 00:06:27 +00:00
db4526b634 Fix link to daemon/execdriver/lxc/lxc_template.go
Upstream-commit: 1af0c1584d
Component: cli
2017-06-02 00:06:27 +00:00
1f031c4bd3 update the docs to reflect the nice \n handling
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: cbdde9c15a
Component: cli
2017-06-02 00:06:27 +00:00
69306236ba Update the run --net cli help to include the 'host' option
and then add that to the run and cli docs

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 35c4f1426e
Component: cli
2017-06-02 00:06:27 +00:00
1d3fc1b450 add linked containers to hosts file
Docker-DCO-1.1-Signed-off-by: Bryan Murphy <bmurphy1976@gmail.com> (github: bmurphy1976)

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Tested-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 2ff41c5365
Component: cli
2017-06-02 00:06:27 +00:00
36b1262fa6 Add docs for --net flag
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 4e22cf681e
Component: cli
2017-06-02 00:06:27 +00:00
cf249fbd1e Rearrange the existing info a little, and add example style guide
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 0137184cb6
Component: cli
2017-06-02 00:06:27 +00:00
f908750a33 cli.md: More typos
I've seen one other missing space that I addressed in another PR already.
I don't know whether that is a common occurrence in the docs.

About the second diff chunk, it looks like some copy-paste mistake to me.

Docker-DCO-1.1-Signed-off-by: Felix Rabe <felix@rabe.io> (github: felixrabe)
Upstream-commit: df1d6ee946
Component: cli
2017-06-02 00:06:27 +00:00
4ca10b8b34 run.md: Close braces
Docker-DCO-1.1-Signed-off-by: Felix Rabe <felix@rabe.io> (github: felixrabe)
Upstream-commit: 4cf7b28b9a
Component: cli
2017-06-02 00:06:26 +00:00
64b98b94f7 cli.md: sudo at the right place
Docker-DCO-1.1-Signed-off-by: Felix Rabe <felix@rabe.io> (github: felixrabe)
Upstream-commit: 2d514f7543
Component: cli
2017-06-02 00:06:26 +00:00
053db4e1c1 cli.md: Fix up Markdown formatting by adding one `
Upstream-commit: e134bb174e
Component: cli
2017-06-02 00:06:26 +00:00
1191465301 run.md: Convert some backticks to apo's
Upstream-commit: a3595e6a6e
Component: cli
2017-06-02 00:06:26 +00:00
e4d6143a1b cli.md: Add space
Upstream-commit: 12d91c5137
Component: cli
2017-06-02 00:06:26 +00:00
ddf441822f cli.md: Add another sudo
Upstream-commit: c617aa0ea7
Component: cli
2017-06-02 00:06:26 +00:00
6c147c29d3 Improve code/comment/output markings & display consistency
This PR aims to increase the consistency across the docs for
code blocks and code/comment/output markings.

Rule followed here is "what's visible on the screen should be reflected"

Issue:

 - Docs had various code blocks showing: comments, commands & outputs.
 - All three of these items were inconsistently marked.

Some examples as to how this PR aims to introduce improvements:

1. Removed `> ` from in front of the "outputs". Eg,
`    > REPOSITORY                 TAG       ID              CREATED` replaced with:
`    REPOSITORY                 TAG       ID              CREATED`.

2. Introduced `$` for commands. Eg,
`    sudo chkconfig docker on` replaced with:
`    $ sudo chkconfig docker on`

3. Comments:
`    > # ` replaced with:
`    # `.

> Please note:
> Due to a vast amount of items reviewed and changed for this PR, there
> might be some individually incorrect replacements OR patterns of incorrect
> replacements. This PR needs to be reviewed and if there is anything missing,
> it should be improved or amended.

Closes:
https://github.com/dotcloud/docker/issues/5286

Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Upstream-commit: b8073c74a7
Component: cli
2017-06-02 00:06:26 +00:00
fdd23ac81c Timestamps for docker logs.
Fixes #1165
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 381334d3d2
Component: cli
2017-06-02 00:06:26 +00:00
973293998d remove rst/sphinx documentation
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 15fb9e2087
Component: cli
2017-06-02 00:06:26 +00:00
e7cf577d20 Add cli flag to docs for selinux support
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 4d694e02eb
Component: cli
2017-06-02 00:06:26 +00:00
1769832e0a Addressed regression of private repository documentation.
This adds back in the references to private repositories and
provides some refactoring to the Working with repositories
documentation including updating references to the "Central"
registry to Docker.io.

It also:

* Fixes some links and references to Central Index
* Fixes anchors in other files to updated titles in Working with Repositories.
* Renamed Central Index in the remaining places.
* Updated terms documentation to reflect Docker.io
* Updated some Docker Index naming to be consistent.
* Updates menu labels and hyperlinks.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Upstream-commit: cb003686e4
Component: cli
2017-06-02 00:06:26 +00:00
d4f737dfb4 Replaced all double backticks in README with singles
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: d5b9bea76f
Component: cli
2017-06-02 00:06:26 +00:00
608e01a1af Updated Docs README
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 1e3f899705
Component: cli
2017-06-02 00:06:26 +00:00
c7868fb9bf add a reference to multiple -H options, and update the other example of -H option
and copy changes to the cli.md file

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 53eedfc835
Component: cli
2017-06-02 00:06:26 +00:00
0c7deb3262 - unix://path/to/socket should read unix:///path/to/socket like the rest of the documentation (a slash was missing)
- Mention that [] options may be specified multiple times on the Usage page

Docker-DCO-1.1-Signed-off-by: Mike MacCana <mike.maccana@gmail.com> (github: mikemaccana)

Docker-DCO-1.1-Signed-off-by: Mike MacCana <mike.maccana@gmail.com> (github: SvenDowideit)
Upstream-commit: da8e2310c6
Component: cli
2017-06-02 00:06:26 +00:00
5354d49235 Looking into some broken links, I noticed that we don't need to use
relative paths, and also fixed some broken images.

There are still more todo - next PR I think :)

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: ecc2740a94
Component: cli
2017-06-02 00:06:26 +00:00
a987506ace Docs auto-conversion fixes and MD marking and structure improvements.
- Remove redundant chars and all errors caused by RST->MD conversion.
   e.g. [/#, /\, \<, />, etc.]
 - Fix broken inter-document links
 - Fix outbound links no-longer active or changed
 - Fix lists
 - Fix code blocks
 - Correct apostrophes
 - Replace redundant inline note marks for code with code marks
 - Fix broken image links
 - Remove non-functional title links
 - Correct broken cross-docs links
 - Improve readability

Note: This PR does not try to fix/amend:

 - Grammatical errors
 - Lexical errors
 - Linguistic-logic errors etc.

It just aims to fix main structural or conversion errors to serve as
a base for further amendments that will cover others including but
not limited to those mentioned above.

Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)

Update:

 - Fix backtick issues

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 148a2be878
Component: cli
2017-06-02 00:06:26 +00:00
89cd80886d Introducing spīritus lēnis to fix code highlighting issues due to apostrophe.
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Upstream-commit: 149437ff87
Component: cli
2017-06-02 00:06:26 +00:00
2fc7ce6db3 Mark notes and warnings, fix broken link renderings within.
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Upstream-commit: 34628fa8a4
Component: cli
2017-06-02 00:06:26 +00:00
7329c385c5 Fixed #5283 - literal leftover from cutover
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 57acc3cd5d
Component: cli
2017-06-02 00:06:26 +00:00
d25c401844 Fix for broken in-document links which got scrambled during conversion.
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Upstream-commit: 35710efce1
Component: cli
2017-06-02 00:06:25 +00:00
c8b665e4fa simplify the docs branch process for now
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 742c981b37
Component: cli
2017-06-02 00:06:25 +00:00
521190558c now, with shiney markdown
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 88a30886e5
Component: cli
2017-06-02 00:06:25 +00:00
4265be6b39 move the documentation to markdown
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: )
Upstream-commit: d39c8aea47
Component: cli
2017-06-02 00:06:25 +00:00
94bf35b05f Adding timestamp end to events endpoint. Modifying api docs.
Docker-DCO-1.1-Signed-off-by: Isabel Jimenez <contact@isabeljimenez.com> (github: jimenez)
Upstream-commit: b002e5ff8e
Component: cli
2017-06-02 00:06:25 +00:00
7921a62034 add some more text to the cli docs
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 0f4461a8b2
Component: cli
2017-06-02 00:06:25 +00:00
f77250956c Early deprecation warning for 'docker commit --run'
Warn users of the planned deprecation of 'docker commit --run', and hide
it from the docs and usage message. The option continues to work.

Note that an alternative to 'commit --run' is being implemented but is
not yet available. We are printing the warning anyway because on
the basis that it never hurts to give more advance warning.

The 'commit --run' flag is a leftover from the very early days of Docker,
and has several problems:

1) It is very user unfriendly. You have to pass a literal json dict
which is poorly documented and changes regularly (see PortSpecs vs
ExposedPorts). The merge behavior is not clear and also changes
regularly. it's not possible to unset a value.

2) It overlaps with the Dockerfile syntax. There are 2 ways to set
a default command, expose a port or change an env variable. Some
things can be done in a Dockerfile but not in --run. Some things
can be done in --run but not in a Dockerfile. It would be better
to push a single syntax, allow using it both in a file and via
the command line, and make improvements in a single place.

3) It exposes data structures which should not be publicly exposed.
There are several planned improvements to Docker which require moving
around the content and schema of the various Config, Image and Container
structures. The less of those we expose in public interfaces, the easier
it is to move things around without a reverse compatibility nightmare.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 8777b52219
Component: cli
2017-06-02 00:06:25 +00:00
f7faca003d use the docs sidebar to be the TOC means that level 2 headings are the most important
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 5717858626
Component: cli
2017-06-02 00:06:25 +00:00
1e48b3236d intermediate image layers are used for more than the build
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: df48712193
Component: cli
2017-06-02 00:06:25 +00:00
ee87b49e2c Deprecate 'docker insert'
'docker insert' is an old command which predates 'docker build'. We no
longer recommend using it, it is not actively maintained, and can be
replaced with the combination of 'docker build' and 'ADD'.

This removes the command from usage and documentation, and prints a
warning when it is called.

The command still works but it will be removed in a future version.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: a9ae270842
Component: cli
2017-06-02 00:06:25 +00:00
590bc608cd Deprecate 'docker images --tree' and 'docker images --viz'
* The commands are no longer listed or documented.
* The commands still work but print a deprecation warning.
* The commands should be removed in a future version.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 3a5697d52a
Component: cli
2017-06-02 00:06:25 +00:00
71f47020d0 docs: explain what docker run -a does
This adds a bit of documentation for the `-a` flag for docker run.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 8cf995efcf
Component: cli
2017-06-02 00:06:25 +00:00
193815be0d Update docs. Make PULL up to date, remove deprecated falg and update PUSH
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: bf4255afd0
Component: cli
2017-06-02 00:06:25 +00:00
08510746bd Update fish completions for docker master.
Docker-DCO-1.1-Signed-off-by: Barnaby Gray <barnaby@pickle.me.uk> (github: barnybug)
Upstream-commit: ba5970e101
Component: cli
2017-06-02 00:06:24 +00:00
c879b080f5 --env-file: simple line-delimited
match dock functionality, and not try to achieve shell-sourcing compatibility

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 40f100517d
Component: cli
2017-06-02 00:06:24 +00:00
ac56da908c env-file: update functionality and docs
Multiple flags allowed. Order prescribed. Examples provided. Multiline
accounted for.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 552c1d2899
Component: cli
2017-06-02 00:06:24 +00:00
2a3c84db1a Fixing doc references to --env-file
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 46d697f30b
Component: cli
2017-06-02 00:06:24 +00:00
d2ac18c773 --env-file instead of --envfile
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 39880a5829
Component: cli
2017-06-02 00:06:24 +00:00
a31b818bc7 support for docker run environment variables file
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: f29511550b
Component: cli
2017-06-02 00:06:24 +00:00
1b0f4b1bcc Fix daemon's documentation for -bip flag
Upstream-commit: 1c21055985
Component: cli
2017-06-02 00:06:24 +00:00
4d868008c3 typo fix
Upstream-commit: 3d29e3bf8e
Component: cli
2017-06-02 00:06:24 +00:00
8c65da71a3 Fix fish completion when having alias on awk or grep
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: 69ddbf7e0b
Component: cli
2017-06-02 00:06:24 +00:00
abce3a4614 docker load: added example of a multiple tag image
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: bdebc378c9
Component: cli
2017-06-02 00:06:24 +00:00
7823153bd9 docker load: doc clarification
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: c7e8b69f3f
Component: cli
2017-06-02 00:06:24 +00:00
32468b6f39 docker load: add --input flag
for those that do not care to read from redirected stdin

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: de4aba1b65
Component: cli
2017-06-02 00:06:24 +00:00
9a6562434c I'm not looking forward to documenting cli arguments that may or may not show depending on what plugins / drviers you choose
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 5fdc8456ca
Component: cli
2017-06-02 00:06:24 +00:00
2352760bdd docker save: add and improve docs
add usage examples for `docker save ...`

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: dd1f12fe6c
Component: cli
2017-06-02 00:06:24 +00:00
8dc9fb0dfd Revert "Disable automatic killing of containers when docker stop fails"
This reverts commit 8b5cf51d600dc4f3611cf063c52cf3448e7b01e5.

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: ea3cd0f065
Component: cli
2017-06-02 00:06:24 +00:00
9be85b3bcc fix typo in documentation
Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
Upstream-commit: e12226771d
Component: cli
2017-06-02 00:06:24 +00:00
77591854c6 configurable dns search domains
Add a --dns-search parameter and a DnsSearch
configuration field for specifying dns search
domains.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
Upstream-commit: ac0787dbab
Component: cli
2017-06-02 00:06:24 +00:00
f0d1986616 Add authenticated TLS support for API
Docker-DCO-1.1-Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org> (github: discordianfish)
Upstream-commit: f07cb7c233
Component: cli
2017-06-02 00:06:23 +00:00
3288817f4c Add some documentation about relative WORKDIR values
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: dfd2d9f1ea
Component: cli
2017-06-02 00:06:23 +00:00
afcb2e8d58 Add image size to history docs
Fixes #3147
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: ec1254275d
Component: cli
2017-06-02 00:06:23 +00:00
5b2ede5a33 Using names in docker ps --since-id/--before-id, resolves #3565
Also renames --since-id/--before-id to --since/--before and add errors
on non-existent containers.
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 41429fd727
Component: cli
2017-06-02 00:06:23 +00:00
9b65da7cef Disable automatic killing of containers when docker stop fails
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: d45a91a56b
Component: cli
2017-06-02 00:06:23 +00:00
66f102baf2 Add missing client doc
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: e4111339bb
Component: cli
2017-06-02 00:06:23 +00:00
93d2d22d18 move git clone from daemon to client
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)

add a little doc
Upstream-commit: 2f33a8e6bd
Component: cli
2017-06-02 00:06:23 +00:00
f634f55d67 Fix sphinx header underline warnings I introduced...
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 974b760644
Component: cli
2017-06-02 00:06:23 +00:00
2c842723a1 Update to double-dash everywhere
These were found using `git grep -nE '[^-a-zA-Z0-9<>]-[a-zA-Z0-9]{2}'` (fair warning: _many_ false positives there).

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 6f6214866a
Component: cli
2017-06-02 00:06:23 +00:00
6b2c58a6bf Add missing options -t and -v to images subcommand doc
Docker-DCO-1.1-Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com> (github: ichik1)
Upstream-commit: fb3a8f17c3
Component: cli
2017-06-02 00:06:23 +00:00
e884a45d8d Remove duplicated description of --mtu
commit baa70e975186bb0ee8a4b16b9374cb6e794f8975 duplicates
the description of --mtu.
This patch removes the duplicated description.

Docker-DCO-1.1-Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com> (github: ichik1)
Upstream-commit: cdd5e423aa
Component: cli
2017-06-02 00:06:23 +00:00
0507fef3f4 merge existing config when committing
Fixes #1141

Docker-DCO-1.1-Signed-off-by: Wes Morgan <cap10morgan@gmail.com> (github: cap10morgan)
Upstream-commit: 60cd5ec3b7
Component: cli
2017-06-02 00:06:23 +00:00
24e02aede3 Update daemon docs and help messages for --iptables and --ip-forward
Fix docs and help messages of --iptables and --ip-forward to describe the true case behaviour

Docker-DCO-1.1-Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com> (github: ichik1)
Upstream-commit: bb64095f4b
Component: cli
2017-06-02 00:06:23 +00:00
e68a8b4863 Removing HEAD tag from last commit
Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)
Upstream-commit: 771de961bf
Component: cli
2017-06-02 00:06:23 +00:00
af9cc6c294 Adding CLI options to the commandline reference documentation.
Fixing bad DCO sig

URLs of pages are:
http://docs.docker.io/en/latest/reference/commandline/cli/

Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)
Upstream-commit: f07bd8fb8a
Component: cli
2017-06-02 00:06:23 +00:00
bd2a743fb5 Adding the new options to the docker ps documentation.
URL of documentation page is: http://docs.docker.io/en/latest/reference/commandline/cli/#ps

Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)

Adding the new options to the `docker ps` documentation.

URL of documentation page is: http://docs.docker.io/en/latest/reference/commandline/cli/#ps

Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)

Adding CLI options to the commandline reference documentation.

URLs of pages are:
http://docs.docker.io/en/latest/reference/commandline/cli/

Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)

changing indention

Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)
Upstream-commit: 9fbf050286
Component: cli
2017-06-02 00:06:23 +00:00
dfe7f7a2ea Adding options to docker restart documentation
URL of page is: http://docs.docker.io/en/latest/reference/commandline/cli/#restart

Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)
Upstream-commit: f742182359
Component: cli
2017-06-02 00:06:23 +00:00
1723872d9b Adding the new options to the docker ps documentation.
URL of documentation page is: http://docs.docker.io/en/latest/reference/commandline/cli/#ps

Docker-DCO-1.1-Signed-off-by: Scott Collier <emailscottcollier@gmail.com> (github: scollier)
Upstream-commit: 151dd6d3f1
Component: cli
2017-06-02 00:06:23 +00:00
a24ad753f5 Update email + add self to pkg/signal
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
Upstream-commit: 939dd00e47
Component: cli
2017-06-02 00:06:23 +00:00
62e9d22281 Correct Docker run --host param to --hostname
Upstream-commit: 5348fdca04
Component: cli
2017-06-02 00:06:22 +00:00
8fc343382c Add ability to force removal of running container via docker rm -f
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 1abc7e3c7c
Component: cli
2017-06-02 00:06:22 +00:00
ed4cba1861 Create a -G option that specifies the group which unix sockets belong to.
Docker-DCO-1.1-Signed-off-by: Evan Krall <krall@yelp.com> (github: EvanKrall)
Upstream-commit: 920d1683e2
Component: cli
2017-06-02 00:06:22 +00:00
5a9e7304a2 Consistently capitalize CLI options
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: a625f00d0d
Component: cli
2017-06-02 00:06:22 +00:00
63f57412e6 Update daemon docs for exec drivers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 86b133528c
Component: cli
2017-06-02 00:06:22 +00:00
5c992bcf4c handle symlinks for Docker's root dir & TMPDIR
This removes the incomplete symlink handling from engine.go and it adds
it one place in docker.go.

It also enables handling symlinks for TMPDIR.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 7bce027176
Component: cli
2017-06-02 00:06:22 +00:00
c86e1760e7 Support json output in --format flag of docker inspect
Docker-DCO-1.1-Signed-off-by: ILYA Khlopotov <ilya.khlopotov@gmail.com> (github: khia)
Upstream-commit: 87b94808dc
Component: cli
2017-06-02 00:06:22 +00:00
05adee5aca add a little bit mentioning commandline option combinations
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 0db1996a26
Component: cli
2017-06-02 00:06:22 +00:00
acb1068850 Add fish shell completions from https://github.com/barnybug/docker-fish-completion.
Docker-DCO-1.1-Signed-off-by: Barnaby Gray <barnaby@pickle.me.uk> (github: barnybug)
Upstream-commit: 45e2caf10e
Component: cli
2017-06-02 00:06:22 +00:00
c72678e3e6 one ponted out by lukaspustina, and one that I bet I added
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 29d73de168
Component: cli
2017-06-02 00:06:22 +00:00
926294bc3b add missing doc
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 231c00296b
Component: cli
2017-06-02 00:06:22 +00:00
f5af2eb8c7 make docker build -rm=true default #4292
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 730417f46f
Component: cli
2017-06-02 00:06:22 +00:00
4da3c798d1 execdriver flag for docker daemon
like the storage-driver flag, this implements a flag for choosing the
  execdriver to be used, defaulting to lxc.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 9d1894a44c
Component: cli
2017-06-02 00:06:21 +00:00
af385344cd Remove uneeded wording in Dockerfile format
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 92d8b836a7
Component: cli
2017-06-02 00:06:21 +00:00
28982b4453 Drop -mtu from docs in favor of --mtu only
Docker-DCO-1.1-Signed-off-by: Danny Berger <dpb587@gmail.com> (github: dpb587)
Upstream-commit: dcea86eb25
Component: cli
2017-06-02 00:06:21 +00:00
b6ce0ab105 Fix cli argument usage typo for docker --mtu
Docker-DCO-1.1-Signed-off-by: Danny Berger <dpb587@gmail.com> (github: dpb587)
Upstream-commit: 16e959358b
Component: cli
2017-06-02 00:06:21 +00:00
b3323cd058 forbid chained onbuild, from & maintainer triggers
This changes the way onbuild works:
- forbids the chaining of onbuild instructions
- forbids the use of `onbuild from`
- forbids the use of `onbuild maintainer`

It also makes docker throw errors when encountering such triggers when
executing the triggers during `FROM`.

Three tests have been added:
- ensure that chained onbuild (`onbuild onbuild`) is forbidden
- ensure that `onbuild from` is forbidden
- ensure that `onbuild maintainer` is forbidden

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: a79fae655d
Component: cli
2017-06-02 00:06:21 +00:00
0e1c391909 reinforce that docker build --rm is a good default to use
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 0793ff9774
Component: cli
2017-06-02 00:06:21 +00:00
24c6f1a33b update links
Docker-DCO-1.1-Signed-off-by: Andy Rothfusz <github@developersupport.net> (github: metalivedev)
Upstream-commit: 2be94a6d55
Component: cli
2017-06-02 00:06:21 +00:00
c878f08021 Update the documentation docs with new branch information.
Docker-DCO-1.1-Signed-off-by: Andy Rothfusz <github@developersupport.net> (github: metalivedev)
Upstream-commit: 2af848ac2c
Component: cli
2017-06-02 00:06:21 +00:00
b566758d8e Add extra info regarding docker run funcationality
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: bdb4174a7f
Component: cli
2017-06-02 00:06:21 +00:00
d2e070809a my attempt to disentagle repository and registry (Issue #1439)
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 4e224b4218
Component: cli
2017-06-02 00:06:21 +00:00
fcfd6c1df9 add a little reenforcement to the help for docker build -q
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 0bf10f83a1
Component: cli
2017-06-02 00:06:21 +00:00
dad9180967 Support submodules when building from a gh repo
Docker-DCO-1.1-Signed-off-by: Song Gao <song@gao.io> (github: songgao)
Upstream-commit: 4e4c5547b8
Component: cli
2017-06-02 00:06:21 +00:00
190101a0de disallow tcp:// from defaulting to 127.0.0.1:4243
This stops docker from accepting tcp:// as a valid bind address.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 0c427d6796
Component: cli
2017-06-02 00:06:21 +00:00
2b0d5a8618 Fix RST formatting
Upstream-commit: bb10fef646
Component: cli
2017-06-02 00:06:21 +00:00
9f9df6cd54 add a little more information about the docker run -P option
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: ba6266c648
Component: cli
2017-06-02 00:06:21 +00:00
a4a6a0dbc1 point out that ENV DEBIAN_FRONTEND will persist, so its not recommended
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 605f913fc5
Component: cli
2017-06-02 00:06:21 +00:00
da710527a4 please, for the love of Docker, do. not. use. symlinks
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 808f83bc5c
Component: cli
2017-06-02 00:06:21 +00:00
cbd2748ec4 be a little more explicit about what WORKDIR does
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: ff4a5b431b
Component: cli
2017-06-02 00:06:21 +00:00
22fd28d287 New build instruction: ONBUILD defines a trigger to execute when extending an image with a new build
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 8bef3842d7
Component: cli
2017-06-02 00:06:20 +00:00
9394ed21e5 docs/cli: add mtu option
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: google)
Upstream-commit: 05c073b292
Component: cli
2017-06-02 00:06:20 +00:00
559326d1b1 add a known issue for lxc-1.0.0.beta3 and beyond for removeal of lxc-kill see #3844
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 3b5e659814
Component: cli
2017-06-02 00:06:20 +00:00
dc37f8e0bd Address feedback from @jamtur01.
Docker-DCO-1.1-Signed-off-by: Andy Rothfusz <github@developersupport.net> (github: metalivedev)
Upstream-commit: baded3bcc0
Component: cli
2017-06-02 00:06:20 +00:00
206d157982 Fix 2720 -- Expanded documentation for docker run.
Docker-DCO-1.1-Signed-off-by: Andy Rothfusz <github@developersupport.net> (github: metalivedev)
Upstream-commit: ef0eb78f58
Component: cli
2017-06-02 00:06:20 +00:00
15929897e5 fix(cli.rst): add missing underscores
As suggested by @metalivedev

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: f9e5fa6aeb
Component: cli
2017-06-02 00:06:20 +00:00
bf8cf1aaed Allow fd:// like unix:// and tcp://
Somthing like 20605eb310f0b57bd06eea80ec63c5022fc83bde

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: 27a2933df4
Component: cli
2017-06-02 00:06:20 +00:00
6f2846a385 fix(docs): add Systemd in front of socket activation
Suggested by SvenDowideit.

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: 43cea0e97c
Component: cli
2017-06-02 00:06:20 +00:00
87597d03a6 docs: improve the socket activation cli docs
as suggested by SvenDowideit expand the docs to have more information on
socket activation.

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: 8922f0314a
Component: cli
2017-06-02 00:06:20 +00:00
1382a0f40b fix(docs): fixup based on changes in master
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: a25ce61e87
Component: cli
2017-06-02 00:06:20 +00:00
5cdb637e21 talk about the new exec form of RUN (Closes #3723) implemented by #3558
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: c046828392
Component: cli
2017-06-02 00:06:20 +00:00
538f28b15b change the documentation only - It looks like we have a number of cmdline params to completely update from the code version
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 5bfb9bf093
Component: cli
2017-06-02 00:06:20 +00:00
6dcbeea319 Add a --signal option to the kill command to specify a signal.
Docker-DCO-1.1-Signed-off-by: Paul Lietar <paul@lietar.net> (github: plietar)
Upstream-commit: 9a20d94d97
Component: cli
2017-06-02 00:06:20 +00:00
8364e5f019 Documentation about automatic bind-mount dir creation
Docker-DCO-1.1-Signed-off-by: Maxime Petazzoni <max@signalfuse.com> (github: mpetazzoni)
Upstream-commit: f0d44c8bc1
Component: cli
2017-06-02 00:06:20 +00:00
57e78abe14 Update bash completion to ignore stderr output of docker binary
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 632263387f
Component: cli
2017-06-02 00:06:20 +00:00
725d14dfe0 add a little info about ghosts
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 4e48cc274e
Component: cli
2017-06-02 00:06:20 +00:00
98131c2bc4 Switch docker run --username to docker run --user which is more accurate (while we can still do so without breaking anyone's scripts)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: d24c5c599d
Component: cli
2017-06-02 00:06:20 +00:00
4aa138c60d Resync bash completion to include all flags defined in the code, and to autocomplete properly on all parameters that are reasonably possible to do so on today
This also includes several new minor features that are interesting, so do explore a little. :)

Finally, this also fixes a few bugs where commands would complete parameters that they won't necessarily accept.  We still have a few of these cases, but they're reduced to a minimum now.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 3ca9415d56
Component: cli
2017-06-02 00:06:20 +00:00
8f168e41f5 update commands.go
update docker.go

move to pkg

update docs

update name and copyright

change --sinceId to --since-id, update completion and docs

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor@docker.com> (github: vieux)
Upstream-commit: 33415ebe36
Component: cli
2017-06-02 00:06:19 +00:00
30d36fff92 Added Reference Manual
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 98b39c91de
Component: cli
2017-06-02 00:06:19 +00:00
21a737b698 Mac OSX command for pip was incorrect
Upstream-commit: fb17f9fcab
Component: cli
2017-06-02 00:06:19 +00:00
3cd5549ecd support for container names in bash completion
Upstream-commit: bc7722ea0f
Component: cli
2017-06-02 00:06:19 +00:00
1c211d0906 make docs is more consistent
Upstream-commit: 2d576ea3b6
Component: cli
2017-06-02 00:06:19 +00:00
ab0c9a7cea change the policy wrt $ sudo docker to simplify auto-testing
Upstream-commit: 3091ba88fa
Component: cli
2017-06-02 00:06:19 +00:00
768974c22a Corrects misspellings of 'Sphinx'
Upstream-commit: 01d4e98cc8
Component: cli
2017-06-02 00:06:19 +00:00
ff73503948 Suggest users install dependencies by using requirements.txt, not manually
Upstream-commit: b52c999103
Component: cli
2017-06-02 00:06:19 +00:00
f022c32444 rebase and add some filters
Upstream-commit: e074bc6db1
Component: cli
2017-06-02 00:06:19 +00:00
e5bc16370d add links to the Dockerfiles as canonical external requirements, add example of building and exposing the docs and simplify the Dockerfile for cacheability
Upstream-commit: 23e91a6d7f
Component: cli
2017-06-02 00:06:19 +00:00
199feb6224 Clean up level 3 headers.
Upstream-commit: bed37d2204
Component: cli
2017-06-02 00:06:19 +00:00
78b8a0f99b Add zsh completion from @felixr with permission
See https://github.com/felixr/docker-zsh-completion for the original.
See also https://github.com/dotcloud/docker/issues/2202#issuecomment-26313287

Fixes #2202
Upstream-commit: 9914c18a11
Component: cli
2017-06-02 00:06:19 +00:00
af8f58b268 Move contrib/docker.bash to contrib/completion/bash/docker for better organization
Upstream-commit: 24c9b31edf
Component: cli
2017-06-02 00:06:19 +00:00
9463d1159a Fix #1919 document how to edit and release docs.
Upstream-commit: ce220ef43b
Component: cli
2017-06-02 00:06:19 +00:00
43d8f667fd Fixed typos
Upstream-commit: 147b04ce2b
Component: cli
2017-06-02 00:06:19 +00:00
d7f43325f2 Fixed some typo's and formatting issues in remote api documentation.
Upstream-commit: 22ab3ddc8a
Component: cli
2017-06-02 00:06:19 +00:00
67f5bb8bb9 Some more improvements on the docs readme. Removed references to website.
Upstream-commit: 2216afb617
Component: cli
2017-06-02 00:06:19 +00:00
34f087441b Updated docs README with instructions to preview the generated manfile, and where to get the one generated by sphinx.
Upstream-commit: 9c5f4391e1
Component: cli
2017-06-02 00:06:19 +00:00
cdc3377009 Enabled the docs to generate manpages.
* changed conf.py to reference toctree.rst instead of index
* Added note to README to upgrade your sphinx to the latest version to prevent a bug with .. note:: blocks.
Upstream-commit: 77926c6033
Component: cli
2017-06-02 00:06:19 +00:00
99a1852177 Make style consistent
Upstream-commit: 74428120af
Component: cli
2017-06-02 00:06:19 +00:00
95534b5821 Add Mac OS X instructions for doc tools
Upstream-commit: 3c035fa508
Component: cli
2017-06-02 00:06:19 +00:00
d08724ab40 Add make server command to preview docs
Upstream-commit: 99dfa4e7e8
Component: cli
2017-06-02 00:06:18 +00:00
aec84e0e64 Updated index to reflect new (short) 'engine' message (merged with solomon's new text), also moved around the layout a bit and fixed some small text errors.
Upstream-commit: 6d79cab514
Component: cli
2017-06-02 00:06:18 +00:00
c6d0d33e87 Added code and color for 'note' and updated the hello world note.
Upstream-commit: f4399fe403
Component: cli
2017-06-02 00:06:18 +00:00
9d6a9f36e8 Improved README
Upstream-commit: 8a39a45f05
Component: cli
2017-06-02 00:06:18 +00:00
b07dff2c8e Merge of docker-website into the docker documentation.
Upstream-commit: 244477e27f
Component: cli
2017-06-02 00:06:18 +00:00
73808e2330 create README.md at this place for preview.
Upstream-commit: f35a9d8098
Component: cli
2017-06-02 00:06:18 +00:00
91d25d6fe0 Only set default aliases when the network is user defined.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit d5b505ee8c)
2017-05-31 19:07:11 -07:00
6c534bb5a0 Add tests for verifyExternalNetwork
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 341703d21e)
2017-05-31 19:07:08 -07:00
1c46b8f4d3 With the introduction of node-local network support, docker services can
be attached to special networks such as host and bridge. This fix brings
in the required changes to make sure the stack file accepts these
networks as well.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 123f0bfd98)
2017-05-31 19:07:05 -07:00
f156aa746e Adding unit tests for pin by digest (client)
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 75c7536d2e2e328b644bf69153de879d1d197988)
2017-05-31 11:40:48 -07:00
5c5cc1fccd Ensure service images get default tag and print familiar strings
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 5efcec77170dd6c4087d4f1fb3695c32d94edfb4)
2017-05-31 11:40:48 -07:00
cd6b682d4f Include stack service configs in service specs
Signed-off-by: John Stephens <johnstep@docker.com>
(cherry picked from commit b7cac96f69)
2017-05-31 11:37:32 -07:00
19e7c1efe9 Remove stack configs on stack removal
Signed-off-by: John Stephens <johnstep@docker.com>
(cherry picked from commit f05cd11ee2)
2017-05-31 11:35:59 -07:00
32807d0a87 Handle a Docker daemon without registry info
The current implementation of the ElectAuthServer doesn't handle well when the
default Registry server is not included in the response from the daemon Info
endpoint.

That leads to the storage and usage of the credentials for the default registry
(`https://index.docker.io/v1/`) under an empty string on the client config file.

Sample config file after a login via a Docker Daemon without Registry
information:
```json
{
	"auths": {
		"": {
			"auth": "***"
		}
	}
}
```

That can lead to duplication of the password for the default registry and
authentication failures against the default registry if a pull/push is performed
without first authenticating via the misbehaving daemon.

Also, changes the output of the warning message from stdout to sdterr as
per dnephin suggestion.

Signed-off-by: Marcus Martins <marcus@docker.com>
(cherry picked from commit 862649707e)
2017-05-31 11:34:01 -07:00
e7776047c2 Bump go to go1.8.3
Note that go1.8.2 contains a security fix (CVE-2017-8932).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 0c7c900e9e66335a6bd486be008af43ae83a5a37)
2017-05-31 11:29:38 -07:00
30e966bc97 Do not clear swarm directory at the begining of swarm init and swarm join now.
However, do clear the directory if init or join fails, because we don't
want to leave it in a half-finished state.

Signed-off-by: Ying Li <ying.li@docker.com>
(cherry picked from commit bf3e9293a66c77a2fddf4e691222898846b4af9f)
2017-05-31 11:25:56 -07:00
bb1fe809d2 remove RuntimeData from cluster and types
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
(cherry picked from commit 8eeba751983d6499a07fcd21c26f381eb1d17d19)
2017-05-31 11:08:24 -07:00
e724dcd16b Adding support for DNS search on RS1
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
(cherry picked from commit b8e8dcd6e031d005a2d46d95f84da35b436cd870)
2017-05-31 10:55:38 -07:00
96c9cd5c39 Ensure that a device mapper task is referenced until task is complete
DeviceMapper tasks in go use SetFinalizer to clean up C construct
counterparts in the C LVM library.  While thats well and good, it relies
heavily on the exact interpretation of when the golang garbage collector
determines that an object is unreachable is subject to reclaimation.
While common sense would assert that for stack variables (which these DM
tasks always are), are unreachable when the stack frame in which they
are declared returns, thats not the case.  According to this:

https://golang.org/pkg/runtime/#SetFinalizer

The garbage collector decides that, if a function calls into a
systemcall (which task.run() always will in LVM), and there are no
subsequent references to the task variable within that stack frame, then
it can be reclaimed.  Those conditions are met in several devmapper.go
routines, and if the garbage collector runs in the middle of a
deviceMapper operation, then the task can be destroyed while the
operation is in progress, leading to crashes, failed operations and
other unpredictable behavior.

The fix is to use the KeepAlive interface:

https://golang.org/pkg/runtime/#KeepAlive

The KeepAlive method is effectively an empy reference that fools the
garbage collector into thinking that a variable is still reachable.  By
adding a call to KeepAlive in the task.run() method, we can ensure that
the garbage collector won't reclaim a task object until its execution
within the deviceMapper C library is complete.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
(cherry picked from commit d764d8b16624e4924b3949273089f851efa0f717)
2017-05-31 10:42:53 -07:00
4360062d33 Update go-winio to v0.4.2
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit 3f13107223a9753d709c196c46f1c846041fc0c3)
2017-05-31 10:39:35 -07:00
5acb14a901 Don't unmount entire plugin manager tree on remove
This was mistakenly unmounting everything under `plugins/*` instead of
just `plugins/<id>/*` anytime a plugin is removed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit db5f31732a9868c1e9e4f9a49be70b794ff82d4f)
2017-05-31 10:37:33 -07:00
43484d9284 prevent image prune panic
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
(cherry picked from commit 32da2a4234c5c68ff466dc1afc91ba98dbbe199a)
2017-05-31 09:58:11 -07:00
511 changed files with 48026 additions and 946 deletions

View File

@ -5,7 +5,7 @@ information on the list of deprecated flags and APIs please have a look at
https://docs.docker.com/engine/deprecated/ where target removal dates can also
be found.
## 17.06.0-ce (2017-06-07)
## 17.06.0-ce (2017-06-19)
### Builder
@ -25,6 +25,10 @@ be found.
+ Add new `ca ` subcommand to `docker swarm` to allow managing a swarm CA [#docker/cli/48](https://github.com/docker/cli/pull/48)
+ Add credential-spec to compose [#docker/cli/71](https://github.com/docker/cli/pull/71)
+ Add support for csv format options to `--network` and `--network-add` [#docker/cli/62](https://github.com/docker/cli/pull/62) [#33130](https://github.com/moby/moby/pull/33130)
- Fix stack compose bind-mount volumes on Windows [#docker/cli/136](https://github.com/docker/cli/pull/136)
- Correctly handle a Docker daemon without registry info [#docker/cli/126](https://github.com/docker/cli/pull/126)
+ Allow --detach and --quiet flags when using --rollback [#docker/cli/144](https://github.com/docker/cli/pull/144)
+ Remove deprecated `--email` flag from `docker login` [#docker/cli/143](https://github.com/docker/cli/pull/143)
### Distribution
@ -59,6 +63,14 @@ be found.
+ Add daemon option to allow pushing foreign layers [#33151](https://github.com/moby/moby/pull/33151)
- Fix an issue preventing containerd to be restarted after it died [#32986](https://github.com/moby/moby/pull/32986)
+ Add cluster events to Docker event stream. [#32421](https://github.com/moby/moby/pull/32421)
+ Add support for DNS search on windows [#33311](https://github.com/moby/moby/pull/33311)
* Upgrade to Go 1.8.3 [#33387](https://github.com/moby/moby/pull/33387)
- Prevent a containerd crash when journald is restarted [#containerd/930](https://github.com/containerd/containerd/pull/930)
- Fix healthcheck failures due to invalid environment variables [#33249](https://github.com/moby/moby/pull/33249)
- Prevent a directory to be created in lieu of the daemon socket when a container mounting it is to be restarted during a shutdown [#30348](https://github.com/moby/moby/pull/33330)
- Prevent a container to be restarted upon stop if its stop signal is set to `SIGKILL` [#33335](https://github.com/moby/moby/pull/33335)
- Ensure log drivers get passed the same filename to both StartLogging and StopLogging endpoints [#33583](https://github.com/moby/moby/pull/33583)
- Remove daemon data structure dump on `SIGUSR1` to avoid a panic [#33598](https://github.com/moby/moby/pull/33598)
### Security
@ -74,6 +86,9 @@ be found.
+ Add API to rotate swarm CA certificate [#32993](https://github.com/moby/moby/pull/32993)
* Service digest pining is now handled client side [#32388](https://github.com/moby/moby/pull/32388), [#33239](https://github.com/moby/moby/pull/33239)
+ Placement now also take platform in account [#33144](https://github.com/moby/moby/pull/33144)
- Fix possible hang when joining fails [#docker-ce/19](https://github.com/docker/docker-ce/pull/19)
- Fix an issue preventing external CA to be accepted [#33341](https://github.com/moby/moby/pull/33341)
- Fix possible orchestration panic in mixed version clusters [#swarmkit/2233](https://github.com/docker/swarmkit/pull/2233)
## 17.05.0-ce (2017-05-04)

View File

@ -1 +1 @@
17.06.0-ce-rc1
17.06.0-ce-rc4

View File

@ -2,3 +2,7 @@
/build/
cli/winresources/rsrc_386.syso
cli/winresources/rsrc_amd64.syso
/man/man1/
/man/man5/
/man/man8/
/docs/yaml/gen/

View File

@ -7,13 +7,13 @@ all: binary
# remove build artifacts
.PHONY: clean
clean:
@rm -rf ./build/* cli/winresources/rsrc_*
@rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen
# run go test
# the "-tags daemon" part is temporary
.PHONY: test
test:
@go test -tags daemon -v $(shell go list ./... | grep -v /vendor/)
@go test -tags daemon -v $(shell go list ./... | grep -v '/vendor/')
.PHONY: lint
lint:
@ -42,6 +42,16 @@ vendor: vendor.conf
@vndr 2> /dev/null
@scripts/validate/check-git-diff vendor
## generate man pages from go source and markdown
.PHONY: manpages
manpages:
@scripts/docs/generate-man.sh
## generate documentation YAML files consumed by docs repo
.PHONY: yamldocs
yamldocs:
@scripts/docs/generate-yaml.sh
cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
go generate github.com/docker/cli/cli/compose/schema

View File

@ -1 +1 @@
17.06.0-ce-rc1
17.06.0-ce-rc4

View File

@ -28,7 +28,9 @@ func ElectAuthServer(ctx context.Context, cli Cli) string {
// the default registry URL might be Windows specific.
serverAddress := registry.IndexServer
if info, err := cli.Client().Info(ctx); err != nil {
fmt.Fprintf(cli.Out(), "Warning: failed to get default registry endpoint from daemon (%v). Using system default: %s\n", err, serverAddress)
fmt.Fprintf(cli.Err(), "Warning: failed to get default registry endpoint from daemon (%v). Using system default: %s\n", err, serverAddress)
} else if info.IndexServerAddress == "" {
fmt.Fprintf(cli.Err(), "Warning: Empty registry endpoint from daemon. Using system default: %s\n", serverAddress)
} else {
serverAddress = info.IndexServerAddress
}

View File

@ -41,10 +41,6 @@ func NewLoginCommand(dockerCli command.Cli) *cobra.Command {
flags.StringVarP(&opts.user, "username", "u", "", "Username")
flags.StringVarP(&opts.password, "password", "p", "", "Password")
// Deprecated in 1.11: Should be removed in docker 17.06
flags.StringVarP(&opts.email, "email", "e", "", "Email")
flags.MarkDeprecated("email", "will be removed in 17.06.")
return cmd
}

View File

@ -0,0 +1,79 @@
package command_test
import (
"bytes"
"testing"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
// Prevents a circular import with "github.com/docker/cli/cli/internal/test"
. "github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
)
type fakeClient struct {
client.Client
infoFunc func() (types.Info, error)
}
func (cli *fakeClient) Info(_ context.Context) (types.Info, error) {
if cli.infoFunc != nil {
return cli.infoFunc()
}
return types.Info{}, nil
}
func TestElectAuthServer(t *testing.T) {
testCases := []struct {
expectedAuthServer string
expectedWarning string
infoFunc func() (types.Info, error)
}{
{
expectedAuthServer: "https://index.docker.io/v1/",
expectedWarning: "",
infoFunc: func() (types.Info, error) {
return types.Info{IndexServerAddress: "https://index.docker.io/v1/"}, nil
},
},
{
expectedAuthServer: "https://index.docker.io/v1/",
expectedWarning: "Empty registry endpoint from daemon",
infoFunc: func() (types.Info, error) {
return types.Info{IndexServerAddress: ""}, nil
},
},
{
expectedAuthServer: "https://foo.bar",
expectedWarning: "",
infoFunc: func() (types.Info, error) {
return types.Info{IndexServerAddress: "https://foo.bar"}, nil
},
},
{
expectedAuthServer: "https://index.docker.io/v1/",
expectedWarning: "failed to get default registry endpoint from daemon",
infoFunc: func() (types.Info, error) {
return types.Info{}, errors.Errorf("error getting info")
},
},
}
for _, tc := range testCases {
buf := new(bytes.Buffer)
cli := test.NewFakeCli(&fakeClient{infoFunc: tc.infoFunc}, buf)
errBuf := new(bytes.Buffer)
cli.SetErr(errBuf)
server := ElectAuthServer(context.Background(), cli)
assert.Equal(t, tc.expectedAuthServer, server)
actual := errBuf.String()
if tc.expectedWarning == "" {
assert.Empty(t, actual)
} else {
assert.Contains(t, actual, tc.expectedWarning)
}
}
}

View File

@ -12,6 +12,10 @@ import (
// ParseSecrets retrieves the secrets with the requested names and fills
// secret IDs into the secret references.
func ParseSecrets(client client.SecretAPIClient, requestedSecrets []*swarmtypes.SecretReference) ([]*swarmtypes.SecretReference, error) {
if len(requestedSecrets) == 0 {
return []*swarmtypes.SecretReference{}, nil
}
secretRefs := make(map[string]*swarmtypes.SecretReference)
ctx := context.Background()
@ -61,6 +65,10 @@ func ParseSecrets(client client.SecretAPIClient, requestedSecrets []*swarmtypes.
// ParseConfigs retrieves the configs from the requested names and converts
// them to config references to use with the spec
func ParseConfigs(client client.ConfigAPIClient, requestedConfigs []*swarmtypes.ConfigReference) ([]*swarmtypes.ConfigReference, error) {
if len(requestedConfigs) == 0 {
return []*swarmtypes.ConfigReference{}, nil
}
configRefs := make(map[string]*swarmtypes.ConfigReference)
ctx := context.Background()

View File

@ -131,7 +131,7 @@ func runUpdate(dockerCli *command.DockerCli, flags *pflag.FlagSet, options *serv
// Rollback can't be combined with other flags.
otherFlagsPassed := false
flags.VisitAll(func(f *pflag.Flag) {
if f.Name == "rollback" {
if f.Name == "rollback" || f.Name == "detach" || f.Name == "quiet" {
return
}
if flags.Changed(f.Name) {

View File

@ -17,17 +17,21 @@ type fakeClient struct {
services []string
networks []string
secrets []string
configs []string
removedServices []string
removedNetworks []string
removedSecrets []string
removedConfigs []string
serviceListFunc func(options types.ServiceListOptions) ([]swarm.Service, error)
networkListFunc func(options types.NetworkListOptions) ([]types.NetworkResource, error)
secretListFunc func(options types.SecretListOptions) ([]swarm.Secret, error)
configListFunc func(options types.ConfigListOptions) ([]swarm.Config, error)
serviceRemoveFunc func(serviceID string) error
networkRemoveFunc func(networkID string) error
secretRemoveFunc func(secretID string) error
configRemoveFunc func(configID string) error
}
func (cli *fakeClient) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) {
@ -75,6 +79,21 @@ func (cli *fakeClient) SecretList(ctx context.Context, options types.SecretListO
return secretsList, nil
}
func (cli *fakeClient) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) {
if cli.configListFunc != nil {
return cli.configListFunc(options)
}
namespace := namespaceFromFilters(options.Filters)
configsList := []swarm.Config{}
for _, name := range cli.configs {
if belongToNamespace(name, namespace) {
configsList = append(configsList, configFromName(name))
}
}
return configsList, nil
}
func (cli *fakeClient) ServiceRemove(ctx context.Context, serviceID string) error {
if cli.serviceRemoveFunc != nil {
return cli.serviceRemoveFunc(serviceID)
@ -102,6 +121,15 @@ func (cli *fakeClient) SecretRemove(ctx context.Context, secretID string) error
return nil
}
func (cli *fakeClient) ConfigRemove(ctx context.Context, configID string) error {
if cli.configRemoveFunc != nil {
return cli.configRemoveFunc(configID)
}
cli.removedConfigs = append(cli.removedConfigs, configID)
return nil
}
func serviceFromName(name string) swarm.Service {
return swarm.Service{
ID: "ID-" + name,
@ -127,6 +155,15 @@ func secretFromName(name string) swarm.Secret {
}
}
func configFromName(name string) swarm.Config {
return swarm.Config{
ID: "ID-" + name,
Spec: swarm.ConfigSpec{
Annotations: swarm.Annotations{Name: name},
},
}
}
func namespaceFromFilters(filters filters.Args) string {
label := filters.Get("label")[0]
return strings.TrimPrefix(label, convert.LabelNamespace+"=")

View File

@ -61,3 +61,13 @@ func getStackSecrets(
ctx,
types.SecretListOptions{Filters: getStackFilter(namespace)})
}
func getStackConfigs(
ctx context.Context,
apiclient client.APIClient,
namespace string,
) ([]swarm.Config, error) {
return apiclient.ConfigList(
ctx,
types.ConfigListOptions{Filters: getStackFilter(namespace)})
}

View File

@ -7,6 +7,7 @@ import (
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/compose/convert"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/api/types/versions"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
@ -14,12 +15,16 @@ import (
const (
defaultNetworkDriver = "overlay"
resolveImageAlways = "always"
resolveImageChanged = "changed"
resolveImageNever = "never"
)
type deployOptions struct {
bundlefile string
composefile string
namespace string
resolveImage string
sendRegistryAuth bool
prune bool
}
@ -44,12 +49,19 @@ func newDeployCommand(dockerCli command.Cli) *cobra.Command {
addRegistryAuthFlag(&opts.sendRegistryAuth, flags)
flags.BoolVar(&opts.prune, "prune", false, "Prune services that are no longer referenced")
flags.SetAnnotation("prune", "version", []string{"1.27"})
flags.StringVar(&opts.resolveImage, "resolve-image", resolveImageAlways,
`Query the registry to resolve image digest and supported platforms ("`+resolveImageAlways+`"|"`+resolveImageChanged+`"|"`+resolveImageNever+`")`)
flags.SetAnnotation("resolve-image", "version", []string{"1.30"})
return cmd
}
func runDeploy(dockerCli command.Cli, opts deployOptions) error {
ctx := context.Background()
if err := validateResolveImageFlag(dockerCli, &opts); err != nil {
return err
}
switch {
case opts.bundlefile == "" && opts.composefile == "":
return errors.Errorf("Please specify either a bundle file (with --bundle-file) or a Compose file (with --compose-file).")
@ -62,6 +74,20 @@ func runDeploy(dockerCli command.Cli, opts deployOptions) error {
}
}
// validateResolveImageFlag validates the opts.resolveImage command line option
// and also turns image resolution off if the version is older than 1.30
func validateResolveImageFlag(dockerCli command.Cli, opts *deployOptions) error {
if opts.resolveImage != resolveImageAlways && opts.resolveImage != resolveImageChanged && opts.resolveImage != resolveImageNever {
return errors.Errorf("Invalid option %s for flag --resolve-image", opts.resolveImage)
}
// client side image resolution should not be done when the supported
// server version is older than 1.30
if versions.LessThan(dockerCli.Client().ClientVersion(), "1.30") {
opts.resolveImage = resolveImageNever
}
return nil
}
// checkDaemonIsSwarmManager does an Info API call to verify that the daemon is
// a swarm manager. This is necessary because we must create networks before we
// create services, but the API call for creating a network does not return a

View File

@ -87,5 +87,5 @@ func deployBundle(ctx context.Context, dockerCli command.Cli, opts deployOptions
if err := createNetworks(ctx, dockerCli, namespace, networks); err != nil {
return err
}
return deployServices(ctx, dockerCli, services, namespace, opts.sendRegistryAuth)
return deployServices(ctx, dockerCli, services, namespace, opts.sendRegistryAuth, opts.resolveImage)
}

View File

@ -13,6 +13,7 @@ import (
"github.com/docker/cli/cli/compose/loader"
composetypes "github.com/docker/cli/cli/compose/types"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/swarm"
apiclient "github.com/docker/docker/client"
dockerclient "github.com/docker/docker/client"
@ -64,7 +65,7 @@ func deployCompose(ctx context.Context, dockerCli command.Cli, opts deployOption
serviceNetworks := getServicesDeclaredNetworks(config.Services)
networks, externalNetworks := convert.Networks(namespace, config.Networks, serviceNetworks)
if err := validateExternalNetworks(ctx, dockerCli, externalNetworks); err != nil {
if err := validateExternalNetworks(ctx, dockerCli.Client(), externalNetworks); err != nil {
return err
}
if err := createNetworks(ctx, dockerCli, namespace, networks); err != nil {
@ -75,7 +76,7 @@ func deployCompose(ctx context.Context, dockerCli command.Cli, opts deployOption
if err != nil {
return err
}
if err := createSecrets(ctx, dockerCli, namespace, secrets); err != nil {
if err := createSecrets(ctx, dockerCli, secrets); err != nil {
return err
}
@ -83,7 +84,7 @@ func deployCompose(ctx context.Context, dockerCli command.Cli, opts deployOption
if err != nil {
return err
}
if err := createConfigs(ctx, dockerCli, namespace, configs); err != nil {
if err := createConfigs(ctx, dockerCli, configs); err != nil {
return err
}
@ -91,7 +92,7 @@ func deployCompose(ctx context.Context, dockerCli command.Cli, opts deployOption
if err != nil {
return err
}
return deployServices(ctx, dockerCli, services, namespace, opts.sendRegistryAuth)
return deployServices(ctx, dockerCli, services, namespace, opts.sendRegistryAuth, opts.resolveImage)
}
func getServicesDeclaredNetworks(serviceConfigs []composetypes.ServiceConfig) map[string]struct{} {
@ -169,30 +170,26 @@ func getConfigFile(filename string) (*composetypes.ConfigFile, error) {
func validateExternalNetworks(
ctx context.Context,
dockerCli command.Cli,
externalNetworks []string) error {
client := dockerCli.Client()
client dockerclient.NetworkAPIClient,
externalNetworks []string,
) error {
for _, networkName := range externalNetworks {
network, err := client.NetworkInspect(ctx, networkName, false)
if err != nil {
if dockerclient.IsErrNetworkNotFound(err) {
return errors.Errorf("network %q is declared as external, but could not be found. You need to create the network before the stack is deployed (with overlay driver)", networkName)
}
switch {
case dockerclient.IsErrNotFound(err):
return errors.Errorf("network %q is declared as external, but could not be found. You need to create a swarm-scoped network before the stack is deployed", networkName)
case err != nil:
return err
}
if network.Scope != "swarm" {
return errors.Errorf("network %q is declared as external, but it is not in the right scope: %q instead of %q", networkName, network.Scope, "swarm")
case container.NetworkMode(networkName).IsUserDefined() && network.Scope != "swarm":
return errors.Errorf("network %q is declared as external, but it is not in the right scope: %q instead of \"swarm\"", networkName, network.Scope)
}
}
return nil
}
func createSecrets(
ctx context.Context,
dockerCli command.Cli,
namespace convert.Namespace,
secrets []swarm.SecretSpec,
) error {
client := dockerCli.Client()
@ -219,7 +216,6 @@ func createSecrets(
func createConfigs(
ctx context.Context,
dockerCli command.Cli,
namespace convert.Namespace,
configs []swarm.ConfigSpec,
) error {
client := dockerCli.Client()
@ -286,6 +282,7 @@ func deployServices(
services map[string]swarm.ServiceSpec,
namespace convert.Namespace,
sendAuth bool,
resolveImage string,
) error {
apiClient := dockerCli.Client()
out := dockerCli.Out()
@ -304,9 +301,9 @@ func deployServices(
name := namespace.Scope(internalName)
encodedAuth := ""
image := serviceSpec.TaskTemplate.ContainerSpec.Image
if sendAuth {
// Retrieve encoded auth token from the image reference
image := serviceSpec.TaskTemplate.ContainerSpec.Image
encodedAuth, err = command.RetrieveAuthTokenFromImage(ctx, dockerCli, image)
if err != nil {
return err
@ -316,10 +313,12 @@ func deployServices(
if service, exists := existingServiceMap[name]; exists {
fmt.Fprintf(out, "Updating service %s (id: %s)\n", name, service.ID)
updateOpts := types.ServiceUpdateOptions{}
if sendAuth {
updateOpts.EncodedRegistryAuth = encodedAuth
updateOpts := types.ServiceUpdateOptions{EncodedRegistryAuth: encodedAuth}
if resolveImage == resolveImageAlways || (resolveImage == resolveImageChanged && image != service.Spec.Labels[convert.LabelImage]) {
updateOpts.QueryRegistry = true
}
response, err := apiClient.ServiceUpdate(
ctx,
service.ID,
@ -337,10 +336,13 @@ func deployServices(
} else {
fmt.Fprintf(out, "Creating service %s\n", name)
createOpts := types.ServiceCreateOptions{}
if sendAuth {
createOpts.EncodedRegistryAuth = encodedAuth
createOpts := types.ServiceCreateOptions{EncodedRegistryAuth: encodedAuth}
// query registry if flag disabling it was not set
if resolveImage == resolveImageAlways || resolveImage == resolveImageChanged {
createOpts.QueryRegistry = true
}
if _, err := apiClient.ServiceCreate(ctx, serviceSpec, createOpts); err != nil {
return err
}

View File

@ -5,9 +5,14 @@ import (
"path/filepath"
"testing"
"github.com/docker/cli/cli/internal/test/network"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/testutil"
"github.com/docker/docker/pkg/testutil/tempfile"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)
func TestGetConfigDetails(t *testing.T) {
@ -26,3 +31,55 @@ services:
assert.Len(t, details.ConfigFiles, 1)
assert.Len(t, details.Environment, len(os.Environ()))
}
type notFound struct {
error
}
func (n notFound) NotFound() bool {
return true
}
func TestValidateExternalNetworks(t *testing.T) {
var testcases = []struct {
inspectResponse types.NetworkResource
inspectError error
expectedMsg string
network string
}{
{
inspectError: notFound{},
expectedMsg: "could not be found. You need to create a swarm-scoped network",
},
{
inspectError: errors.New("Unexpected"),
expectedMsg: "Unexpected",
},
{
network: "host",
},
{
network: "user",
expectedMsg: "is not in the right scope",
},
{
network: "user",
inspectResponse: types.NetworkResource{Scope: "swarm"},
},
}
for _, testcase := range testcases {
fakeClient := &network.FakeClient{
NetworkInspectFunc: func(_ context.Context, _ string, _ bool) (types.NetworkResource, error) {
return testcase.inspectResponse, testcase.inspectError
},
}
networks := []string{testcase.network}
err := validateExternalNetworks(context.Background(), fakeClient, networks)
if testcase.expectedMsg == "" {
assert.NoError(t, err)
} else {
testutil.ErrorContains(t, err, testcase.expectedMsg)
}
}
}

View File

@ -55,13 +55,19 @@ func runRemove(dockerCli command.Cli, opts removeOptions) error {
return err
}
if len(services)+len(networks)+len(secrets) == 0 {
configs, err := getStackConfigs(ctx, client, namespace)
if err != nil {
return err
}
if len(services)+len(networks)+len(secrets)+len(configs) == 0 {
fmt.Fprintf(dockerCli.Out(), "Nothing found in stack: %s\n", namespace)
continue
}
hasError := removeServices(ctx, dockerCli, services)
hasError = removeSecrets(ctx, dockerCli, secrets) || hasError
hasError = removeConfigs(ctx, dockerCli, configs) || hasError
hasError = removeNetworks(ctx, dockerCli, networks) || hasError
if hasError {
@ -119,3 +125,18 @@ func removeSecrets(
}
return err != nil
}
func removeConfigs(
ctx context.Context,
dockerCli command.Cli,
configs []swarm.Config,
) bool {
var err error
for _, config := range configs {
fmt.Fprintf(dockerCli.Err(), "Removing config %s\n", config.Spec.Name)
if err = dockerCli.Client().ConfigRemove(ctx, config.ID); err != nil {
fmt.Fprintf(dockerCli.Err(), "Failed to remove config %s: %s", config.ID, err)
}
}
return err != nil
}

View File

@ -32,10 +32,18 @@ func TestRemoveStack(t *testing.T) {
}
allSecretIDs := buildObjectIDs(allSecrets)
allConfigs := []string{
objectName("foo", "config1"),
objectName("foo", "config2"),
objectName("bar", "config1"),
}
allConfigIDs := buildObjectIDs(allConfigs)
cli := &fakeClient{
services: allServices,
networks: allNetworks,
secrets: allSecrets,
configs: allConfigs,
}
cmd := newRemoveCommand(test.NewFakeCli(cli, &bytes.Buffer{}))
cmd.SetArgs([]string{"foo", "bar"})
@ -44,6 +52,7 @@ func TestRemoveStack(t *testing.T) {
assert.Equal(t, allServiceIDs, cli.removedServices)
assert.Equal(t, allNetworkIDs, cli.removedNetworks)
assert.Equal(t, allSecretIDs, cli.removedSecrets)
assert.Equal(t, allConfigIDs, cli.removedConfigs)
}
func TestSkipEmptyStack(t *testing.T) {
@ -57,10 +66,14 @@ func TestSkipEmptyStack(t *testing.T) {
allSecrets := []string{objectName("bar", "secret1")}
allSecretIDs := buildObjectIDs(allSecrets)
allConfigs := []string{objectName("bar", "config1")}
allConfigIDs := buildObjectIDs(allConfigs)
cli := &fakeClient{
services: allServices,
networks: allNetworks,
secrets: allSecrets,
configs: allConfigs,
}
cmd := newRemoveCommand(test.NewFakeCli(cli, buf))
cmd.SetArgs([]string{"foo", "bar"})
@ -70,6 +83,7 @@ func TestSkipEmptyStack(t *testing.T) {
assert.Equal(t, allServiceIDs, cli.removedServices)
assert.Equal(t, allNetworkIDs, cli.removedNetworks)
assert.Equal(t, allSecretIDs, cli.removedSecrets)
assert.Equal(t, allConfigIDs, cli.removedConfigs)
}
func TestContinueAfterError(t *testing.T) {
@ -82,11 +96,15 @@ func TestContinueAfterError(t *testing.T) {
allSecrets := []string{objectName("foo", "secret1"), objectName("bar", "secret1")}
allSecretIDs := buildObjectIDs(allSecrets)
allConfigs := []string{objectName("foo", "config1"), objectName("bar", "config1")}
allConfigIDs := buildObjectIDs(allConfigs)
removedServices := []string{}
cli := &fakeClient{
services: allServices,
networks: allNetworks,
secrets: allSecrets,
configs: allConfigs,
serviceRemoveFunc: func(serviceID string) error {
removedServices = append(removedServices, serviceID)
@ -104,4 +122,5 @@ func TestContinueAfterError(t *testing.T) {
assert.Equal(t, allServiceIDs, removedServices)
assert.Equal(t, allNetworkIDs, cli.removedNetworks)
assert.Equal(t, allSecretIDs, cli.removedSecrets)
assert.Equal(t, allConfigIDs, cli.removedConfigs)
}

View File

@ -18,7 +18,11 @@ import (
"github.com/pkg/errors"
)
const defaultNetwork = "default"
const (
defaultNetwork = "default"
// LabelImage is the label used to store image name provided in the compose file
LabelImage = "com.docker.stack.image"
)
// Services from compose-file types to engine API types
func Services(
@ -141,6 +145,7 @@ func convertService(
TTY: service.Tty,
OpenStdin: service.StdinOpen,
Secrets: secrets,
Configs: configs,
ReadOnly: service.ReadOnly,
Privileges: &privileges,
},
@ -157,6 +162,9 @@ func convertService(
UpdateConfig: convertUpdateConfig(service.Deploy.UpdateConfig),
}
// add an image label to serviceSpec
serviceSpec.Labels[LabelImage] = service.Image
// ServiceSpec.Networks is deprecated and should not have been used by
// this package. It is possible to update TaskTemplate.Networks, but it
// is not possible to update ServiceSpec.Networks. Unfortunately, we
@ -222,10 +230,16 @@ func convertServiceNetworks(
if networkConfig.External.External {
target = networkConfig.External.Name
}
nets = append(nets, swarm.NetworkAttachmentConfig{
netAttachConfig := swarm.NetworkAttachmentConfig{
Target: target,
Aliases: append(aliases, name),
})
Aliases: aliases,
}
// Only add default aliases to user defined networks. Other networks do
// not support aliases.
if container.NetworkMode(target).IsUserDefined() {
netAttachConfig.Aliases = append(netAttachConfig.Aliases, name)
}
nets = append(nets, netAttachConfig)
}
sort.Sort(byNetworkTarget(nets))

View File

@ -3,6 +3,7 @@ package loader
import (
"fmt"
"path"
"path/filepath"
"reflect"
"sort"
"strings"
@ -371,7 +372,16 @@ func resolveVolumePaths(volumes []types.ServiceVolumeConfig, workingDir string,
continue
}
volume.Source = absPath(workingDir, expandUser(volume.Source, lookupEnv))
filePath := expandUser(volume.Source, lookupEnv)
// Check for a Unix absolute path first, to handle a Windows client
// with a Unix daemon. This handles a Windows client connecting to a
// Unix daemon. Note that this is not required for Docker for Windows
// when specifying a local Windows path, because Docker for Windows
// translates the Windows path into a valid path within the VM.
if !path.IsAbs(filePath) {
filePath = absPath(workingDir, filePath)
}
volume.Source = filePath
volumes[i] = volume
}
}
@ -492,11 +502,11 @@ func LoadConfigObjs(source map[string]interface{}, workingDir string) (map[strin
return configs, nil
}
func absPath(workingDir string, filepath string) string {
if path.IsAbs(filepath) {
return filepath
func absPath(workingDir string, filePath string) string {
if filepath.IsAbs(filePath) {
return filePath
}
return path.Join(workingDir, filepath)
return filepath.Join(workingDir, filePath)
}
func transformMapStringString(data interface{}) (interface{}, error) {

View File

@ -0,0 +1,56 @@
package network
import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network"
"golang.org/x/net/context"
)
// FakeClient is a fake NetworkAPIClient
type FakeClient struct {
NetworkInspectFunc func(ctx context.Context, networkID string, verbose bool) (types.NetworkResource, error)
}
// NetworkConnect fakes connecting to a network
func (c *FakeClient) NetworkConnect(ctx context.Context, networkID, container string, config *network.EndpointSettings) error {
return nil
}
// NetworkCreate fakes creating a network
func (c *FakeClient) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) {
return types.NetworkCreateResponse{}, nil
}
// NetworkDisconnect fakes disconencting from a network
func (c *FakeClient) NetworkDisconnect(ctx context.Context, networkID, container string, force bool) error {
return nil
}
// NetworkInspect fakes inspecting a network
func (c *FakeClient) NetworkInspect(ctx context.Context, networkID string, verbose bool) (types.NetworkResource, error) {
if c.NetworkInspectFunc != nil {
return c.NetworkInspectFunc(ctx, networkID, verbose)
}
return types.NetworkResource{}, nil
}
// NetworkInspectWithRaw fakes inspecting a network with a raw response
func (c *FakeClient) NetworkInspectWithRaw(ctx context.Context, networkID string, verbose bool) (types.NetworkResource, []byte, error) {
return types.NetworkResource{}, nil, nil
}
// NetworkList fakes listing networks
func (c *FakeClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
return nil, nil
}
// NetworkRemove fakes removing networks
func (c *FakeClient) NetworkRemove(ctx context.Context, networkID string) error {
return nil
}
// NetworksPrune fakes pruning networks
func (c *FakeClient) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (types.NetworksPruneReport, error) {
return types.NetworksPruneReport{}, nil
}

View File

@ -0,0 +1,2 @@
Tianon Gravi <admwiggin@gmail.com> (@tianon)
Jessie Frazelle <jess@docker.com> (@jfrazelle)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,409 @@
# docker.fish - docker completions for fish shell
#
# This file is generated by gen_docker_fish_completions.py from:
# https://github.com/barnybug/docker-fish-completion
#
# To install the completions:
# mkdir -p ~/.config/fish/completions
# cp docker.fish ~/.config/fish/completions
#
# Completion supported:
# - parameters
# - commands
# - containers
# - images
# - repositories
function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand'
for i in (commandline -opc)
if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs pause port ps pull push rename restart rm rmi run save search start stop tag top unpause version wait stats
return 1
end
end
return 0
end
function __fish_print_docker_containers --description 'Print a list of docker containers' -a select
switch $select
case running
docker ps -a --no-trunc --filter status=running --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case stopped
docker ps -a --no-trunc --filter status=exited --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
case all
docker ps -a --no-trunc --format "{{.ID}}\n{{.Names}}" | tr ',' '\n'
end
end
function __fish_print_docker_images --description 'Print a list of docker images'
docker images --format "{{.Repository}}:{{.Tag}}" | command grep -v '<none>'
end
function __fish_print_docker_repositories --description 'Print a list of docker repositories'
docker images --format "{{.Repository}}" | command grep -v '<none>' | command sort | command uniq
end
# common options
complete -c docker -f -n '__fish_docker_no_subcommand' -l api-cors-header -d "Set CORS headers in the Engine API. Default is cors disabled"
complete -c docker -f -n '__fish_docker_no_subcommand' -s b -l bridge -d 'Attach containers to a pre-existing network bridge'
complete -c docker -f -n '__fish_docker_no_subcommand' -l bip -d "Use this CIDR notation address for the network bridge's IP, not compatible with -b"
complete -c docker -f -n '__fish_docker_no_subcommand' -s D -l debug -d 'Enable debug mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s d -l daemon -d 'Enable daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force Docker to use specific DNS servers'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-opt -d 'Force Docker to use specific DNS options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-search -d 'Force Docker to use specific DNS search domains'
complete -c docker -f -n '__fish_docker_no_subcommand' -l exec-opt -d 'Set runtime execution options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr -d 'IPv4 subnet for fixed IPs (e.g. 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l fixed-cidr-v6 -d 'IPv6 subnet for fixed IPs (e.g.: 2001:a02b/48)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s G -l group -d 'Group to assign the unix socket specified by -H when running in daemon mode'
complete -c docker -f -n '__fish_docker_no_subcommand' -s g -l graph -d 'Path to use as the root of the Docker runtime'
complete -c docker -f -n '__fish_docker_no_subcommand' -s H -l host -d 'The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.'
complete -c docker -f -n '__fish_docker_no_subcommand' -s h -l help -d 'Print usage'
complete -c docker -f -n '__fish_docker_no_subcommand' -l icc -d 'Allow unrestricted inter-container and Docker daemon host communication'
complete -c docker -f -n '__fish_docker_no_subcommand' -l insecure-registry -d 'Enable insecure communication with specified registries (no certificate verification for HTTPS and enable HTTP fallback) (e.g., localhost:5000 or 10.20.0.0/16)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip -d 'Default IP address to use when binding container ports'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-forward -d 'Enable net.ipv4.ip_forward and IPv6 forwarding if --fixed-cidr-v6 is defined. IPv6 forwarding may interfere with your existing IPv6 configuration when using Router Advertisement.'
complete -c docker -f -n '__fish_docker_no_subcommand' -l ip-masq -d "Enable IP masquerading for bridge's IP range"
complete -c docker -f -n '__fish_docker_no_subcommand' -l iptables -d "Enable Docker's addition of iptables rules"
complete -c docker -f -n '__fish_docker_no_subcommand' -l ipv6 -d 'Enable IPv6 networking'
complete -c docker -f -n '__fish_docker_no_subcommand' -s l -l log-level -d 'Set the logging level ("debug", "info", "warn", "error", "fatal")'
complete -c docker -f -n '__fish_docker_no_subcommand' -l label -d 'Set key=value labels to the daemon (displayed in `docker info`)'
complete -c docker -f -n '__fish_docker_no_subcommand' -l mtu -d 'Set the containers network MTU'
complete -c docker -f -n '__fish_docker_no_subcommand' -s p -l pidfile -d 'Path to use for daemon PID file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l registry-mirror -d 'Specify a preferred Docker registry mirror'
complete -c docker -f -n '__fish_docker_no_subcommand' -s s -l storage-driver -d 'Force the Docker runtime to use a specific storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l selinux-enabled -d 'Enable selinux support. SELinux does not presently support the BTRFS storage driver'
complete -c docker -f -n '__fish_docker_no_subcommand' -l storage-opt -d 'Set storage driver options'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tls -d 'Use TLS; implied by --tlsverify'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscacert -d 'Trust only remotes providing a certificate signed by the CA given here'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlscert -d 'Path to TLS certificate file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlskey -d 'Path to TLS key file'
complete -c docker -f -n '__fish_docker_no_subcommand' -l tlsverify -d 'Use TLS and verify the remote (daemon: verify client, client: verify daemon)'
complete -c docker -f -n '__fish_docker_no_subcommand' -s v -l version -d 'Print version information and quit'
# subcommands
# attach
complete -c docker -f -n '__fish_docker_no_subcommand' -a attach -d 'Attach to a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l no-stdin -d 'Do not attach STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d 'Proxy all received signals to the process (non-TTY mode only). SIGCHLD, SIGKILL, and SIGSTOP are not proxied.'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -a '(__fish_print_docker_containers running)' -d "Container"
# build
complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s f -l file -d "Name of the Dockerfile(Default is 'Dockerfile' at context root)"
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l force-rm -d 'Always remove intermediate containers, even after unsuccessful builds'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l no-cache -d 'Do not use cache when building the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l pull -d 'Always attempt to pull a newer version of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s q -l quiet -d 'Suppress the build output and print image ID on success'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l rm -d 'Remove intermediate containers after a successful build'
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s t -l tag -d 'Repository name (and optionally a tag) to be applied to the resulting image in case of success'
# commit
complete -c docker -f -n '__fish_docker_no_subcommand' -a commit -d "Create a new image from a container's changes"
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s a -l author -d 'Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s m -l message -d 'Commit message'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s p -l pause -d 'Pause container during commit'
complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -a '(__fish_print_docker_containers all)' -d "Container"
# cp
complete -c docker -f -n '__fish_docker_no_subcommand' -a cp -d "Copy files/folders between a container and the local filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -l help -d 'Print usage'
# create
complete -c docker -f -n '__fish_docker_no_subcommand' -a create -d 'Create a new container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list (e.g. --device-cgroup-rule="c 13:37 rwm")'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-opt -d "Set custom DNS options (Use --dns-opt='' if you don't wish to set options)"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-search -d "Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l expose -d 'Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to run as'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ipc -d 'Default is to create a private IPC namespace (POSIX SysV IPC) for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l link -d 'Add link to another container in the form of <name|id>:alias'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s m -l memory -d 'Memory limit (format: <number>[<unit>], where unit = b, k, m or g)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l memory-swap -d "Total memory usage (memory + swap), set '-1' to disable swap (format: <number>[<unit>], where unit = b, k, m or g)"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l net -d 'Set the Network mode for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s P -l publish-all -d 'Publish all exposed ports to random ports on the host interfaces'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s p -l publish -d "Publish a container's port to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l pid -d 'Default is to create a private PID namespace for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l restart -d 'Restart policy to apply when a container exits (no, on-failure[:max-retry], always)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s u -l user -d 'Username or UID'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s v -l volume -d 'Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -a '(__fish_print_docker_images)' -d "Image"
# diff
complete -c docker -f -n '__fish_docker_no_subcommand' -a diff -d "Inspect changes on a container's filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -a '(__fish_print_docker_containers all)' -d "Container"
# events
complete -c docker -f -n '__fish_docker_no_subcommand' -a events -d 'Get real time events from the server'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -s f -l filter -d "Provide filter values (i.e., 'event=stop')"
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l since -d 'Show all events created since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l until -d 'Stream events until this timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from events' -l format -d 'Format the output using the given go template'
# exec
complete -c docker -f -n '__fish_docker_no_subcommand' -a exec -d 'Run a command in a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s d -l detach -d 'Detached mode: run command in the background'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -a '(__fish_print_docker_containers running)' -d "Container"
# export
complete -c docker -f -n '__fish_docker_no_subcommand' -a export -d 'Stream the contents of a container as a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from export' -a '(__fish_print_docker_containers all)' -d "Container"
# history
complete -c docker -f -n '__fish_docker_no_subcommand' -a history -d 'Show the history of an image'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -s q -l quiet -d 'Only show numeric IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from history' -a '(__fish_print_docker_images)' -d "Image"
# images
complete -c docker -f -n '__fish_docker_no_subcommand' -a images -d 'List images'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s a -l all -d 'Show all images (by default filter out the intermediate image layers)'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s f -l filter -d "Provide filter values (i.e., 'dangling=true')"
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -s q -l quiet -d 'Only show numeric IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from images' -a '(__fish_print_docker_repositories)' -d "Repository"
# import
complete -c docker -f -n '__fish_docker_no_subcommand' -a import -d 'Create a new filesystem image from the contents of a tarball'
complete -c docker -A -f -n '__fish_seen_subcommand_from import' -l help -d 'Print usage'
# info
complete -c docker -f -n '__fish_docker_no_subcommand' -a info -d 'Display system-wide information'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from info' -l help -d 'Print usage'
# inspect
complete -c docker -f -n '__fish_docker_no_subcommand' -a inspect -d 'Return low-level information on a container or image'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s f -l format -d 'Format the output using the given go template.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -s s -l size -d 'Display total file sizes if the type is container.'
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_containers all)' -d "Container"
# kill
complete -c docker -f -n '__fish_docker_no_subcommand' -a kill -d 'Kill a running container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -s s -l signal -d 'Signal to send to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -a '(__fish_print_docker_containers running)' -d "Container"
# load
complete -c docker -f -n '__fish_docker_no_subcommand' -a load -d 'Load an image from a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from load' -s i -l input -d 'Read from a tar archive file, instead of STDIN'
# login
complete -c docker -f -n '__fish_docker_no_subcommand' -a login -d 'Log in to a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s p -l password -d 'Password'
complete -c docker -A -f -n '__fish_seen_subcommand_from login' -s u -l username -d 'Username'
# logout
complete -c docker -f -n '__fish_docker_no_subcommand' -a logout -d 'Log out from a Docker registry server'
# logs
complete -c docker -f -n '__fish_docker_no_subcommand' -a logs -d 'Fetch the logs of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s f -l follow -d 'Follow log output'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -s t -l timestamps -d 'Show timestamps'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l since -d 'Show logs since timestamp'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -l tail -d 'Output the specified number of lines at the end of logs (defaults to all logs)'
complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -a '(__fish_print_docker_containers running)' -d "Container"
# port
complete -c docker -f -n '__fish_docker_no_subcommand' -a port -d 'Lookup the public-facing port that is NAT-ed to PRIVATE_PORT'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from port' -a '(__fish_print_docker_containers running)' -d "Container"
# pause
complete -c docker -f -n '__fish_docker_no_subcommand' -a pause -d 'Pause all processes within a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from pause' -a '(__fish_print_docker_containers running)' -d "Container"
# ps
complete -c docker -f -n '__fish_docker_no_subcommand' -a ps -d 'List containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s a -l all -d 'Show all containers. Only running containers are shown by default.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l before -d 'Show only container created before Id or Name, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s f -l filter -d 'Provide filter values. Valid filters:'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s l -l latest -d 'Show only the latest created container, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s n -d 'Show n last created containers, include non-running ones.'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s q -l quiet -d 'Only display numeric IDs'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -s s -l size -d 'Display total file sizes'
complete -c docker -A -f -n '__fish_seen_subcommand_from ps' -l since -d 'Show only containers created since Id or Name, include non-running ones.'
# pull
complete -c docker -f -n '__fish_docker_no_subcommand' -a pull -d 'Pull an image or a repository from a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -s a -l all-tags -d 'Download all tagged images in the repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_repositories)' -d "Repository"
# push
complete -c docker -f -n '__fish_docker_no_subcommand' -a push -d 'Push an image or a repository to a Docker registry server'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_images)' -d "Image"
complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_repositories)' -d "Repository"
# rename
complete -c docker -f -n '__fish_docker_no_subcommand' -a rename -d 'Rename an existing container'
# restart
complete -c docker -f -n '__fish_docker_no_subcommand' -a restart -d 'Restart a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -s t -l time -d 'Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -a '(__fish_print_docker_containers running)' -d "Container"
# rm
complete -c docker -f -n '__fish_docker_no_subcommand' -a rm -d 'Remove one or more containers'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -d 'Force the removal of a running container (uses SIGKILL)'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s l -l link -d 'Remove the specified link and not the underlying container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s v -l volumes -d 'Remove the volumes associated with the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -a '(__fish_print_docker_containers stopped)' -d "Container"
complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -s f -l force -a '(__fish_print_docker_containers all)' -d "Container"
# rmi
complete -c docker -f -n '__fish_docker_no_subcommand' -a rmi -d 'Remove one or more images'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -s f -l force -d 'Force removal of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -l no-prune -d 'Do not delete untagged parents'
complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -a '(__fish_print_docker_images)' -d "Image"
# run
complete -c docker -f -n '__fish_docker_no_subcommand' -a run -d 'Run a command in a new container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s c -l cpu-shares -d 'CPU shares (relative weight)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cpuset -d 'CPUs in which to allow execution (0-3, 0,1)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s d -l detach -d 'Detached mode: run the container in the background and print the new container ID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device-cgroup-rule -d 'Add a rule to the cgroup allowed devices list (e.g. --device-cgroup-rule="c 13:37 rwm")'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns -d 'Set custom DNS servers'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-opt -d "Set custom DNS options (Use --dns-opt='' if you don't wish to set options)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-search -d "Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s e -l env -d 'Set environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l env-file -d 'Read in a line delimited file of environment variables'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l expose -d 'Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l group-add -d 'Add additional groups to run as'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s h -l hostname -d 'Container host name'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s i -l interactive -d 'Keep STDIN open even if not attached'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l ipc -d 'Default is to create a private IPC namespace (POSIX SysV IPC) for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l link -d 'Add link to another container in the form of <name|id>:alias'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s m -l memory -d 'Memory limit (format: <number>[<unit>], where unit = b, k, m or g)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mac-address -d 'Container MAC address (e.g., 92:d0:c6:0a:29:33)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l memory-swap -d "Total memory usage (memory + swap), set '-1' to disable swap (format: <number>[<unit>], where unit = b, k, m or g)"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l mount -d 'Attach a filesystem mount to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l name -d 'Assign a name to the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l net -d 'Set the Network mode for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s P -l publish-all -d 'Publish all exposed ports to random ports on the host interfaces'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s p -l publish -d "Publish a container's port to the host"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l pid -d 'Default is to create a private PID namespace for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l privileged -d 'Give extended privileges to this container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l read-only -d "Mount the container's root filesystem as read only"
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l restart -d 'Restart policy to apply when a container exits (no, on-failure[:max-retry], always)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l rm -d 'Automatically remove the container when it exits (incompatible with -d)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l security-opt -d 'Security Options'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l sig-proxy -d 'Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l stop-signal -d 'Signal to kill a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s u -l user -d 'Username or UID'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l tmpfs -d 'Mount tmpfs on a directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s v -l volume -d 'Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from run' -a '(__fish_print_docker_images)' -d "Image"
# save
complete -c docker -f -n '__fish_docker_no_subcommand' -a save -d 'Save an image to a tar archive'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -s o -l output -d 'Write to an file, instead of STDOUT'
complete -c docker -A -f -n '__fish_seen_subcommand_from save' -a '(__fish_print_docker_images)' -d "Image"
# search
complete -c docker -f -n '__fish_docker_no_subcommand' -a search -d 'Search for an image on the registry (defaults to the Docker Hub)'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l automated -d 'Only show automated builds'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -l no-trunc -d "Don't truncate output"
complete -c docker -A -f -n '__fish_seen_subcommand_from search' -s s -l stars -d 'Only displays with at least x stars'
# start
complete -c docker -f -n '__fish_docker_no_subcommand' -a start -d 'Start a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s a -l attach -d "Attach container's STDOUT and STDERR and forward all signals to the process"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -s i -l interactive -d "Attach container's STDIN"
complete -c docker -A -f -n '__fish_seen_subcommand_from start' -a '(__fish_print_docker_containers stopped)' -d "Container"
# stats
complete -c docker -f -n '__fish_docker_no_subcommand' -a stats -d "Display a live stream of one or more containers' resource usage statistics"
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -l no-stream -d 'Disable streaming stats and only pull the first result'
complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -a '(__fish_print_docker_containers running)' -d "Container"
# stop
complete -c docker -f -n '__fish_docker_no_subcommand' -a stop -d 'Stop a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -s t -l time -d 'Number of seconds to wait for the container to stop before killing it. Default is 10 seconds.'
complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -a '(__fish_print_docker_containers running)' -d "Container"
# tag
complete -c docker -f -n '__fish_docker_no_subcommand' -a tag -d 'Tag an image into a repository'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -s f -l force -d 'Force'
complete -c docker -A -f -n '__fish_seen_subcommand_from tag' -l help -d 'Print usage'
# top
complete -c docker -f -n '__fish_docker_no_subcommand' -a top -d 'Lookup the running processes of a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from top' -a '(__fish_print_docker_containers running)' -d "Container"
# unpause
complete -c docker -f -n '__fish_docker_no_subcommand' -a unpause -d 'Unpause a paused container'
complete -c docker -A -f -n '__fish_seen_subcommand_from unpause' -a '(__fish_print_docker_containers running)' -d "Container"
# version
complete -c docker -f -n '__fish_docker_no_subcommand' -a version -d 'Show the Docker version information'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -s f -l format -d 'Format the output using the given go template'
complete -c docker -A -f -n '__fish_seen_subcommand_from version' -l help -d 'Print usage'
# wait
complete -c docker -f -n '__fish_docker_no_subcommand' -a wait -d 'Block until a container stops, then print its exit code'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -a '(__fish_print_docker_containers running)' -d "Container"

View File

@ -0,0 +1 @@
See https://github.com/samneirinck/posh-docker

View File

@ -0,0 +1,2 @@
Tianon Gravi <admwiggin@gmail.com> (@tianon)
Jessie Frazelle <jess@docker.com> (@jfrazelle)

File diff suppressed because it is too large Load Diff

View File

@ -68,5 +68,15 @@ lint: build_linter_image
vendor: build_docker_image vendor.conf
@docker run -ti --rm $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make vendor
## generate man pages from go source and markdown
.PHONY: manpages
manpages: build_docker_image
@docker run -ti --rm $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make manpages
## Generate documentation YAML files consumed by docs repo
.PHONY: yamldocs
yamldocs: build_docker_image
@docker run -ti --rm $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make yamldocs
dynbinary: build_cross_image
docker run --rm $(ENVVARS) $(MOUNTS) $(CROSS_IMAGE_NAME) make dynbinary

View File

@ -1,5 +1,5 @@
FROM golang:1.8.1
FROM golang:1.8.3
# allow replacing httpredir or deb mirror
ARG APT_MIRROR=deb.debian.org

View File

@ -1,5 +1,5 @@
FROM golang:1.8-alpine
FROM golang:1.8.3-alpine
RUN apk add -U git make bash coreutils

View File

@ -1,4 +1,4 @@
FROM golang:1.8-alpine
FROM golang:1.8.3-alpine
RUN apk add -U git

View File

@ -0,0 +1,30 @@
# The non-reference docs have been moved!
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
The documentation for Docker Engine has been merged into
[the general documentation repo](https://github.com/docker/docker.github.io).
See the [README](https://github.com/docker/docker.github.io/blob/master/README.md)
for instructions on contributing to and building the documentation.
If you'd like to edit the current published version of the Engine docs,
do it in the master branch here:
https://github.com/docker/docker.github.io/tree/master/engine
If you need to document the functionality of an upcoming Engine release,
use the `vnext-engine` branch:
https://github.com/docker/docker.github.io/tree/vnext-engine/engine
The reference docs have been left in docker/docker (this repo), which remains
the place to edit them.
The docs in the general repo are open-source and we appreciate
your feedback and pull requests!

View File

@ -0,0 +1,321 @@
---
aliases: ["/engine/misc/deprecated/"]
title: "Deprecated Engine Features"
description: "Deprecated Features."
keywords: "docker, documentation, about, technology, deprecate"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Deprecated Engine Features
The following list of features are deprecated in Engine.
To learn more about Docker Engine's deprecation policy,
see [Feature Deprecation Policy](https://docs.docker.com/engine/#feature-deprecation-policy).
### Asynchronous `service create` and `service update`
**Deprecated In Release: v17.05.0**
**Disabled by default in release: v17.09**
Docker 17.05.0 added an optional `--detach=false` option to make the
`docker service create` and `docker service update` work synchronously. This
option will be enable by default in Docker 17.09, at which point the `--detach`
flag can be used to use the previous (asynchronous) behavior.
### `-g` and `--graph` flags on `dockerd`
**Deprecated In Release: v17.05.0**
The `-g` or `--graph` flag for the `dockerd` or `docker daemon` command was
used to indicate the directory in which to store persistent data and resource
configuration and has been replaced with the more descriptive `--data-root`
flag.
These flags were added before Docker 1.0, so will not be _removed_, only
_hidden_, to discourage their use.
### Top-level network properties in NetworkSettings
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
When inspecting a container, `NetworkSettings` contains top-level information
about the default ("bridge") network;
`EndpointID`, `Gateway`, `GlobalIPv6Address`, `GlobalIPv6PrefixLen`, `IPAddress`,
`IPPrefixLen`, `IPv6Gateway`, and `MacAddress`.
These properties are deprecated in favor of per-network properties in
`NetworkSettings.Networks`. These properties were already "deprecated" in
docker 1.9, but kept around for backward compatibility.
Refer to [#17538](https://github.com/docker/docker/pull/17538) for further
information.
### `filter` param for `/images/json` endpoint
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
The `filter` param to filter the list of image by reference (name or name:tag) is now implemented as a regular filter, named `reference`.
### `repository:shortid` image references
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
`repository:shortid` syntax for referencing images is very little used, collides with tag references can be confused with digest references.
### `docker daemon` subcommand
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
The daemon is moved to a separate binary (`dockerd`), and should be used instead.
### Duplicate keys with conflicting values in engine labels
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
Duplicate keys with conflicting values have been deprecated. A warning is displayed
in the output, and an error will be returned in the future.
### `MAINTAINER` in Dockerfile
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
`MAINTAINER` was an early very limited form of `LABEL` which should be used instead.
### API calls without a version
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
API versions should be supplied to all API calls to ensure compatibility with
future Engine versions. Instead of just requesting, for example, the URL
`/containers/json`, you must now request `/v1.25/containers/json`.
### Backing filesystem without `d_type` support for overlay/overlay2
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
The overlay and overlay2 storage driver does not work as expected if the backing
filesystem does not support `d_type`. For example, XFS does not support `d_type`
if it is formatted with the `ftype=0` option.
Please also refer to [#27358](https://github.com/docker/docker/issues/27358) for
further information.
### Three arguments form in `docker import`
**Deprecated In Release: [v0.6.7](https://github.com/docker/docker/releases/tag/v0.6.7)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
The `docker import` command format `file|URL|- [REPOSITORY [TAG]]` is deprecated since November 2013. It's no more supported.
### `-h` shorthand for `--help`
**Deprecated In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
**Target For Removal In Release: v17.09**
The shorthand (`-h`) is less common than `--help` on Linux and cannot be used
on all subcommands (due to it conflicting with, e.g. `-h` / `--hostname` on
`docker create`). For this reason, the `-h` shorthand was not printed in the
"usage" output of subcommands, nor documented, and is now marked "deprecated".
### `-e` and `--email` flags on `docker login`
**Deprecated In Release: [v1.11.0](https://github.com/docker/docker/releases/tag/v1.11.0)**
**Target For Removal In Release: v17.06**
The docker login command is removing the ability to automatically register for an account with the target registry if the given username doesn't exist. Due to this change, the email flag is no longer required, and will be deprecated.
### Separator (`:`) of `--security-opt` flag on `docker run`
**Deprecated In Release: [v1.11.0](https://github.com/docker/docker/releases/tag/v1.11.0)**
**Target For Removal In Release: v17.06**
The flag `--security-opt` doesn't use the colon separator(`:`) anymore to divide keys and values, it uses the equal symbol(`=`) for consistency with other similar flags, like `--storage-opt`.
### `/containers/(id or name)/copy` endpoint
**Deprecated In Release: [v1.8.0](https://github.com/docker/docker/releases/tag/v1.8.0)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
The endpoint `/containers/(id or name)/copy` is deprecated in favor of `/containers/(id or name)/archive`.
### Ambiguous event fields in API
**Deprecated In Release: [v1.10.0](https://github.com/docker/docker/releases/tag/v1.10.0)**
The fields `ID`, `Status` and `From` in the events API have been deprecated in favor of a more rich structure.
See the events API documentation for the new format.
### `-f` flag on `docker tag`
**Deprecated In Release: [v1.10.0](https://github.com/docker/docker/releases/tag/v1.10.0)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
To make tagging consistent across the various `docker` commands, the `-f` flag on the `docker tag` command is deprecated. It is not longer necessary to specify `-f` to move a tag from one image to another. Nor will `docker` generate an error if the `-f` flag is missing and the specified tag is already in use.
### HostConfig at API container start
**Deprecated In Release: [v1.10.0](https://github.com/docker/docker/releases/tag/v1.10.0)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
Passing an `HostConfig` to `POST /containers/{name}/start` is deprecated in favor of
defining it at container creation (`POST /containers/create`).
### `--before` and `--since` flags on `docker ps`
**Deprecated In Release: [v1.10.0](https://github.com/docker/docker/releases/tag/v1.10.0)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
The `docker ps --before` and `docker ps --since` options are deprecated.
Use `docker ps --filter=before=...` and `docker ps --filter=since=...` instead.
### `--automated` and `--stars` flags on `docker search`
**Deprecated in Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
**Target For Removal In Release: v17.09**
The `docker search --automated` and `docker search --stars` options are deprecated.
Use `docker search --filter=is-automated=...` and `docker search --filter=stars=...` instead.
### Driver Specific Log Tags
**Deprecated In Release: [v1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
Log tags are now generated in a standard way across different logging drivers.
Because of which, the driver specific log tag options `syslog-tag`, `gelf-tag` and
`fluentd-tag` have been deprecated in favor of the generic `tag` option.
```bash
{% raw %}
docker --log-driver=syslog --log-opt tag="{{.ImageName}}/{{.Name}}/{{.ID}}"
{% endraw %}
```
### LXC built-in exec driver
**Deprecated In Release: [v1.8.0](https://github.com/docker/docker/releases/tag/v1.8.0)**
**Removed In Release: [v1.10.0](https://github.com/docker/docker/releases/tag/v1.10.0)**
The built-in LXC execution driver, the lxc-conf flag, and API fields have been removed.
### Old Command Line Options
**Deprecated In Release: [v1.8.0](https://github.com/docker/docker/releases/tag/v1.8.0)**
**Removed In Release: [v1.10.0](https://github.com/docker/docker/releases/tag/v1.10.0)**
The flags `-d` and `--daemon` are deprecated in favor of the `daemon` subcommand:
docker daemon -H ...
The following single-dash (`-opt`) variant of certain command line options
are deprecated and replaced with double-dash options (`--opt`):
docker attach -nostdin
docker attach -sig-proxy
docker build -no-cache
docker build -rm
docker commit -author
docker commit -run
docker events -since
docker history -notrunc
docker images -notrunc
docker inspect -format
docker ps -beforeId
docker ps -notrunc
docker ps -sinceId
docker rm -link
docker run -cidfile
docker run -dns
docker run -entrypoint
docker run -expose
docker run -link
docker run -lxc-conf
docker run -n
docker run -privileged
docker run -volumes-from
docker search -notrunc
docker search -stars
docker search -t
docker search -trusted
docker tag -force
The following double-dash options are deprecated and have no replacement:
docker run --cpuset
docker run --networking
docker ps --since-id
docker ps --before-id
docker search --trusted
**Deprecated In Release: [v1.5.0](https://github.com/docker/docker/releases/tag/v1.5.0)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
The single-dash (`-help`) was removed, in favor of the double-dash `--help`
docker -help
docker [COMMAND] -help
### `--run` flag on docker commit
**Deprecated In Release: [v0.10.0](https://github.com/docker/docker/releases/tag/v0.10.0)**
**Removed In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
The flag `--run` of the docker commit (and its short version `-run`) were deprecated in favor
of the `--changes` flag that allows to pass `Dockerfile` commands.
### Interacting with V1 registries
**Disabled By Default In Release: v17.06**
**Target For Removal In Release: v17.12**
Version 1.9 adds a flag (`--disable-legacy-registry=false`) which prevents the
docker daemon from `pull`, `push`, and `login` operations against v1
registries. Though enabled by default, this signals the intent to deprecate
the v1 protocol.
Support for the v1 protocol to the public registry was removed in 1.13. Any
mirror configurations using v1 should be updated to use a
[v2 registry mirror](https://docs.docker.com/registry/recipes/mirror/).
### Docker Content Trust ENV passphrase variables name change
**Deprecated In Release: [v1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0)**
**Removed In Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
Since 1.9, Docker Content Trust Offline key has been renamed to Root key and the Tagging key has been renamed to Repository key. Due to this renaming, we're also changing the corresponding environment variables
- DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE is now named DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE
- DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE is now named DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE
### `--api-enable-cors` flag on dockerd
**Deprecated In Release: [v1.6.0](https://github.com/docker/docker/releases/tag/v1.6.0)**
**Target For Removal In Release: v17.09**
The flag `--api-enable-cors` is deprecated since v1.6.0. Use the flag
`--api-cors-header` instead.

View File

@ -0,0 +1,164 @@
---
description: Volume plugin for Amazon EBS
keywords: "API, Usage, plugins, documentation, developer, amazon, ebs, rexray, volume"
title: Volume plugin for Amazon EBS
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# A proof-of-concept Rexray plugin
In this example, a simple Rexray plugin will be created for the purposes of using
it on an Amazon EC2 instance with EBS. It is not meant to be a complete Rexray plugin.
The example source is available at [https://github.com/tiborvass/rexray-plugin](https://github.com/tiborvass/rexray-plugin).
To learn more about Rexray: [https://github.com/codedellemc/rexray](https://github.com/codedellemc/rexray)
## 1. Make a Docker image
The following is the Dockerfile used to containerize rexray.
```Dockerfile
FROM debian:jessie
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates
RUN wget https://dl.bintray.com/emccode/rexray/stable/0.6.4/rexray-Linux-x86_64-0.6.4.tar.gz -O rexray.tar.gz && tar -xvzf rexray.tar.gz -C /usr/bin && rm rexray.tar.gz
RUN mkdir -p /run/docker/plugins /var/lib/libstorage/volumes
ENTRYPOINT ["rexray"]
CMD ["--help"]
```
To build it you can run `image=$(cat Dockerfile | docker build -q -)` and `$image`
will reference the containerized rexray image.
## 2. Extract rootfs
```sh
$ TMPDIR=/tmp/rexray # for the purpose of this example
$ # create container without running it, to extract the rootfs from image
$ docker create --name rexray "$image"
$ # save the rootfs to a tar archive
$ docker export -o $TMPDIR/rexray.tar rexray
$ # extract rootfs from tar archive to a rootfs folder
$ ( mkdir -p $TMPDIR/rootfs; cd $TMPDIR/rootfs; tar xf ../rexray.tar )
```
## 3. Add plugin configuration
We have to put the following JSON to `$TMPDIR/config.json`:
```json
{
"Args": {
"Description": "",
"Name": "",
"Settable": null,
"Value": null
},
"Description": "A proof-of-concept EBS plugin (using rexray) for Docker",
"Documentation": "https://github.com/tiborvass/rexray-plugin",
"Entrypoint": [
"/usr/bin/rexray", "service", "start", "-f"
],
"Env": [
{
"Description": "",
"Name": "REXRAY_SERVICE",
"Settable": [
"value"
],
"Value": "ebs"
},
{
"Description": "",
"Name": "EBS_ACCESSKEY",
"Settable": [
"value"
],
"Value": ""
},
{
"Description": "",
"Name": "EBS_SECRETKEY",
"Settable": [
"value"
],
"Value": ""
}
],
"Interface": {
"Socket": "rexray.sock",
"Types": [
"docker.volumedriver/1.0"
]
},
"Linux": {
"AllowAllDevices": true,
"Capabilities": ["CAP_SYS_ADMIN"],
"Devices": null
},
"Mounts": [
{
"Source": "/dev",
"Destination": "/dev",
"Type": "bind",
"Options": ["rbind"]
}
],
"Network": {
"Type": "host"
},
"PropagatedMount": "/var/lib/libstorage/volumes",
"User": {},
"WorkDir": ""
}
```
Please note a couple of points:
- `PropagatedMount` is needed so that the docker daemon can see mounts done by the
rexray plugin from within the container, otherwise the docker daemon is not able
to mount a docker volume.
- The rexray plugin needs dynamic access to host devices. For that reason, we
have to give it access to all devices under `/dev` and set `AllowAllDevices` to
true for proper access.
- The user of this simple plugin can change only 3 settings: `REXRAY_SERVICE`,
`EBS_ACCESSKEY` and `EBS_SECRETKEY`. This is because of the reduced scope of this
plugin. Ideally other rexray parameters could also be set.
## 4. Create plugin
`docker plugin create tiborvass/rexray-plugin "$TMPDIR"` will create the plugin.
```sh
$ docker plugin ls
ID NAME DESCRIPTION ENABLED
2475a4bd0ca5 tiborvass/rexray-plugin:latest A rexray volume plugin for Docker false
```
## 5. Test plugin
```sh
$ docker plugin set tiborvass/rexray-plugin EBS_ACCESSKEY=$AWS_ACCESSKEY EBS_SECRETKEY=$AWS_SECRETKEY`
$ docker plugin enable tiborvass/rexray-plugin
$ docker volume create -d tiborvass/rexray-plugin my-ebs-volume
$ docker volume ls
DRIVER VOLUME NAME
tiborvass/rexray-plugin:latest my-ebs-volume
$ docker run --rm -v my-ebs-volume:/volume busybox sh -c 'echo bye > /volume/hi'
$ docker run --rm -v my-ebs-volume:/volume busybox cat /volume/hi
bye
```
## 6. Push plugin
First, ensure you are logged in with `docker login`. Then you can run:
`docker plugin push tiborvass/rexray-plugin` to push it like a regular docker
image to a registry, to make it available for others to install via
`docker plugin install tiborvass/rexray-plugin EBS_ACCESSKEY=$AWS_ACCESSKEY EBS_SECRETKEY=$AWS_SECRETKEY`.

View File

@ -0,0 +1,238 @@
---
title: "Plugin config"
description: "How develop and use a plugin with the managed plugin system"
keywords: "API, Usage, plugins, documentation, developer"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Plugin Config Version 1 of Plugin V2
This document outlines the format of the V0 plugin configuration. The plugin
config described herein was introduced in the Docker daemon in the [v1.12.0
release](https://github.com/docker/docker/commit/f37117045c5398fd3dca8016ea8ca0cb47e7312b).
Plugin configs describe the various constituents of a docker plugin. Plugin
configs can be serialized to JSON format with the following media types:
Config Type | Media Type
------------- | -------------
config | "application/vnd.docker.plugin.v1+json"
## *Config* Field Descriptions
Config provides the base accessible fields for working with V0 plugin format
in the registry.
- **`description`** *string*
description of the plugin
- **`documentation`** *string*
link to the documentation about the plugin
- **`interface`** *PluginInterface*
interface implemented by the plugins, struct consisting of the following fields
- **`types`** *string array*
types indicate what interface(s) the plugin currently implements.
currently supported:
- **docker.volumedriver/1.0**
- **docker.networkdriver/1.0**
- **docker.ipamdriver/1.0**
- **docker.authz/1.0**
- **docker.logdriver/1.0**
- **docker.metricscollector/1.0**
- **`socket`** *string*
socket is the name of the socket the engine should use to communicate with the plugins.
the socket will be created in `/run/docker/plugins`.
- **`entrypoint`** *string array*
entrypoint of the plugin, see [`ENTRYPOINT`](../reference/builder.md#entrypoint)
- **`workdir`** *string*
workdir of the plugin, see [`WORKDIR`](../reference/builder.md#workdir)
- **`network`** *PluginNetwork*
network of the plugin, struct consisting of the following fields
- **`type`** *string*
network type.
currently supported:
- **bridge**
- **host**
- **none**
- **`mounts`** *PluginMount array*
mount of the plugin, struct consisting of the following fields, see [`MOUNTS`](https://github.com/opencontainers/runtime-spec/blob/master/config.md#mounts)
- **`name`** *string*
name of the mount.
- **`description`** *string*
description of the mount.
- **`source`** *string*
source of the mount.
- **`destination`** *string*
destination of the mount.
- **`type`** *string*
mount type.
- **`options`** *string array*
options of the mount.
- **`ipchost`** *boolean*
Access to host ipc namespace.
- **`pidhost`** *boolean*
Access to host pid namespace.
- **`propagatedMount`** *string*
path to be mounted as rshared, so that mounts under that path are visible to docker. This is useful for volume plugins.
This path will be bind-mounted outisde of the plugin rootfs so it's contents
are preserved on upgrade.
- **`env`** *PluginEnv array*
env of the plugin, struct consisting of the following fields
- **`name`** *string*
name of the env.
- **`description`** *string*
description of the env.
- **`value`** *string*
value of the env.
- **`args`** *PluginArgs*
args of the plugin, struct consisting of the following fields
- **`name`** *string*
name of the args.
- **`description`** *string*
description of the args.
- **`value`** *string array*
values of the args.
- **`linux`** *PluginLinux*
- **`capabilities`** *string array*
capabilities of the plugin (*Linux only*), see list [`here`](https://github.com/opencontainers/runc/blob/master/libcontainer/SPEC.md#security)
- **`allowAllDevices`** *boolean*
If `/dev` is bind mounted from the host, and allowAllDevices is set to true, the plugin will have `rwm` access to all devices on the host.
- **`devices`** *PluginDevice array*
device of the plugin, (*Linux only*), struct consisting of the following fields, see [`DEVICES`](https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#devices)
- **`name`** *string*
name of the device.
- **`description`** *string*
description of the device.
- **`path`** *string*
path of the device.
## Example Config
*Example showing the 'tiborvass/sample-volume-plugin' plugin config.*
```json
{
"Args": {
"Description": "",
"Name": "",
"Settable": null,
"Value": null
},
"Description": "A sample volume plugin for Docker",
"Documentation": "https://docs.docker.com/engine/extend/plugins/",
"Entrypoint": [
"/usr/bin/sample-volume-plugin",
"/data"
],
"Env": [
{
"Description": "",
"Name": "DEBUG",
"Settable": [
"value"
],
"Value": "0"
}
],
"Interface": {
"Socket": "plugin.sock",
"Types": [
"docker.volumedriver/1.0"
]
},
"Linux": {
"Capabilities": null,
"AllowAllDevices": false,
"Devices": null
},
"Mounts": null,
"Network": {
"Type": ""
},
"PropagatedMount": "/data",
"User": {},
"Workdir": ""
}
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,262 @@
---
description: Develop and use a plugin with the managed plugin system
keywords: "API, Usage, plugins, documentation, developer"
title: Managed plugin system
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Docker Engine managed plugin system
* [Installing and using a plugin](index.md#installing-and-using-a-plugin)
* [Developing a plugin](index.md#developing-a-plugin)
* [Debugging plugins](index.md#debugging-plugins)
Docker Engine's plugin system allows you to install, start, stop, and remove
plugins using Docker Engine.
For information about the legacy plugin system available in Docker Engine 1.12
and earlier, see [Understand legacy Docker Engine plugins](legacy_plugins.md).
> **Note**: Docker Engine managed plugins are currently not supported
on Windows daemons.
## Installing and using a plugin
Plugins are distributed as Docker images and can be hosted on Docker Hub or on
a private registry.
To install a plugin, use the `docker plugin install` command, which pulls the
plugin from Docker Hub or your private registry, prompts you to grant
permissions or capabilities if necessary, and enables the plugin.
To check the status of installed plugins, use the `docker plugin ls` command.
Plugins that start successfully are listed as enabled in the output.
After a plugin is installed, you can use it as an option for another Docker
operation, such as creating a volume.
In the following example, you install the `sshfs` plugin, verify that it is
enabled, and use it to create a volume.
> **Note**: This example is intended for instructional purposes only. Once the volume is created, your SSH password to the remote host will be exposed as plaintext when inspecting the volume. You should delete the volume as soon as you are done with the example.
1. Install the `sshfs` plugin.
```bash
$ docker plugin install vieux/sshfs
Plugin "vieux/sshfs" is requesting the following privileges:
- network: [host]
- capabilities: [CAP_SYS_ADMIN]
Do you grant the above permissions? [y/N] y
vieux/sshfs
```
The plugin requests 2 privileges:
- It needs access to the `host` network.
- It needs the `CAP_SYS_ADMIN` capability, which allows the plugin to run
the `mount` command.
2. Check that the plugin is enabled in the output of `docker plugin ls`.
```bash
$ docker plugin ls
ID NAME TAG DESCRIPTION ENABLED
69553ca1d789 vieux/sshfs latest the `sshfs` plugin true
```
3. Create a volume using the plugin.
This example mounts the `/remote` directory on host `1.2.3.4` into a
volume named `sshvolume`.
This volume can now be mounted into containers.
```bash
$ docker volume create \
-d vieux/sshfs \
--name sshvolume \
-o sshcmd=user@1.2.3.4:/remote \
-o password=$(cat file_containing_password_for_remote_host)
sshvolume
```
4. Verify that the volume was created successfully.
```bash
$ docker volume ls
DRIVER NAME
vieux/sshfs sshvolume
```
5. Start a container that uses the volume `sshvolume`.
```bash
$ docker run --rm -v sshvolume:/data busybox ls /data
<content of /remote on machine 1.2.3.4>
```
6. Remove the volume `sshvolume`
```bash
docker volume rm sshvolume
sshvolume
```
To disable a plugin, use the `docker plugin disable` command. To completely
remove it, use the `docker plugin remove` command. For other available
commands and options, see the
[command line reference](../reference/commandline/index.md).
## Developing a plugin
#### The rootfs directory
The `rootfs` directory represents the root filesystem of the plugin. In this
example, it was created from a Dockerfile:
>**Note:** The `/run/docker/plugins` directory is mandatory inside of the
plugin's filesystem for docker to communicate with the plugin.
```bash
$ git clone https://github.com/vieux/docker-volume-sshfs
$ cd docker-volume-sshfs
$ docker build -t rootfsimage .
$ id=$(docker create rootfsimage true) # id was cd851ce43a403 when the image was created
$ sudo mkdir -p myplugin/rootfs
$ sudo docker export "$id" | sudo tar -x -C myplugin/rootfs
$ docker rm -vf "$id"
$ docker rmi rootfsimage
```
#### The config.json file
The `config.json` file describes the plugin. See the [plugins config reference](config.md).
Consider the following `config.json` file.
```json
{
"description": "sshFS plugin for Docker",
"documentation": "https://docs.docker.com/engine/extend/plugins/",
"entrypoint": ["/docker-volume-sshfs"],
"network": {
"type": "host"
},
"interface" : {
"types": ["docker.volumedriver/1.0"],
"socket": "sshfs.sock"
},
"linux": {
"capabilities": ["CAP_SYS_ADMIN"]
}
}
```
This plugin is a volume driver. It requires a `host` network and the
`CAP_SYS_ADMIN` capability. It depends upon the `/docker-volume-sshfs`
entrypoint and uses the `/run/docker/plugins/sshfs.sock` socket to communicate
with Docker Engine. This plugin has no runtime parameters.
#### Creating the plugin
A new plugin can be created by running
`docker plugin create <plugin-name> ./path/to/plugin/data` where the plugin
data contains a plugin configuration file `config.json` and a root filesystem
in subdirectory `rootfs`.
After that the plugin `<plugin-name>` will show up in `docker plugin ls`.
Plugins can be pushed to remote registries with
`docker plugin push <plugin-name>`.
## Debugging plugins
Stdout of a plugin is redirected to dockerd logs. Such entries have a
`plugin=<ID>` suffix. Here are a few examples of commands for pluginID
`f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62` and their
corresponding log entries in the docker daemon logs.
```bash
$ docker plugin install tiborvass/sample-volume-plugins
INFO[0036] Starting... Found 0 volumes on startup plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
```
```bash
$ docker volume create -d tiborvass/sample-volume-plugins samplevol
INFO[0193] Create Called... Ensuring directory /data/samplevol exists on host... plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
INFO[0193] open /var/lib/docker/plugin-data/local-persist.json: no such file or directory plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
INFO[0193] Created volume samplevol with mountpoint /data/samplevol plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
INFO[0193] Path Called... Returned path /data/samplevol plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
```
```bash
$ docker run -v samplevol:/tmp busybox sh
INFO[0421] Get Called... Found samplevol plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
INFO[0421] Mount Called... Mounted samplevol plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
INFO[0421] Path Called... Returned path /data/samplevol plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
INFO[0421] Unmount Called... Unmounted samplevol plugin=f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62
```
#### Using docker-runc to obtain logfiles and shell into the plugin.
`docker-runc`, the default docker container runtime can be used for debugging
plugins. This is specifically useful to collect plugin logs if they are
redirected to a file.
```bash
$ docker-runc list
ID PID STATUS BUNDLE CREATED
f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62 2679 running /run/docker/libcontainerd/f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62 2017-02-06T21:53:03.031537592Z
r
```
```bash
$ docker-runc exec f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62 cat /var/log/plugin.log
```
If the plugin has a built-in shell, then exec into the plugin can be done as
follows:
```bash
$ docker-runc exec -t f52a3df433b9aceee436eaada0752f5797aab1de47e5485f1690a073b860ff62 sh
```
#### Using curl to debug plugin socket issues.
To verify if the plugin API socket that the docker daemon communicates with
is responsive, use curl. In this example, we will make API calls from the
docker host to volume and network plugins using curl 7.47.0 to ensure that
the plugin is listening on the said socket. For a well functioning plugin,
these basic requests should work. Note that plugin sockets are available on the host under `/var/run/docker/plugins/<pluginID>`
```bash
curl -H "Content-Type: application/json" -XPOST -d '{}' --unix-socket /var/run/docker/plugins/e8a37ba56fc879c991f7d7921901723c64df6b42b87e6a0b055771ecf8477a6d/plugin.sock http:/VolumeDriver.List
{"Mountpoint":"","Err":"","Volumes":[{"Name":"myvol1","Mountpoint":"/data/myvol1"},{"Name":"myvol2","Mountpoint":"/data/myvol2"}],"Volume":null}
```
```bash
curl -H "Content-Type: application/json" -XPOST -d '{}' --unix-socket /var/run/docker/plugins/45e00a7ce6185d6e365904c8bcf62eb724b1fe307e0d4e7ecc9f6c1eb7bcdb70/plugin.sock http:/NetworkDriver.GetCapabilities
{"Scope":"local"}
```
When using curl 7.5 and above, the URL should be of the form
`http://hostname/APICall`, where `hostname` is the valid hostname where the
plugin is installed and `APICall` is the call to the plugin API.
For example, `http://localhost/VolumeDriver.List`

View File

@ -0,0 +1,101 @@
---
redirect_from:
- "/engine/extend/plugins/"
title: "Use Docker Engine plugins"
description: "How to add additional functionality to Docker with plugins extensions"
keywords: "Examples, Usage, plugins, docker, documentation, user guide"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
This document describes the Docker Engine plugins generally available in Docker
Engine. To view information on plugins managed by Docker,
refer to [Docker Engine plugin system](index.md).
You can extend the capabilities of the Docker Engine by loading third-party
plugins. This page explains the types of plugins and provides links to several
volume and network plugins for Docker.
## Types of plugins
Plugins extend Docker's functionality. They come in specific types. For
example, a [volume plugin](plugins_volume.md) might enable Docker
volumes to persist across multiple Docker hosts and a
[network plugin](plugins_network.md) might provide network plumbing.
Currently Docker supports authorization, volume and network driver plugins. In the future it
will support additional plugin types.
## Installing a plugin
Follow the instructions in the plugin's documentation.
## Finding a plugin
The sections below provide an inexhaustive overview of available plugins.
<style>
#DocumentationText tr td:first-child { white-space: nowrap;}
</style>
### Network plugins
Plugin | Description
----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[Contiv Networking](https://github.com/contiv/netplugin) | An open source network plugin to provide infrastructure and security policies for a multi-tenant micro services deployment, while providing an integration to physical network for non-container workload. Contiv Networking implements the remote driver and IPAM APIs available in Docker 1.9 onwards.
[Kuryr Network Plugin](https://github.com/openstack/kuryr) | A network plugin is developed as part of the OpenStack Kuryr project and implements the Docker networking (libnetwork) remote driver API by utilizing Neutron, the OpenStack networking service. It includes an IPAM driver as well.
[Weave Network Plugin](https://www.weave.works/docs/net/latest/introducing-weave/) | A network plugin that creates a virtual network that connects your Docker containers - across multiple hosts or clouds and enables automatic discovery of applications. Weave networks are resilient, partition tolerant, secure and work in partially connected networks, and other adverse environments - all configured with delightful simplicity.
### Volume plugins
Plugin | Description
----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[Azure File Storage plugin](https://github.com/Azure/azurefile-dockervolumedriver) | Lets you mount Microsoft [Azure File Storage](https://azure.microsoft.com/blog/azure-file-storage-now-generally-available/) shares to Docker containers as volumes using the SMB 3.0 protocol. [Learn more](https://azure.microsoft.com/blog/persistent-docker-volumes-with-azure-file-storage/).
[BeeGFS Volume Plugin](https://github.com/RedCoolBeans/docker-volume-beegfs) | An open source volume plugin to create persistent volumes in a BeeGFS parallel file system.
[Blockbridge plugin](https://github.com/blockbridge/blockbridge-docker-volume) | A volume plugin that provides access to an extensible set of container-based persistent storage options. It supports single and multi-host Docker environments with features that include tenant isolation, automated provisioning, encryption, secure deletion, snapshots and QoS.
[Contiv Volume Plugin](https://github.com/contiv/volplugin) | An open source volume plugin that provides multi-tenant, persistent, distributed storage with intent based consumption. It has support for Ceph and NFS.
[Convoy plugin](https://github.com/rancher/convoy) | A volume plugin for a variety of storage back-ends including device mapper and NFS. It's a simple standalone executable written in Go and provides the framework to support vendor-specific extensions such as snapshots, backups and restore.
[DigitalOcean Block Storage plugin](https://github.com/omallo/docker-volume-plugin-dostorage) | Integrates DigitalOcean's [block storage solution](https://www.digitalocean.com/products/storage/) into the Docker ecosystem by automatically attaching a given block storage volume to a DigitalOcean droplet and making the contents of the volume available to Docker containers running on that droplet.
[DRBD plugin](https://www.drbd.org/en/supported-projects/docker) | A volume plugin that provides highly available storage replicated by [DRBD](https://www.drbd.org). Data written to the docker volume is replicated in a cluster of DRBD nodes.
[Flocker plugin](https://clusterhq.com/docker-plugin/) | A volume plugin that provides multi-host portable volumes for Docker, enabling you to run databases and other stateful containers and move them around across a cluster of machines.
[Fuxi Volume Plugin](https://github.com/openstack/fuxi) | A volume plugin that is developed as part of the OpenStack Kuryr project and implements the Docker volume plugin API by utilizing Cinder, the OpenStack block storage service.
[gce-docker plugin](https://github.com/mcuadros/gce-docker) | A volume plugin able to attach, format and mount Google Compute [persistent-disks](https://cloud.google.com/compute/docs/disks/persistent-disks).
[GlusterFS plugin](https://github.com/calavera/docker-volume-glusterfs) | A volume plugin that provides multi-host volumes management for Docker using GlusterFS.
[Horcrux Volume Plugin](https://github.com/muthu-r/horcrux) | A volume plugin that allows on-demand, version controlled access to your data. Horcrux is an open-source plugin, written in Go, and supports SCP, [Minio](https://www.minio.io) and Amazon S3.
[HPE 3Par Volume Plugin](https://github.com/hpe-storage/python-hpedockerplugin/) | A volume plugin that supports HPE 3Par and StoreVirtual iSCSI storage arrays.
[IPFS Volume Plugin](http://github.com/vdemeester/docker-volume-ipfs) | An open source volume plugin that allows using an [ipfs](https://ipfs.io/) filesystem as a volume.
[Keywhiz plugin](https://github.com/calavera/docker-volume-keywhiz) | A plugin that provides credentials and secret management using Keywhiz as a central repository.
[Local Persist Plugin](https://github.com/CWSpear/local-persist) | A volume plugin that extends the default `local` driver's functionality by allowing you specify a mountpoint anywhere on the host, which enables the files to *always persist*, even if the volume is removed via `docker volume rm`.
[NetApp Plugin](https://github.com/NetApp/netappdvp) (nDVP) | A volume plugin that provides direct integration with the Docker ecosystem for the NetApp storage portfolio. The nDVP package supports the provisioning and management of storage resources from the storage platform to Docker hosts, with a robust framework for adding additional platforms in the future.
[Netshare plugin](https://github.com/ContainX/docker-volume-netshare) | A volume plugin that provides volume management for NFS 3/4, AWS EFS and CIFS file systems.
[Nimble Storage Volume Plugin](https://connect.nimblestorage.com/community/app-integration/docker)| A volume plug-in that integrates with Nimble Storage Unified Flash Fabric arrays. The plug-in abstracts array volume capabilities to the Docker administrator to allow self-provisioning of secure multi-tenant volumes and clones.
[OpenStorage Plugin](https://github.com/libopenstorage/openstorage) | A cluster-aware volume plugin that provides volume management for file and block storage solutions. It implements a vendor neutral specification for implementing extensions such as CoS, encryption, and snapshots. It has example drivers based on FUSE, NFS, NBD and EBS to name a few.
[Portworx Volume Plugin](https://github.com/portworx/px-dev) | A volume plugin that turns any server into a scale-out converged compute/storage node, providing container granular storage and highly available volumes across any node, using a shared-nothing storage backend that works with any docker scheduler.
[Quobyte Volume Plugin](https://github.com/quobyte/docker-volume) | A volume plugin that connects Docker to [Quobyte](http://www.quobyte.com/containers)'s data center file system, a general-purpose scalable and fault-tolerant storage platform.
[REX-Ray plugin](https://github.com/emccode/rexray) | A volume plugin which is written in Go and provides advanced storage functionality for many platforms including VirtualBox, EC2, Google Compute Engine, OpenStack, and EMC.
[Virtuozzo Storage and Ploop plugin](https://github.com/virtuozzo/docker-volume-ploop) | A volume plugin with support for Virtuozzo Storage distributed cloud file system as well as ploop devices.
[VMware vSphere Storage Plugin](https://github.com/vmware/docker-volume-vsphere) | Docker Volume Driver for vSphere enables customers to address persistent storage requirements for Docker containers in vSphere environments.
### Authorization plugins
Plugin | Description
------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[Twistlock AuthZ Broker](https://github.com/twistlock/authz) | A basic extendable authorization plugin that runs directly on the host or inside a container. This plugin allows you to define user policies that it evaluates during authorization. Basic authorization is provided if Docker daemon is started with the --tlsverify flag (username is extracted from the certificate common name).
[HBM plugin](https://github.com/kassisol/hbm) | An authorization plugin that prevents from executing commands with certains parameters.
## Troubleshooting a plugin
If you are having problems with Docker after loading a plugin, ask the authors
of the plugin for help. The Docker team may not be able to assist you.
## Writing a plugin
If you are interested in writing a plugin for Docker, or seeing how they work
under the hood, see the [docker plugins reference](plugin_api.md).

View File

@ -0,0 +1,196 @@
---
title: "Plugins API"
description: "How to write Docker plugins extensions "
keywords: "API, Usage, plugins, documentation, developer"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Docker Plugin API
Docker plugins are out-of-process extensions which add capabilities to the
Docker Engine.
This document describes the Docker Engine plugin API. To view information on
plugins managed by Docker Engine, refer to [Docker Engine plugin system](index.md).
This page is intended for people who want to develop their own Docker plugin.
If you just want to learn about or use Docker plugins, look
[here](legacy_plugins.md).
## What plugins are
A plugin is a process running on the same or a different host as the docker daemon,
which registers itself by placing a file on the same docker host in one of the plugin
directories described in [Plugin discovery](#plugin-discovery).
Plugins have human-readable names, which are short, lowercase strings. For
example, `flocker` or `weave`.
Plugins can run inside or outside containers. Currently running them outside
containers is recommended.
## Plugin discovery
Docker discovers plugins by looking for them in the plugin directory whenever a
user or container tries to use one by name.
There are three types of files which can be put in the plugin directory.
* `.sock` files are UNIX domain sockets.
* `.spec` files are text files containing a URL, such as `unix:///other.sock` or `tcp://localhost:8080`.
* `.json` files are text files containing a full json specification for the plugin.
Plugins with UNIX domain socket files must run on the same docker host, whereas
plugins with spec or json files can run on a different host if a remote URL is specified.
UNIX domain socket files must be located under `/run/docker/plugins`, whereas
spec files can be located either under `/etc/docker/plugins` or `/usr/lib/docker/plugins`.
The name of the file (excluding the extension) determines the plugin name.
For example, the `flocker` plugin might create a UNIX socket at
`/run/docker/plugins/flocker.sock`.
You can define each plugin into a separated subdirectory if you want to isolate definitions from each other.
For example, you can create the `flocker` socket under `/run/docker/plugins/flocker/flocker.sock` and only
mount `/run/docker/plugins/flocker` inside the `flocker` container.
Docker always searches for unix sockets in `/run/docker/plugins` first. It checks for spec or json files under
`/etc/docker/plugins` and `/usr/lib/docker/plugins` if the socket doesn't exist. The directory scan stops as
soon as it finds the first plugin definition with the given name.
### JSON specification
This is the JSON format for a plugin:
```json
{
"Name": "plugin-example",
"Addr": "https://example.com/docker/plugin",
"TLSConfig": {
"InsecureSkipVerify": false,
"CAFile": "/usr/shared/docker/certs/example-ca.pem",
"CertFile": "/usr/shared/docker/certs/example-cert.pem",
"KeyFile": "/usr/shared/docker/certs/example-key.pem"
}
}
```
The `TLSConfig` field is optional and TLS will only be verified if this configuration is present.
## Plugin lifecycle
Plugins should be started before Docker, and stopped after Docker. For
example, when packaging a plugin for a platform which supports `systemd`, you
might use [`systemd` dependencies](
http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Before=) to
manage startup and shutdown order.
When upgrading a plugin, you should first stop the Docker daemon, upgrade the
plugin, then start Docker again.
## Plugin activation
When a plugin is first referred to -- either by a user referring to it by name
(e.g. `docker run --volume-driver=foo`) or a container already configured to
use a plugin being started -- Docker looks for the named plugin in the plugin
directory and activates it with a handshake. See Handshake API below.
Plugins are *not* activated automatically at Docker daemon startup. Rather,
they are activated only lazily, or on-demand, when they are needed.
## Systemd socket activation
Plugins may also be socket activated by `systemd`. The official [Plugins helpers](https://github.com/docker/go-plugins-helpers)
natively supports socket activation. In order for a plugin to be socket activated it needs
a `service` file and a `socket` file.
The `service` file (for example `/lib/systemd/system/your-plugin.service`):
```
[Unit]
Description=Your plugin
Before=docker.service
After=network.target your-plugin.socket
Requires=your-plugin.socket docker.service
[Service]
ExecStart=/usr/lib/docker/your-plugin
[Install]
WantedBy=multi-user.target
```
The `socket` file (for example `/lib/systemd/system/your-plugin.socket`):
```
[Unit]
Description=Your plugin
[Socket]
ListenStream=/run/docker/plugins/your-plugin.sock
[Install]
WantedBy=sockets.target
```
This will allow plugins to be actually started when the Docker daemon connects to
the sockets they're listening on (for instance the first time the daemon uses them
or if one of the plugin goes down accidentally).
## API design
The Plugin API is RPC-style JSON over HTTP, much like webhooks.
Requests flow *from* the Docker daemon *to* the plugin. So the plugin needs to
implement an HTTP server and bind this to the UNIX socket mentioned in the
"plugin discovery" section.
All requests are HTTP `POST` requests.
The API is versioned via an Accept header, which currently is always set to
`application/vnd.docker.plugins.v1+json`.
## Handshake API
Plugins are activated via the following "handshake" API call.
### /Plugin.Activate
**Request:** empty body
**Response:**
```
{
"Implements": ["VolumeDriver"]
}
```
Responds with a list of Docker subsystems which this plugin implements.
After activation, the plugin will then be sent events from this subsystem.
Possible values are:
* [`authz`](plugins_authorization.md)
* [`NetworkDriver`](plugins_network.md)
* [`VolumeDriver`](plugins_volume.md)
## Plugin retries
Attempts to call a method on a plugin are retried with an exponential backoff
for up to 30 seconds. This may help when packaging plugins as containers, since
it gives plugin containers a chance to start up before failing any user
containers which depend on them.
## Plugins helpers
To ease plugins development, we're providing an `sdk` for each kind of plugins
currently supported by Docker at [docker/go-plugins-helpers](https://github.com/docker/go-plugins-helpers).

View File

@ -0,0 +1,260 @@
---
title: "Access authorization plugin"
description: "How to create authorization plugins to manage access control to your Docker daemon."
keywords: "security, authorization, authentication, docker, documentation, plugin, extend"
redirect_from:
- "/engine/extend/authorization/"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Create an authorization plugin
This document describes the Docker Engine plugins generally available in Docker
Engine. To view information on plugins managed by Docker Engine,
refer to [Docker Engine plugin system](index.md).
Docker's out-of-the-box authorization model is all or nothing. Any user with
permission to access the Docker daemon can run any Docker client command. The
same is true for callers using Docker's Engine API to contact the daemon. If you
require greater access control, you can create authorization plugins and add
them to your Docker daemon configuration. Using an authorization plugin, a
Docker administrator can configure granular access policies for managing access
to Docker daemon.
Anyone with the appropriate skills can develop an authorization plugin. These
skills, at their most basic, are knowledge of Docker, understanding of REST, and
sound programming knowledge. This document describes the architecture, state,
and methods information available to an authorization plugin developer.
## Basic principles
Docker's [plugin infrastructure](plugin_api.md) enables
extending Docker by loading, removing and communicating with
third-party components using a generic API. The access authorization subsystem
was built using this mechanism.
Using this subsystem, you don't need to rebuild the Docker daemon to add an
authorization plugin. You can add a plugin to an installed Docker daemon. You do
need to restart the Docker daemon to add a new plugin.
An authorization plugin approves or denies requests to the Docker daemon based
on both the current authentication context and the command context. The
authentication context contains all user details and the authentication method.
The command context contains all the relevant request data.
Authorization plugins must follow the rules described in [Docker Plugin API](plugin_api.md).
Each plugin must reside within directories described under the
[Plugin discovery](plugin_api.md#plugin-discovery) section.
**Note**: the abbreviations `AuthZ` and `AuthN` mean authorization and authentication
respectively.
## Default user authorization mechanism
If TLS is enabled in the [Docker daemon](https://docs.docker.com/engine/security/https/), the default user authorization flow extracts the user details from the certificate subject name.
That is, the `User` field is set to the client certificate subject common name, and the `AuthenticationMethod` field is set to `TLS`.
## Basic architecture
You are responsible for registering your plugin as part of the Docker daemon
startup. You can install multiple plugins and chain them together. This chain
can be ordered. Each request to the daemon passes in order through the chain.
Only when all the plugins grant access to the resource, is the access granted.
When an HTTP request is made to the Docker daemon through the CLI or via the
Engine API, the authentication subsystem passes the request to the installed
authentication plugin(s). The request contains the user (caller) and command
context. The plugin is responsible for deciding whether to allow or deny the
request.
The sequence diagrams below depict an allow and deny authorization flow:
![Authorization Allow flow](images/authz_allow.png)
![Authorization Deny flow](images/authz_deny.png)
Each request sent to the plugin includes the authenticated user, the HTTP
headers, and the request/response body. Only the user name and the
authentication method used are passed to the plugin. Most importantly, no user
credentials or tokens are passed. Finally, not all request/response bodies
are sent to the authorization plugin. Only those request/response bodies where
the `Content-Type` is either `text/*` or `application/json` are sent.
For commands that can potentially hijack the HTTP connection (`HTTP
Upgrade`), such as `exec`, the authorization plugin is only called for the
initial HTTP requests. Once the plugin approves the command, authorization is
not applied to the rest of the flow. Specifically, the streaming data is not
passed to the authorization plugins. For commands that return chunked HTTP
response, such as `logs` and `events`, only the HTTP request is sent to the
authorization plugins.
During request/response processing, some authorization flows might
need to do additional queries to the Docker daemon. To complete such flows,
plugins can call the daemon API similar to a regular user. To enable these
additional queries, the plugin must provide the means for an administrator to
configure proper authentication and security policies.
## Docker client flows
To enable and configure the authorization plugin, the plugin developer must
support the Docker client interactions detailed in this section.
### Setting up Docker daemon
Enable the authorization plugin with a dedicated command line flag in the
`--authorization-plugin=PLUGIN_ID` format. The flag supplies a `PLUGIN_ID`
value. This value can be the plugins socket or a path to a specification file.
Authorization plugins can be loaded without restarting the daemon. Refer
to the [`dockerd` documentation](../reference/commandline/dockerd.md#configuration-reloading) for more information.
```bash
$ dockerd --authorization-plugin=plugin1 --authorization-plugin=plugin2,...
```
Docker's authorization subsystem supports multiple `--authorization-plugin` parameters.
### Calling authorized command (allow)
```bash
$ docker pull centos
...
f1b10cd84249: Pull complete
...
```
### Calling unauthorized command (deny)
```bash
$ docker pull centos
...
docker: Error response from daemon: authorization denied by plugin PLUGIN_NAME: volumes are not allowed.
```
### Error from plugins
```bash
$ docker pull centos
...
docker: Error response from daemon: plugin PLUGIN_NAME failed with error: AuthZPlugin.AuthZReq: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.
```
## API schema and implementation
In addition to Docker's standard plugin registration method, each plugin
should implement the following two methods:
* `/AuthZPlugin.AuthZReq` This authorize request method is called before the Docker daemon processes the client request.
* `/AuthZPlugin.AuthZRes` This authorize response method is called before the response is returned from Docker daemon to the client.
#### /AuthZPlugin.AuthZReq
**Request**:
```json
{
"User": "The user identification",
"UserAuthNMethod": "The authentication method used",
"RequestMethod": "The HTTP method",
"RequestURI": "The HTTP request URI",
"RequestBody": "Byte array containing the raw HTTP request body",
"RequestHeader": "Byte array containing the raw HTTP request header as a map[string][]string "
}
```
**Response**:
```json
{
"Allow": "Determined whether the user is allowed or not",
"Msg": "The authorization message",
"Err": "The error message if things go wrong"
}
```
#### /AuthZPlugin.AuthZRes
**Request**:
```json
{
"User": "The user identification",
"UserAuthNMethod": "The authentication method used",
"RequestMethod": "The HTTP method",
"RequestURI": "The HTTP request URI",
"RequestBody": "Byte array containing the raw HTTP request body",
"RequestHeader": "Byte array containing the raw HTTP request header as a map[string][]string",
"ResponseBody": "Byte array containing the raw HTTP response body",
"ResponseHeader": "Byte array containing the raw HTTP response header as a map[string][]string",
"ResponseStatusCode":"Response status code"
}
```
**Response**:
```json
{
"Allow": "Determined whether the user is allowed or not",
"Msg": "The authorization message",
"Err": "The error message if things go wrong"
}
```
### Request authorization
Each plugin must support two request authorization messages formats, one from the daemon to the plugin and then from the plugin to the daemon. The tables below detail the content expected in each message.
#### Daemon -> Plugin
Name | Type | Description
-----------------------|-------------------|-------------------------------------------------------
User | string | The user identification
Authentication method | string | The authentication method used
Request method | enum | The HTTP method (GET/DELETE/POST)
Request URI | string | The HTTP request URI including API version (e.g., v.1.17/containers/json)
Request headers | map[string]string | Request headers as key value pairs (without the authorization header)
Request body | []byte | Raw request body
#### Plugin -> Daemon
Name | Type | Description
--------|--------|----------------------------------------------------------------------------------
Allow | bool | Boolean value indicating whether the request is allowed or denied
Msg | string | Authorization message (will be returned to the client in case the access is denied)
Err | string | Error message (will be returned to the client in case the plugin encounter an error. The string value supplied may appear in logs, so should not include confidential information)
### Response authorization
The plugin must support two authorization messages formats, one from the daemon to the plugin and then from the plugin to the daemon. The tables below detail the content expected in each message.
#### Daemon -> Plugin
Name | Type | Description
----------------------- |------------------ |----------------------------------------------------
User | string | The user identification
Authentication method | string | The authentication method used
Request method | string | The HTTP method (GET/DELETE/POST)
Request URI | string | The HTTP request URI including API version (e.g., v.1.17/containers/json)
Request headers | map[string]string | Request headers as key value pairs (without the authorization header)
Request body | []byte | Raw request body
Response status code | int | Status code from the docker daemon
Response headers | map[string]string | Response headers as key value pairs
Response body | []byte | Raw docker daemon response body
#### Plugin -> Daemon
Name | Type | Description
--------|--------|----------------------------------------------------------------------------------
Allow | bool | Boolean value indicating whether the response is allowed or denied
Msg | string | Authorization message (will be returned to the client in case the access is denied)
Err | string | Error message (will be returned to the client in case the plugin encounter an error. The string value supplied may appear in logs, so should not include confidential information)

View File

@ -0,0 +1,403 @@
---
title: "Graphdriver plugins"
description: "How to manage image and container filesystems with external plugins"
keywords: "Examples, Usage, storage, image, docker, data, graph, plugin, api"
advisory: experimental
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
## Changelog
### 1.13.0
- Support v2 plugins
# Docker graph driver plugins
Docker graph driver plugins enable admins to use an external/out-of-process
graph driver for use with Docker engine. This is an alternative to using the
built-in storage drivers, such as aufs/overlay/devicemapper/btrfs.
You need to install and enable the plugin and then restart the Docker daemon
before using the plugin. See the following example for the correct ordering
of steps.
```
$ docker plugin install cpuguy83/docker-overlay2-graphdriver-plugin # this command also enables the driver
<output suppressed>
$ pkill dockerd
$ dockerd --experimental -s cpuguy83/docker-overlay2-graphdriver-plugin
```
# Write a graph driver plugin
See the [plugin documentation](https://docs.docker.com/engine/extend/) for detailed information
on the underlying plugin protocol.
## Graph Driver plugin protocol
If a plugin registers itself as a `GraphDriver` when activated, then it is
expected to provide the rootfs for containers as well as image layer storage.
### /GraphDriver.Init
**Request**:
```json
{
"Home": "/graph/home/path",
"Opts": [],
"UIDMaps": [],
"GIDMaps": []
}
```
Initialize the graph driver plugin with a home directory and array of options.
These are passed through from the user, but the plugin is not required to parse
or honor them.
The request also includes a list of UID and GID mappings, structed as follows:
```json
{
"ContainerID": 0,
"HostID": 0,
"Size": 0
}
```
**Response**:
```json
{
"Err": ""
}
```
Respond with a non-empty string error if an error occurred.
### /GraphDriver.Capabilities
**Request**:
```json
{}
```
Get behavioral characteristics of the graph driver. If a plugin does not handle
this request, the engine will use default values for all capabilities.
**Response**:
```json
{
"ReproducesExactDiffs": false,
}
```
Respond with values of capabilities:
* **ReproducesExactDiffs** Defaults to false. Flags that this driver is capable
of reproducing exactly equivalent diffs for read-only filesystem layers.
### /GraphDriver.Create
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
"Parent": "2cd9c322cb78a55e8212aa3ea8425a4180236d7106938ec921d0935a4b8ca142",
"MountLabel": "",
"StorageOpt": {}
}
```
Create a new, empty, read-only filesystem layer with the specified
`ID`, `Parent` and `MountLabel`. If `Parent` is an empty string, there is no
parent layer. `StorageOpt` is map of strings which indicate storage options.
**Response**:
```json
{
"Err": ""
}
```
Respond with a non-empty string error if an error occurred.
### /GraphDriver.CreateReadWrite
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
"Parent": "2cd9c322cb78a55e8212aa3ea8425a4180236d7106938ec921d0935a4b8ca142",
"MountLabel": "",
"StorageOpt": {}
}
```
Similar to `/GraphDriver.Create` but creates a read-write filesystem layer.
### /GraphDriver.Remove
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187"
}
```
Remove the filesystem layer with this given `ID`.
**Response**:
```json
{
"Err": ""
}
```
Respond with a non-empty string error if an error occurred.
### /GraphDriver.Get
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
"MountLabel": ""
}
```
Get the mountpoint for the layered filesystem referred to by the given `ID`.
**Response**:
```json
{
"Dir": "/var/mygraph/46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
"Err": ""
}
```
Respond with the absolute path to the mounted layered filesystem.
Respond with a non-empty string error if an error occurred.
### /GraphDriver.Put
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187"
}
```
Release the system resources for the specified `ID`, such as unmounting the
filesystem layer.
**Response**:
```json
{
"Err": ""
}
```
Respond with a non-empty string error if an error occurred.
### /GraphDriver.Exists
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187"
}
```
Determine if a filesystem layer with the specified `ID` exists.
**Response**:
```json
{
"Exists": true
}
```
Respond with a boolean for whether or not the filesystem layer with the specified
`ID` exists.
### /GraphDriver.Status
**Request**:
```json
{}
```
Get low-level diagnostic information about the graph driver.
**Response**:
```json
{
"Status": [[]]
}
```
Respond with a 2-D array with key/value pairs for the underlying status
information.
### /GraphDriver.GetMetadata
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187"
}
```
Get low-level diagnostic information about the layered filesystem with the
with the specified `ID`
**Response**:
```json
{
"Metadata": {},
"Err": ""
}
```
Respond with a set of key/value pairs containing the low-level diagnostic
information about the layered filesystem.
Respond with a non-empty string error if an error occurred.
### /GraphDriver.Cleanup
**Request**:
```json
{}
```
Perform necessary tasks to release resources help by the plugin, such as
unmounting all the layered file systems.
**Response**:
```json
{
"Err": ""
}
```
Respond with a non-empty string error if an error occurred.
### /GraphDriver.Diff
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
"Parent": "2cd9c322cb78a55e8212aa3ea8425a4180236d7106938ec921d0935a4b8ca142"
}
```
Get an archive of the changes between the filesystem layers specified by the `ID`
and `Parent`. `Parent` may be an empty string, in which case there is no parent.
**Response**:
```
{% raw %}
{{ TAR STREAM }}
{% endraw %}
```
### /GraphDriver.Changes
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
"Parent": "2cd9c322cb78a55e8212aa3ea8425a4180236d7106938ec921d0935a4b8ca142"
}
```
Get a list of changes between the filesystem layers specified by the `ID` and
`Parent`. If `Parent` is an empty string, there is no parent.
**Response**:
```json
{
"Changes": [{}],
"Err": ""
}
```
Respond with a list of changes. The structure of a change is:
```json
"Path": "/some/path",
"Kind": 0,
```
Where the `Path` is the filesystem path within the layered filesystem that is
changed and `Kind` is an integer specifying the type of change that occurred:
- 0 - Modified
- 1 - Added
- 2 - Deleted
Respond with a non-empty string error if an error occurred.
### /GraphDriver.ApplyDiff
**Request**:
```
{% raw %}
{{ TAR STREAM }}
{% endraw %}
```
Extract the changeset from the given diff into the layer with the specified `ID`
and `Parent`
**Query Parameters**:
- id (required)- the `ID` of the new filesystem layer to extract the diff to
- parent (required)- the `Parent` of the given `ID`
**Response**:
```json
{
"Size": 512366,
"Err": ""
}
```
Respond with the size of the new layer in bytes.
Respond with a non-empty string error if an error occurred.
### /GraphDriver.DiffSize
**Request**:
```json
{
"ID": "46fe8644f2572fd1e505364f7581e0c9dbc7f14640bd1fb6ce97714fb6fc5187",
"Parent": "2cd9c322cb78a55e8212aa3ea8425a4180236d7106938ec921d0935a4b8ca142"
}
```
Calculate the changes between the specified `ID`
**Response**:
```json
{
"Size": 512366,
"Err": ""
}
```
Respond with the size changes between the specified `ID` and `Parent`
Respond with a non-empty string error if an error occurred.

View File

@ -0,0 +1,220 @@
---
title: "Docker log driver plugins"
description: "Log driver plugins."
keywords: "Examples, Usage, plugins, docker, documentation, user guide, logging"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Logging driver plugins
This document describes logging driver plugins for Docker.
Logging drivers enables users to forward container logs to another service for
processing. Docker includes several logging drivers as built-ins, however can
never hope to support all use-cases with built-in drivers. Plugins allow Docker
to support a wide range of logging services without requiring to embed client
libraries for these services in the main Docker codebase. See the
[plugin documentation](legacy_plugins.md) for more information.
## Create a logging plugin
The main interface for logging plugins uses the same JSON+HTTP RPC protocol used
by other plugin types. See the
[example](https://github.com/cpuguy83/docker-log-driver-test) plugin for a
reference implementation of a logging plugin. The example wraps the built-in
`jsonfilelog` log driver.
## LogDriver protocol
Logging plugins must register as a `LogDriver` during plugin activation. Once
activated users can specify the plugin as a log driver.
There are two HTTP endpoints that logging plugins must implement:
### `/LogDriver.StartLogging`
Signals to the plugin that a container is starting that the plugin should start
receiving logs for.
Logs will be streamed over the defined file in the request. On Linux this file
is a FIFO. Logging plugins are not currently supported on Windows.
**Request**:
```json
{
"File": "/path/to/file/stream",
"Info": {
"ContainerID": "123456"
}
}
```
`File` is the path to the log stream that needs to be consumed. Each call to
`StartLogging` should provide a different file path, even if it's a container
that the plugin has already received logs for prior. The file is created by
docker with a randomly generated name.
`Info` is details about the container that's being logged. This is fairly
free-form, but is defined by the following struct definition:
```go
type Info struct {
Config map[string]string
ContainerID string
ContainerName string
ContainerEntrypoint string
ContainerArgs []string
ContainerImageID string
ContainerImageName string
ContainerCreated time.Time
ContainerEnv []string
ContainerLabels map[string]string
LogPath string
DaemonName string
}
```
`ContainerID` will always be supplied with this struct, but other fields may be
empty or missing.
**Response**
```json
{
"Err": ""
}
```
If an error occurred during this request, add an error message to the `Err` field
in the response. If no error then you can either send an empty response (`{}`)
or an empty value for the `Err` field.
The driver should at this point be consuming log messages from the passed in file.
If messages are unconsumed, it may cause the container to block while trying to
write to its stdio streams.
Log stream messages are encoded as protocol buffers. The protobuf definitions are
in the
[docker repository](https://github.com/docker/docker/blob/master/api/types/plugins/logdriver/entry.proto).
Since protocol buffers are not self-delimited you must decode them from the stream
using the following stream format:
```
[size][message]
```
Where `size` is a 4-byte big endian binary encoded uint32. `size` in this case
defines the size of the next message. `message` is the actual log entry.
A reference golang implementation of a stream encoder/decoder can be found
[here](https://github.com/docker/docker/blob/master/api/types/plugins/logdriver/io.go)
### `/LogDriver.StopLogging`
Signals to the plugin to stop collecting logs from the defined file.
Once a response is received, the file will be removed by Docker. You must make
sure to collect all logs on the stream before responding to this request or risk
losing log data.
Requests on this endpoint does not mean that the container has been removed
only that it has stopped.
**Request**:
```json
{
"File": "/path/to/file/stream"
}
```
**Response**:
```json
{
"Err": ""
}
```
If an error occurred during this request, add an error message to the `Err` field
in the response. If no error then you can either send an empty response (`{}`)
or an empty value for the `Err` field.
## Optional endpoints
Logging plugins can implement two extra logging endpoints:
### `/LogDriver.Capabilities`
Defines the capabilities of the log driver. You must implement this endpoint for
Docker to be able to take advantage of any of the defined capabilities.
**Request**:
```json
{}
```
**Response**:
```json
{
"ReadLogs": true
}
```
Supported capabilities:
- `ReadLogs` - this tells Docker that the plugin is capable of reading back logs
to clients. Plugins that report that they support `ReadLogs` must implement the
`/LogDriver.ReadLogs` endpoint
### `/LogDriver.ReadLogs`
Reads back logs to the client. This is used when `docker logs <container>` is
called.
In order for Docker to use this endpoint, the plugin must specify as much when
`/LogDriver.Capabilities` is called.
**Request**:
```json
{
"ReadConfig": {},
"Info": {
"ContainerID": "123456"
}
}
```
`ReadConfig` is the list of options for reading, it is defined with the following
golang struct:
```go
type ReadConfig struct {
Since time.Time
Tail int
Follow bool
}
```
- `Since` defines the oldest log that should be sent.
- `Tail` defines the number of lines to read (e.g. like the command `tail -n 10`)
- `Follow` signals that the client wants to stay attached to receive new log messages
as they come in once the existing logs have been read.
`Info` is the same type defined in `/LogDriver.StartLogging`. It should be used
to determine what set of logs to read.
**Response**:
```
{{ log stream }}
```
The response should be the encoded log message using the same format as the
messages that the plugin consumed from Docker.

View File

@ -0,0 +1,85 @@
---
title: "Docker metrics collector plugins"
description: "Metrics plugins."
keywords: "Examples, Usage, plugins, docker, documentation, user guide, metrics"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Metrics Collector Plugins
Docker exposes internal metrics based on the prometheus format. Metrics plugins
enable accessing these metrics in a consistent way by providing a Unix
socket at a predefined path where the plugin can scrape the metrics.
> **Note**: that while the plugin interface for metrics is non-experimental, the naming
of the metrics and metric labels is still considered experimental and may change
in a future version.
## Creating a metrics plugin
You must currently set `PropagatedMount` in the plugin `config.json` to
`/run/docker`. This allows the plugin to receive updated mounts
(the bind-mounted socket) from Docker after the plugin is already configured.
## MetricsCollector protocol
Metrics plugins must register as implementing the`MetricsCollector` interface
in `config.json`.
On Unix platforms, the socket is located at `/run/docker/metrics.sock` in the
plugin's rootfs.
`MetricsCollector` must implement two endpoints:
### `MetricsCollector.StartMetrics`
Signals to the plugin that the metrics socket is now available for scraping
**Request**
```json
{}
```
The request has no playload.
**Response**
```json
{
"Err": ""
}
```
If an error occurred during this request, add an error message to the `Err` field
in the response. If no error then you can either send an empty response (`{}`)
or an empty value for the `Err` field. Errors will only be logged.
### `MetricsCollector.StopMetrics`
Signals to the plugin that the metrics socket is no longer available.
This may happen when the daemon is shutting down.
**Request**
```json
{}
```
The request has no playload.
**Response**
```json
{
"Err": ""
}
```
If an error occurred during this request, add an error message to the `Err` field
in the response. If no error then you can either send an empty response (`{}`)
or an empty value for the `Err` field. Errors will only be logged.

View File

@ -0,0 +1,77 @@
---
title: "Docker network driver plugins"
description: "Network driver plugins."
keywords: "Examples, Usage, plugins, docker, documentation, user guide"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Engine network driver plugins
This document describes Docker Engine network driver plugins generally
available in Docker Engine. To view information on plugins
managed by Docker Engine, refer to [Docker Engine plugin system](index.md).
Docker Engine network plugins enable Engine deployments to be extended to
support a wide range of networking technologies, such as VXLAN, IPVLAN, MACVLAN
or something completely different. Network driver plugins are supported via the
LibNetwork project. Each plugin is implemented as a "remote driver" for
LibNetwork, which shares plugin infrastructure with Engine. Effectively, network
driver plugins are activated in the same way as other plugins, and use the same
kind of protocol.
## Network driver plugins and swarm mode
Docker 1.12 adds support for cluster management and orchestration called
[swarm mode](https://docs.docker.com/engine/swarm/). Docker Engine running in swarm mode currently
only supports the built-in overlay driver for networking. Therefore existing
networking plugins will not work in swarm mode.
When you run Docker Engine outside of swarm mode, all networking plugins that
worked in Docker 1.11 will continue to function normally. They do not require
any modification.
## Using network driver plugins
The means of installing and running a network driver plugin depend on the
particular plugin. So, be sure to install your plugin according to the
instructions obtained from the plugin developer.
Once running however, network driver plugins are used just like the built-in
network drivers: by being mentioned as a driver in network-oriented Docker
commands. For example,
$ docker network create --driver weave mynet
Some network driver plugins are listed in [plugins](legacy_plugins.md)
The `mynet` network is now owned by `weave`, so subsequent commands
referring to that network will be sent to the plugin,
$ docker run --network=mynet busybox top
## Write a network plugin
Network plugins implement the [Docker plugin
API](plugin_api.md) and the network plugin protocol
## Network plugin protocol
The network driver protocol, in addition to the plugin activation call, is
documented as part of libnetwork:
[https://github.com/docker/libnetwork/blob/master/docs/remote.md](https://github.com/docker/libnetwork/blob/master/docs/remote.md).
# Related Information
To interact with the Docker maintainers and other interested users, see the IRC channel `#docker-network`.
- [Docker networks feature overview](https://docs.docker.com/engine/userguide/networking/)
- The [LibNetwork](https://github.com/docker/libnetwork) project

View File

@ -0,0 +1,186 @@
---
description: Using services with plugins
keywords: "API, Usage, plugins, documentation, developer"
title: Plugins and Services
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Using Volume and Network plugins in Docker services
In swarm mode, it is possible to create a service that allows for attaching
to networks or mounting volumes that are backed by plugins. Swarm schedules
services based on plugin availability on a node.
### Volume plugins
In this example, a volume plugin is installed on a swarm worker and a volume
is created using the plugin. In the manager, a service is created with the
relevant mount options. It can be observed that the service is scheduled to
run on the worker node with the said volume plugin and volume. Note that,
node1 is the manager and node2 is the worker.
1. Prepare manager. In node 1:
```bash
$ docker swarm init
Swarm initialized: current node (dxn1zf6l61qsb1josjja83ngz) is now a manager.
```
2. Join swarm, install plugin and create volume on worker. In node 2:
```bash
$ docker swarm join \
--token SWMTKN-1-49nj1cmql0jkz5s954yi3oex3nedyz0fb0xx14ie39trti4wxv-8vxv8rssmk743ojnwacrr2e7c \
192.168.99.100:2377
```
```bash
$ docker plugin install tiborvass/sample-volume-plugin
latest: Pulling from tiborvass/sample-volume-plugin
eb9c16fbdc53: Download complete
Digest: sha256:00b42de88f3a3e0342e7b35fa62394b0a9ceb54d37f4c50be5d3167899994639
Status: Downloaded newer image for tiborvass/sample-volume-plugin:latest
Installed plugin tiborvass/sample-volume-plugin
```
```bash
$ docker volume create -d tiborvass/sample-volume-plugin --name pluginVol
```
3. Create a service using the plugin and volume. In node1:
```bash
$ docker service create --name my-service --mount type=volume,volume-driver=tiborvass/sample-volume-plugin,source=pluginVol,destination=/tmp busybox top
$ docker service ls
z1sj8bb8jnfn my-service replicated 1/1 busybox:latest
```
docker service ls shows service 1 instance of service running.
4. Observe the task getting scheduled in node 2:
```bash
{% raw %}
$ docker ps --format '{{.ID}}\t {{.Status}} {{.Names}} {{.Command}}'
83fc1e842599 Up 2 days my-service.1.9jn59qzn7nbc3m0zt1hij12xs "top"
{% endraw %}
```
### Network plugins
In this example, a global scope network plugin is installed on both the
swarm manager and worker. A service is created with replicated instances
using the installed plugin. We will observe how the availability of the
plugin determines network creation and container scheduling.
Note that node1 is the manager and node2 is the worker.
1. Install a global scoped network plugin on both manager and worker. On node1
and node2:
```bash
$ docker plugin install bboreham/weave2
Plugin "bboreham/weave2" is requesting the following privileges:
- network: [host]
- capabilities: [CAP_SYS_ADMIN CAP_NET_ADMIN]
Do you grant the above permissions? [y/N] y
latest: Pulling from bboreham/weave2
7718f575adf7: Download complete
Digest: sha256:2780330cc15644b60809637ee8bd68b4c85c893d973cb17f2981aabfadfb6d72
Status: Downloaded newer image for bboreham/weave2:latest
Installed plugin bboreham/weave2
```
2. Create a network using plugin on manager. On node1:
```bash
$ docker network create --driver=bboreham/weave2:latest globalnet
$ docker network ls
NETWORK ID NAME DRIVER SCOPE
qlj7ueteg6ly globalnet bboreham/weave2:latest swarm
```
3. Create a service on the manager and have replicas set to 8. Observe that
containers get scheduled on both manager and worker.
On node 1:
```bash
$ docker service create --network globalnet --name myservice --replicas=8 mrjana/simpleweb simpleweb
w90drnfzw85nygbie9kb89vpa
```
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
87520965206a mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 5 seconds ago Up 4 seconds myservice.4.ytdzpktmwor82zjxkh118uf1v
15e24de0f7aa mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 5 seconds ago Up 4 seconds myservice.2.kh7a9n3iauq759q9mtxyfs9hp
c8c8f0144cdc mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 5 seconds ago Up 4 seconds myservice.6.sjhpj5gr3xt33e3u2jycoj195
2e8e4b2c5c08 mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 5 seconds ago Up 4 seconds myservice.8.2z29zowsghx66u2velublwmrh
```
On node 2:
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
53c0ae7c1dae mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 2 seconds ago Up Less than a second myservice.7.x44tvvdm3iwkt9kif35f7ykz1
9b56c627fee0 mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 2 seconds ago Up Less than a second myservice.1.x7n1rm6lltw5gja3ueikze57q
d4f5927ba52c mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 2 seconds ago Up 1 second myservice.5.i97bfo9uc6oe42lymafs9rz6k
478c0d395bd7 mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 2 seconds ago Up Less than a second myservice.3.yr7nkffa48lff1vrl2r1m1ucs
```
4. Scale down the number of instances. On node1:
```bash
$ docker service scale myservice=0
myservice scaled to 0
```
5. Disable and uninstall the plugin on the worker. On node2:
```bash
$ docker plugin rm -f bboreham/weave2
bboreham/weave2
```
6. Scale up the number of instances again. Observe that all containers are
scheduled on the master and not on the worker, because the plugin is not available on the worker anymore.
On node 1:
```bash
$ docker service scale myservice=8
myservice scaled to 8
```
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cf4b0ec2415e mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 36 seconds myservice.3.r7p5o208jmlzpcbm2ytl3q6n1
57c64a6a2b88 mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 36 seconds myservice.4.dwoezsbb02ccstkhlqjy2xe7h
3ac68cc4e7b8 mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 35 seconds myservice.5.zx4ezdrm2nwxzkrwnxthv0284
006c3cb318fc mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 36 seconds myservice.8.q0e3umt19y3h3gzo1ty336k5r
dd2ffebde435 mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 36 seconds myservice.7.a77y3u22prjipnrjg7vzpv3ba
a86c74d8b84b mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 36 seconds myservice.6.z9nbn14bagitwol1biveeygl7
2846a7850ba0 mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 37 seconds myservice.2.ypufz2eh9fyhppgb89g8wtj76
e2ec01efcd8a mrjana/simpleweb@sha256:317d7f221d68c86d503119b0ea12c29de42af0a22ca087d522646ad1069a47a4 "simpleweb" 39 seconds ago Up 38 seconds myservice.1.8w7c4ttzr6zcb9sjsqyhwp3yl
```
On node 2:
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
```

View File

@ -0,0 +1,360 @@
---
title: "Volume plugins"
description: "How to manage data with external volume plugins"
keywords: "Examples, Usage, volume, docker, data, volumes, plugin, api"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Write a volume plugin
Docker Engine volume plugins enable Engine deployments to be integrated with
external storage systems such as Amazon EBS, and enable data volumes to persist
beyond the lifetime of a single Docker host. See the
[plugin documentation](legacy_plugins.md) for more information.
## Changelog
### 1.13.0
- If used as part of the v2 plugin architecture, mountpoints that are part of
paths returned by the plugin must be mounted under the directory specified by
`PropagatedMount` in the plugin configuration
([#26398](https://github.com/docker/docker/pull/26398))
### 1.12.0
- Add `Status` field to `VolumeDriver.Get` response
([#21006](https://github.com/docker/docker/pull/21006#))
- Add `VolumeDriver.Capabilities` to get capabilities of the volume driver
([#22077](https://github.com/docker/docker/pull/22077))
### 1.10.0
- Add `VolumeDriver.Get` which gets the details about the volume
([#16534](https://github.com/docker/docker/pull/16534))
- Add `VolumeDriver.List` which lists all volumes owned by the driver
([#16534](https://github.com/docker/docker/pull/16534))
### 1.8.0
- Initial support for volume driver plugins
([#14659](https://github.com/docker/docker/pull/14659))
## Command-line changes
To give a container access to a volume, use the `--volume` and `--volume-driver`
flags on the `docker container run` command. The `--volume` (or `-v`) flag
accepts a volume name and path on the host, and the `--volume-driver` flag
accepts a driver type.
```bash
$ docker volume create --driver=flocker volumename
$ docker container run -it --volume volumename:/data busybox sh
```
### `--volume`
The `--volume` (or `-v`) flag takes a value that is in the format
`<volume_name>:<mountpoint>`. The two parts of the value are
separated by a colon (`:`) character.
- The volume name is a human-readable name for the volume, and cannot begin with
a `/` character. It is referred to as `volume_name` in the rest of this topic.
- The `Mountpoint` is the path on the host (v1) or in the plugin (v2) where the
volume has been made available.
### `volumedriver`
Specifying a `volumedriver` in conjunction with a `volumename` allows you to
use plugins such as [Flocker](https://github.com/ScatterHQ/flocker) to manage
volumes external to a single host, such as those on EBS.
## Create a VolumeDriver
The container creation endpoint (`/containers/create`) accepts a `VolumeDriver`
field of type `string` allowing to specify the name of the driver. If not
specified, it defaults to `"local"` (the default driver for local volumes).
## Volume plugin protocol
If a plugin registers itself as a `VolumeDriver` when activated, it must
provide the Docker Daemon with writeable paths on the host filesystem. The Docker
daemon provides these paths to containers to consume. The Docker daemon makes
the volumes available by bind-mounting the provided paths into the containers.
> **Note**: Volume plugins should *not* write data to the `/var/lib/docker/`
> directory, including `/var/lib/docker/volumes`. The `/var/lib/docker/`
> directory is reserved for Docker.
### `/VolumeDriver.Create`
**Request**:
```json
{
"Name": "volume_name",
"Opts": {}
}
```
Instruct the plugin that the user wants to create a volume, given a user
specified volume name. The plugin does not need to actually manifest the
volume on the filesystem yet (until `Mount` is called).
`Opts` is a map of driver specific options passed through from the user request.
**Response**:
```json
{
"Err": ""
}
```
Respond with a string error if an error occurred.
### `/VolumeDriver.Remove`
**Request**:
```json
{
"Name": "volume_name"
}
```
Delete the specified volume from disk. This request is issued when a user
invokes `docker rm -v` to remove volumes associated with a container.
**Response**:
```json
{
"Err": ""
}
```
Respond with a string error if an error occurred.
### `/VolumeDriver.Mount`
**Request**:
```json
{
"Name": "volume_name",
"ID": "b87d7442095999a92b65b3d9691e697b61713829cc0ffd1bb72e4ccd51aa4d6c"
}
```
Docker requires the plugin to provide a volume, given a user specified volume
name. `Mount` is called once per container start. If the same `volume_name` is requested
more than once, the plugin may need to keep track of each new mount request and provision
at the first mount request and deprovision at the last corresponding unmount request.
`ID` is a unique ID for the caller that is requesting the mount.
**Response**:
- **v1**:
```json
{
"Mountpoint": "/path/to/directory/on/host",
"Err": ""
}
```
- **v2**:
```json
{
"Mountpoint": "/path/under/PropagatedMount",
"Err": ""
}
```
`Mountpoint` is the path on the host (v1) or in the plugin (v2) where the volume
has been made available.
`Err` is either empty or contains an error string.
### `/VolumeDriver.Path`
**Request**:
```json
{
"Name": "volume_name"
}
```
Request the path to the volume with the given `volume_name`.
**Response**:
- **v1**:
```json
{
"Mountpoin": "/path/to/directory/on/host",
"Err": ""
}
```
- **v2**:
```json
{
"Mountpoint": "/path/under/PropagatedMount",
"Err": ""
}
```
Respond with the path on the host (v1) or inside the plugin (v2) where the
volume has been made available, and/or a string error if an error occurred.
`Mountpoint` is optional. However, the plugin may be queried again later if one
is not provided.
### `/VolumeDriver.Unmount`
**Request**:
```json
{
"Name": "volume_name",
"ID": "b87d7442095999a92b65b3d9691e697b61713829cc0ffd1bb72e4ccd51aa4d6c"
}
```
Docker is no longer using the named volume. `Unmount` is called once per
container stop. Plugin may deduce that it is safe to deprovision the volume at
this point.
`ID` is a unique ID for the caller that is requesting the mount.
**Response**:
```json
{
"Err": ""
}
```
Respond with a string error if an error occurred.
### `/VolumeDriver.Get`
**Request**:
```json
{
"Name": "volume_name"
}
```
Get info about `volume_name`.
**Response**:
- **v1**:
```json
{
"Volume": {
"Name": "volume_name",
"Mountpoint": "/path/to/directory/on/host",
"Status": {}
},
"Err": ""
}
```
- **v2**:
```json
{
"Volume": {
"Name": "volume_name",
"Mountpoint": "/path/under/PropagatedMount",
"Status": {}
},
"Err": ""
}
```
Respond with a string error if an error occurred. `Mountpoint` and `Status` are
optional.
### /VolumeDriver.List
**Request**:
```json
{}
```
Get the list of volumes registered with the plugin.
**Response**:
- **v1**:
```json
{
"Volumes": [
{
"Name": "volume_name",
"Mountpoint": "/path/to/directory/on/host"
}
],
"Err": ""
}
```
- **v2**:
```json
{
"Volumes": [
{
"Name": "volume_name",
"Mountpoint": "/path/under/PropagatedMount"
}
],
"Err": ""
}
```
Respond with a string error if an error occurred. `Mountpoint` is optional.
### /VolumeDriver.Capabilities
**Request**:
```json
{}
```
Get the list of capabilities the driver supports.
The driver is not required to implement `Capabilities`. If it is not
implemented, the default values are used.
**Response**:
```json
{
"Capabilities": {
"Scope": "global"
}
}
```
Supported scopes are `global` and `local`. Any other value in `Scope` will be
ignored, and `local` is used. `Scope` allows cluster managers to handle the
volume in different ways. For instance, a scope of `global`, signals to the
cluster manager that it only needs to create the volume once instead of on each
Docker host. More capabilities may be added in the future.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,160 @@
---
title: "attach"
description: "The attach command description and usage"
keywords: "attach, running, container"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# attach
```markdown
Usage: docker attach [OPTIONS] CONTAINER
Attach local standard input, output, and error streams to a running container
Options:
--detach-keys string Override the key sequence for detaching a container
--help Print usage
--no-stdin Do not attach STDIN
--sig-proxy Proxy all received signals to the process (default true)
```
## Description
Use `docker attach` to attach your terminal's standard input, output, and error
(or any combination of the three) to a running container using the container's
ID or name. This allows you to view its ongoing output or to control it
interactively, as though the commands were running directly in your terminal.
> **Note:**
> The `attach` command will display the output of the `ENTRYPOINT/CMD` process. This
> can appear as if the attach command is hung when in fact the process may simply
> not be interacting with the terminal at that time.
You can attach to the same contained process multiple times simultaneously,
even as a different user with the appropriate permissions.
To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the
container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to
the container. You can detach from a container and leave it running using the
`CTRL-p CTRL-q` key sequence.
> **Note:**
> A process running as PID 1 inside a container is treated specially by
> Linux: it ignores any signal with the default action. So, the process
> will not terminate on `SIGINT` or `SIGTERM` unless it is coded to do
> so.
It is forbidden to redirect the standard input of a `docker attach` command
while attaching to a tty-enabled container (i.e.: launched with `-t`).
While a client is connected to container's stdio using `docker attach`, Docker
uses a ~1MB memory buffer to maximize the throughput of the application. If
this buffer is filled, the speed of the API connection will start to have an
effect on the process output writing speed. This is similar to other
applications like SSH. Because of this, it is not recommended to run
performance critical applications that generate a lot of output in the
foreground over a slow client connection. Instead, users should use the
`docker logs` command to get access to the logs.
### Override the detach sequence
If you want, you can configure an override the Docker key sequence for detach.
This is useful if the Docker default sequence conflicts with key sequence you
use for other applications. There are two ways to define your own detach key
sequence, as a per-container override or as a configuration property on your
entire configuration.
To override the sequence for an individual container, use the
`--detach-keys="<sequence>"` flag with the `docker attach` command. The format of
the `<sequence>` is either a letter [a-Z], or the `ctrl-` combined with any of
the following:
* `a-z` (a single lowercase alpha character )
* `@` (at sign)
* `[` (left bracket)
* `\\` (two backward slashes)
* `_` (underscore)
* `^` (caret)
These `a`, `ctrl-a`, `X`, or `ctrl-\\` values are all examples of valid key
sequences. To configure a different configuration default key sequence for all
containers, see [**Configuration file** section](cli.md#configuration-files).
## Examples
### Attach to and detach from a running container
```bash
$ docker run -d --name topdemo ubuntu /usr/bin/top -b
$ docker attach topdemo
top - 02:05:52 up 3:05, 0 users, load average: 0.01, 0.02, 0.05
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 373572k total, 355560k used, 18012k free, 27872k buffers
Swap: 786428k total, 0k used, 786428k free, 221740k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 17200 1116 912 R 0 0.3 0:00.03 top
top - 02:05:55 up 3:05, 0 users, load average: 0.01, 0.02, 0.05
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 373572k total, 355244k used, 18328k free, 27872k buffers
Swap: 786428k total, 0k used, 786428k free, 221776k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top
top - 02:05:58 up 3:06, 0 users, load average: 0.01, 0.02, 0.05
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.3%sy, 0.0%ni, 99.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 373572k total, 355780k used, 17792k free, 27880k buffers
Swap: 786428k total, 0k used, 786428k free, 221776k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 17208 1144 932 R 0 0.3 0:00.03 top
^C$
$ echo $?
0
$ docker ps -a | grep topdemo
7998ac8581f9 ubuntu:14.04 "/usr/bin/top -b" 38 seconds ago Exited (0) 21 seconds ago topdemo
```
### Get the exit code of the container's command
And in this second example, you can see the exit code returned by the `bash`
process is returned by the `docker attach` command to its caller too:
```bash
$ docker run --name test -d -it debian
275c44472aebd77c926d4527885bb09f2f6db21d878c75f0a1c212c03d3bcfab
$ docker attach test
root@f38c87f2a42d:/# exit 13
exit
$ echo $?
13
$ docker ps -a | grep test
275c44472aeb debian:7 "/bin/bash" 26 seconds ago Exited (13) 17 seconds ago test
```

View File

@ -0,0 +1,581 @@
---
title: "build"
description: "The build command description and usage"
keywords: "build, docker, image"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# build
```markdown
Usage: docker build [OPTIONS] PATH | URL | -
Build an image from a Dockerfile
Options:
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
--build-arg value Set build-time variables (default [])
--cache-from value Images to consider as cache sources (default [])
--cgroup-parent string Optional parent cgroup for the container
--compress Compress the build context using gzip
--cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
--cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
-c, --cpu-shares int CPU shares (relative weight)
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
--disable-content-trust Skip image verification (default true)
-f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
--force-rm Always remove intermediate containers
--help Print usage
--iidfile string Write the image ID to the file
--isolation string Container isolation technology
--label value Set metadata for an image (default [])
-m, --memory string Memory limit
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--network string Set the networking mode for the RUN instructions during build
'bridge': use default Docker bridge
'none': no networking
'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network
--no-cache Do not use cache when building the image
--pull Always attempt to pull a newer version of the image
-q, --quiet Suppress the build output and print image ID on success
--rm Remove intermediate containers after a successful build (default true)
--security-opt value Security Options (default [])
--shm-size bytes Size of /dev/shm
The format is `<number><unit>`. `number` must be greater than `0`.
Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes),
or `g` (gigabytes). If you omit the unit, the system uses bytes.
--squash Squash newly built layers into a single new layer (**Experimental Only**)
-t, --tag value Name and optionally a tag in the 'name:tag' format (default [])
--target string Set the target build stage to build.
--ulimit value Ulimit options (default [])
```
## Description
Builds Docker images from a Dockerfile and a "context". A build's context is
the files located in the specified `PATH` or `URL`. The build process can refer
to any of the files in the context. For example, your build can use an
[*ADD*](../builder.md#add) instruction to reference a file in the
context.
The `URL` parameter can refer to three kinds of resources: Git repositories,
pre-packaged tarball contexts and plain text files.
### Git repositories
When the `URL` parameter points to the location of a Git repository, the
repository acts as the build context. The system recursively fetches the
repository and its submodules. The commit history is not preserved. A
repository is first pulled into a temporary directory on your local host. After
the that succeeds, the directory is sent to the Docker daemon as the context.
Local copy gives you the ability to access private repositories using local
user credentials, VPN's, and so forth.
> **Note:**
> If the `URL` parameter contains a fragment the system will recursively clone
> the repository and its submodules using a `git clone --recursive` command.
Git URLs accept context configuration in their fragment section, separated by a
colon `:`. The first part represents the reference that Git will check out,
this can be either a branch, a tag, or a remote reference. The second part
represents a subdirectory inside the repository that will be used as a build
context.
For example, run this command to use a directory called `docker` in the branch
`container`:
```bash
$ docker build https://github.com/docker/rootfs.git#container:docker
```
The following table represents all the valid suffixes with their build
contexts:
Build Syntax Suffix | Commit Used | Build Context Used
--------------------------------|-----------------------|-------------------
`myrepo.git` | `refs/heads/master` | `/`
`myrepo.git#mytag` | `refs/tags/mytag` | `/`
`myrepo.git#mybranch` | `refs/heads/mybranch` | `/`
`myrepo.git#pull/42/head` | `refs/pull/42/head` | `/`
`myrepo.git#:myfolder` | `refs/heads/master` | `/myfolder`
`myrepo.git#master:myfolder` | `refs/heads/master` | `/myfolder`
`myrepo.git#mytag:myfolder` | `refs/tags/mytag` | `/myfolder`
`myrepo.git#mybranch:myfolder` | `refs/heads/mybranch` | `/myfolder`
### Tarball contexts
If you pass an URL to a remote tarball, the URL itself is sent to the daemon:
```bash
$ docker build http://server/context.tar.gz
```
The download operation will be performed on the host the Docker daemon is
running on, which is not necessarily the same host from which the build command
is being issued. The Docker daemon will fetch `context.tar.gz` and use it as the
build context. Tarball contexts must be tar archives conforming to the standard
`tar` UNIX format and can be compressed with any one of the 'xz', 'bzip2',
'gzip' or 'identity' (no compression) formats.
### Text files
Instead of specifying a context, you can pass a single `Dockerfile` in the
`URL` or pipe the file in via `STDIN`. To pipe a `Dockerfile` from `STDIN`:
```bash
$ docker build - < Dockerfile
```
With Powershell on Windows, you can run:
```powershell
Get-Content Dockerfile | docker build -
```
If you use `STDIN` or specify a `URL` pointing to a plain text file, the system
places the contents into a file called `Dockerfile`, and any `-f`, `--file`
option is ignored. In this scenario, there is no context.
By default the `docker build` command will look for a `Dockerfile` at the root
of the build context. The `-f`, `--file`, option lets you specify the path to
an alternative file to use instead. This is useful in cases where the same set
of files are used for multiple builds. The path must be to a file within the
build context. If a relative path is specified then it is interpreted as
relative to the root of the context.
In most cases, it's best to put each Dockerfile in an empty directory. Then,
add to that directory only the files needed for building the Dockerfile. To
increase the build's performance, you can exclude files and directories by
adding a `.dockerignore` file to that directory as well. For information on
creating one, see the [.dockerignore file](../builder.md#dockerignore-file).
If the Docker client loses connection to the daemon, the build is canceled.
This happens if you interrupt the Docker client with `CTRL-c` or if the Docker
client is killed for any reason. If the build initiated a pull which is still
running at the time the build is cancelled, the pull is cancelled as well.
## Return code
On a successful build, a return code of success `0` will be returned. When the
build fails, a non-zero failure code will be returned.
There should be informational output of the reason for failure output to
`STDERR`:
```bash
$ docker build -t fail .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon
Step 1/3 : FROM busybox
---> 4986bf8c1536
Step 2/3 : RUN exit 13
---> Running in e26670ec7a0a
INFO[0000] The command [/bin/sh -c exit 13] returned a non-zero code: 13
$ echo $?
1
```
See also:
[*Dockerfile Reference*](../builder.md).
## Examples
### Build with PATH
```bash
$ docker build .
Uploading context 10240 bytes
Step 1/3 : FROM busybox
Pulling repository busybox
---> e9aa60c60128MB/2.284 MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/
Step 2/3 : RUN ls -lh /
---> Running in 9c9e81692ae9
total 24
drwxr-xr-x 2 root root 4.0K Mar 12 2013 bin
drwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev
drwxr-xr-x 2 root root 4.0K Oct 19 00:19 etc
drwxr-xr-x 2 root root 4.0K Nov 15 23:34 lib
lrwxrwxrwx 1 root root 3 Mar 12 2013 lib64 -> lib
dr-xr-xr-x 116 root root 0 Nov 15 23:34 proc
lrwxrwxrwx 1 root root 3 Mar 12 2013 sbin -> bin
dr-xr-xr-x 13 root root 0 Nov 15 23:34 sys
drwxr-xr-x 2 root root 4.0K Mar 12 2013 tmp
drwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr
---> b35f4035db3f
Step 3/3 : CMD echo Hello world
---> Running in 02071fceb21b
---> f52f38b7823e
Successfully built f52f38b7823e
Removing intermediate container 9c9e81692ae9
Removing intermediate container 02071fceb21b
```
This example specifies that the `PATH` is `.`, and so all the files in the
local directory get `tar`d and sent to the Docker daemon. The `PATH` specifies
where to find the files for the "context" of the build on the Docker daemon.
Remember that the daemon could be running on a remote machine and that no
parsing of the Dockerfile happens at the client side (where you're running
`docker build`). That means that *all* the files at `PATH` get sent, not just
the ones listed to [*ADD*](../builder.md#add) in the Dockerfile.
The transfer of context from the local machine to the Docker daemon is what the
`docker` client means when you see the "Sending build context" message.
If you wish to keep the intermediate containers after the build is complete,
you must use `--rm=false`. This does not affect the build cache.
### Build with URL
```bash
$ docker build github.com/creack/docker-firefox
```
This will clone the GitHub repository and use the cloned repository as context.
The Dockerfile at the root of the repository is used as Dockerfile. You can
specify an arbitrary Git repository by using the `git://` or `git@` scheme.
```bash
$ docker build -f ctx/Dockerfile http://server/ctx.tar.gz
Downloading context: http://server/ctx.tar.gz [===================>] 240 B/240 B
Step 1/3 : FROM busybox
---> 8c2e06607696
Step 2/3 : ADD ctx/container.cfg /
---> e7829950cee3
Removing intermediate container b35224abf821
Step 3/3 : CMD /bin/ls
---> Running in fbc63d321d73
---> 3286931702ad
Removing intermediate container fbc63d321d73
Successfully built 377c409b35e4
```
This sends the URL `http://server/ctx.tar.gz` to the Docker daemon, which
downloads and extracts the referenced tarball. The `-f ctx/Dockerfile`
parameter specifies a path inside `ctx.tar.gz` to the `Dockerfile` that is used
to build the image. Any `ADD` commands in that `Dockerfile` that refers to local
paths must be relative to the root of the contents inside `ctx.tar.gz`. In the
example above, the tarball contains a directory `ctx/`, so the `ADD
ctx/container.cfg /` operation works as expected.
### Build with -
```bash
$ docker build - < Dockerfile
```
This will read a Dockerfile from `STDIN` without context. Due to the lack of a
context, no contents of any local directory will be sent to the Docker daemon.
Since there is no context, a Dockerfile `ADD` only works if it refers to a
remote URL.
```bash
$ docker build - < context.tar.gz
```
This will build an image for a compressed context read from `STDIN`. Supported
formats are: bzip2, gzip and xz.
### Use a .dockerignore file
```bash
$ docker build .
Uploading context 18.829 MB
Uploading context
Step 1/2 : FROM busybox
---> 769b9341d937
Step 2/2 : CMD echo Hello world
---> Using cache
---> 99cc1ad10469
Successfully built 99cc1ad10469
$ echo ".git" > .dockerignore
$ docker build .
Uploading context 6.76 MB
Uploading context
Step 1/2 : FROM busybox
---> 769b9341d937
Step 2/2 : CMD echo Hello world
---> Using cache
---> 99cc1ad10469
Successfully built 99cc1ad10469
```
This example shows the use of the `.dockerignore` file to exclude the `.git`
directory from the context. Its effect can be seen in the changed size of the
uploaded context. The builder reference contains detailed information on
[creating a .dockerignore file](../builder.md#dockerignore-file)
### Tag an image (-t)
```bash
$ docker build -t vieux/apache:2.0 .
```
This will build like the previous example, but it will then tag the resulting
image. The repository name will be `vieux/apache` and the tag will be `2.0`.
[Read more about valid tags](tag.md).
You can apply multiple tags to an image. For example, you can apply the `latest`
tag to a newly built image and add another tag that references a specific
version.
For example, to tag an image both as `whenry/fedora-jboss:latest` and
`whenry/fedora-jboss:v2.1`, use the following:
```bash
$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
```
### Specify a Dockerfile (-f)
```bash
$ docker build -f Dockerfile.debug .
```
This will use a file called `Dockerfile.debug` for the build instructions
instead of `Dockerfile`.
```bash
$ curl example.com/remote/Dockerfile | docker build -f - .
```
The above command will use the current directory as the build context and read
a Dockerfile from stdin.
```bash
$ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug .
$ docker build -f dockerfiles/Dockerfile.prod -t myapp_prod .
```
The above commands will build the current build context (as specified by the
`.`) twice, once using a debug version of a `Dockerfile` and once using a
production version.
```bash
$ cd /home/me/myapp/some/dir/really/deep
$ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp
$ docker build -f ../../../../dockerfiles/debug /home/me/myapp
```
These two `docker build` commands do the exact same thing. They both use the
contents of the `debug` file instead of looking for a `Dockerfile` and will use
`/home/me/myapp` as the root of the build context. Note that `debug` is in the
directory structure of the build context, regardless of how you refer to it on
the command line.
> **Note:**
> `docker build` will return a `no such file or directory` error if the
> file or directory does not exist in the uploaded context. This may
> happen if there is no context, or if you specify a file that is
> elsewhere on the Host system. The context is limited to the current
> directory (and its children) for security reasons, and to ensure
> repeatable builds on remote Docker hosts. This is also the reason why
> `ADD ../file` will not work.
### Use a custom parent cgroup (--cgroup-parent)
When `docker build` is run with the `--cgroup-parent` option the containers
used in the build will be run with the [corresponding `docker run`
flag](../run.md#specifying-custom-cgroups).
### Set ulimits in container (--ulimit)
Using the `--ulimit` option with `docker build` will cause each build step's
container to be started using those [`--ulimit`
flag values](./run.md#set-ulimits-in-container-ulimit).
### Set build-time variables (--build-arg)
You can use `ENV` instructions in a Dockerfile to define variable
values. These values persist in the built image. However, often
persistence is not what you want. Users want to specify variables differently
depending on which host they build an image on.
A good example is `http_proxy` or source versions for pulling intermediate
files. The `ARG` instruction lets Dockerfile authors define values that users
can set at build-time using the `--build-arg` flag:
```bash
$ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 .
```
This flag allows you to pass the build-time variables that are
accessed like regular environment variables in the `RUN` instruction of the
Dockerfile. Also, these values don't persist in the intermediate or final images
like `ENV` values do.
Using this flag will not alter the output you see when the `ARG` lines from the
Dockerfile are echoed during the build process.
For detailed information on using `ARG` and `ENV` instructions, see the
[Dockerfile reference](../builder.md).
### Optional security options (--security-opt)
This flag is only supported on a daemon running on Windows, and only supports
the `credentialspec` option. The `credentialspec` must be in the format
`file://spec.txt` or `registry://keyname`.
### Specify isolation technology for container (--isolation)
This option is useful in situations where you are running Docker containers on
Windows. The `--isolation=<value>` option sets a container's isolation
technology. On Linux, the only supported is the `default` option which uses
Linux namespaces. On Microsoft Windows, you can specify these values:
| Value | Description |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `default` | Use the value specified by the Docker daemon's `--exec-opt` . If the `daemon` does not specify an isolation technology, Microsoft Windows uses `process` as its default value. |
| `process` | Namespace isolation only. |
| `hyperv` | Hyper-V hypervisor partition-based isolation. |
Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`.
### Add entries to container hosts file (--add-host)
You can add other hosts into a container's `/etc/hosts` file by using one or
more `--add-host` flags. This example adds a static address for a host named
`docker`:
$ docker build --add-host=docker:10.180.0.1 .
### Specifying target build stage (--target)
When building a Dockerfile with multiple build stages, `--target` can be used to
specify an intermediate build stage by name as a final stage for the resulting
image. Commands after the target stage will be skipped.
```Dockerfile
FROM debian AS build-env
...
FROM alpine AS production-env
...
```
```bash
$ docker build -t mybuildimage --target build-env .
```
### Squash an image's layers (--squash) **Experimental Only**
#### Overview
Once the image is built, squash the new layers into a new image with a single
new layer. Squashing does not destroy any existing image, rather it creates a new
image with the content of the squashed layers. This effectively makes it look
like all `Dockerfile` commands were created with a single layer. The build
cache is preserved with this method.
**Note**: using this option means the new image will not be able to take
advantage of layer sharing with other images and may use significantly more
space.
**Note**: using this option you may see significantly more space used due to
storing two copies of the image, one for the build cache with all the cache
layers in tact, and one for the squashed version.
#### Prerequisites
The example on this page is using experimental mode in Docker 1.13.
Experimental mode can be enabled by using the `--experimental` flag when starting the Docker daemon or setting `experimental: true` in the `daemon.json` configuration file.
By default, experimental mode is disabled. To see the current configuration, use the `docker version` command.
```none
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 06:35:24 2017
OS/Arch: linux/amd64
Experimental: false
[...]
```
To enable experimental mode, users need to restart the docker daemon with the experimental flag enabled.
#### Enable Docker experimental
Experimental features are now included in the standard Docker binaries as of version 1.13.0. For enabling experimental features, you need to start the Docker daemon with `--experimental` flag. You can also enable the daemon flag via /etc/docker/daemon.json. e.g.
```
{
"experimental": true
}
```
Then make sure the experimental flag is enabled:
```bash
$ docker version -f '{{.Server.Experimental}}'
true
```
#### Build an image with `--squash` argument
The following is an example of docker build with `--squash` argument
```Dockerfile
FROM busybox
RUN echo hello > /hello
RUN echo world >> /hello
RUN touch remove_me /remove_me
ENV HELLO world
RUN rm /remove_me
```
An image named `test` is built with `--squash` argument.
```bash
$ docker build --squash -t test .
[...]
```
If everything is right, the history will look like this:
```bash
$ docker history test
IMAGE CREATED CREATED BY SIZE COMMENT
4e10cb5b4cac 3 seconds ago 12 B merge sha256:88a7b0112a41826885df0e7072698006ee8f621c6ab99fca7fe9151d7b599702 to sha256:47bcc53f74dc94b1920f0b34f6036096526296767650f223433fe65c35f149eb
<missing> 5 minutes ago /bin/sh -c rm /remove_me 0 B
<missing> 5 minutes ago /bin/sh -c #(nop) ENV HELLO=world 0 B
<missing> 5 minutes ago /bin/sh -c touch remove_me /remove_me 0 B
<missing> 5 minutes ago /bin/sh -c echo world >> /hello 0 B
<missing> 6 minutes ago /bin/sh -c echo hello > /hello 0 B
<missing> 7 weeks ago /bin/sh -c #(nop) CMD ["sh"] 0 B
<missing> 7 weeks ago /bin/sh -c #(nop) ADD file:47ca6e777c36a4cfff 1.113 MB
```
We could find that all layer's name is `<missing>`, and there is a new layer with COMMENT `merge`.
Test the image, check for `/remove_me` being gone, make sure `hello\nworld` is in `/hello`, make sure the `HELLO` envvar's value is `world`.

View File

@ -0,0 +1,317 @@
---
title: "Use the Docker command line"
description: "Docker's CLI command description and usage"
keywords: "Docker, Docker documentation, CLI, command line"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# docker
To list available commands, either run `docker` with no parameters
or execute `docker help`:
```bash
$ docker
Usage: docker [OPTIONS] COMMAND [ARG...]
docker [ --help | -v | --version ]
A self-sufficient runtime for containers.
Options:
--config string Location of client config files (default "/root/.docker")
-D, --debug Enable debug mode
--help Print usage
-H, --host value Daemon socket(s) to connect to (default [])
-l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
--tls Use TLS; implied by --tlsverify
--tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")
--tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")
--tlskey string Path to TLS key file (default "/root/.docker/key.pem")
--tlsverify Use TLS and verify the remote
-v, --version Print version information and quit
Commands:
attach Attach to a running container
# […]
```
## Description
Depending on your Docker system configuration, you may be required to preface
each `docker` command with `sudo`. To avoid having to use `sudo` with the
`docker` command, your system administrator can create a Unix group called
`docker` and add users to it.
For more information about installing Docker or `sudo` configuration, refer to
the [installation](https://docs.docker.com/engine/installation/) instructions for your operating system.
### Environment variables
For easy reference, the following list of environment variables are supported
by the `docker` command line:
* `DOCKER_API_VERSION` The API version to use (e.g. `1.19`)
* `DOCKER_CONFIG` The location of your client configuration files.
* `DOCKER_CERT_PATH` The location of your authentication keys.
* `DOCKER_DRIVER` The graph driver to use.
* `DOCKER_HOST` Daemon socket to connect to.
* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is
unsuitable for Docker.
* `DOCKER_RAMDISK` If set this will disable 'pivot_root'.
* `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote.
* `DOCKER_CONTENT_TRUST` When set Docker uses notary to sign and verify images.
Equates to `--disable-content-trust=false` for build, create, pull, push, run.
* `DOCKER_CONTENT_TRUST_SERVER` The URL of the Notary server to use. This defaults
to the same URL as the registry.
* `DOCKER_HIDE_LEGACY_COMMANDS` When set, Docker hides "legacy" top-level commands (such as `docker rm`, and
`docker pull`) in `docker help` output, and only `Management commands` per object-type (e.g., `docker container`) are
printed. This may become the default in a future release, at which point this environment-variable is removed.
* `DOCKER_TMPDIR` Location for temporary Docker files.
Because Docker is developed using Go, you can also use any environment
variables used by the Go runtime. In particular, you may find these useful:
* `HTTP_PROXY`
* `HTTPS_PROXY`
* `NO_PROXY`
These Go environment variables are case-insensitive. See the
[Go specification](http://golang.org/pkg/net/http/) for details on these
variables.
### Configuration files
By default, the Docker command line stores its configuration files in a
directory called `.docker` within your `$HOME` directory. However, you can
specify a different location via the `DOCKER_CONFIG` environment variable
or the `--config` command line option. If both are specified, then the
`--config` option overrides the `DOCKER_CONFIG` environment variable.
For example:
docker --config ~/testconfigs/ ps
Instructs Docker to use the configuration files in your `~/testconfigs/`
directory when running the `ps` command.
Docker manages most of the files in the configuration directory
and you should not modify them. However, you *can modify* the
`config.json` file to control certain aspects of how the `docker`
command behaves.
Currently, you can modify the `docker` command behavior using environment
variables or command-line options. You can also use options within
`config.json` to modify some of the same behavior. When using these
mechanisms, you must keep in mind the order of precedence among them. Command
line options override environment variables and environment variables override
properties you specify in a `config.json` file.
The `config.json` file stores a JSON encoding of several properties:
The property `HttpHeaders` specifies a set of headers to include in all messages
sent from the Docker client to the daemon. Docker does not try to interpret or
understand these header; it simply puts them into the messages. Docker does
not allow these headers to change any headers it sets for itself.
The property `psFormat` specifies the default format for `docker ps` output.
When the `--format` flag is not provided with the `docker ps` command,
Docker's client uses this property. If this property is not set, the client
falls back to the default table format. For a list of supported formatting
directives, see the
[**Formatting** section in the `docker ps` documentation](ps.md)
The property `imagesFormat` specifies the default format for `docker images` output.
When the `--format` flag is not provided with the `docker images` command,
Docker's client uses this property. If this property is not set, the client
falls back to the default table format. For a list of supported formatting
directives, see the [**Formatting** section in the `docker images` documentation](images.md)
The property `pluginsFormat` specifies the default format for `docker plugin ls` output.
When the `--format` flag is not provided with the `docker plugin ls` command,
Docker's client uses this property. If this property is not set, the client
falls back to the default table format. For a list of supported formatting
directives, see the [**Formatting** section in the `docker plugin ls` documentation](plugin_ls.md)
The property `servicesFormat` specifies the default format for `docker
service ls` output. When the `--format` flag is not provided with the
`docker service ls` command, Docker's client uses this property. If this
property is not set, the client falls back to the default json format. For a
list of supported formatting directives, see the
[**Formatting** section in the `docker service ls` documentation](service_ls.md)
The property `serviceInspectFormat` specifies the default format for `docker
service inspect` output. When the `--format` flag is not provided with the
`docker service inspect` command, Docker's client uses this property. If this
property is not set, the client falls back to the default json format. For a
list of supported formatting directives, see the
[**Formatting** section in the `docker service inspect` documentation](service_inspect.md)
The property `statsFormat` specifies the default format for `docker
stats` output. When the `--format` flag is not provided with the
`docker stats` command, Docker's client uses this property. If this
property is not set, the client falls back to the default table
format. For a list of supported formatting directives, see
[**Formatting** section in the `docker stats` documentation](stats.md)
The property `secretFormat` specifies the default format for `docker
secret ls` output. When the `--format` flag is not provided with the
`docker secret ls` command, Docker's client uses this property. If this
property is not set, the client falls back to the default table
format. For a list of supported formatting directives, see
[**Formatting** section in the `docker secret ls` documentation](secret_ls.md)
The property `nodesFormat` specifies the default format for `docker node ls` output.
When the `--format` flag is not provided with the `docker node ls` command,
Docker's client uses the value of `nodesFormat`. If the value of `nodesFormat` is not set,
the client uses the default table format. For a list of supported formatting
directives, see the [**Formatting** section in the `docker node ls` documentation](node_ls.md)
The property `configFormat` specifies the default format for `docker
config ls` output. When the `--format` flag is not provided with the
`docker config ls` command, Docker's client uses this property. If this
property is not set, the client falls back to the default table
format. For a list of supported formatting directives, see
[**Formatting** section in the `docker config ls` documentation](config_ls.md)
The property `credsStore` specifies an external binary to serve as the default
credential store. When this property is set, `docker login` will attempt to
store credentials in the binary specified by `docker-credential-<value>` which
is visible on `$PATH`. If this property is not set, credentials will be stored
in the `auths` property of the config. For more information, see the
[**Credentials store** section in the `docker login` documentation](login.md#credentials-store)
The property `credHelpers` specifies a set of credential helpers to use
preferentially over `credsStore` or `auths` when storing and retrieving
credentials for specific registries. If this property is set, the binary
`docker-credential-<value>` will be used when storing or retrieving credentials
for a specific registry. For more information, see the
[**Credential helpers** section in the `docker login` documentation](login.md#credential-helpers)
Once attached to a container, users detach from it and leave it running using
the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable
using the `detachKeys` property. Specify a `<sequence>` value for the
property. The format of the `<sequence>` is a comma-separated list of either
a letter [a-Z], or the `ctrl-` combined with any of the following:
* `a-z` (a single lowercase alpha character )
* `@` (at sign)
* `[` (left bracket)
* `\\` (two backward slashes)
* `_` (underscore)
* `^` (caret)
Your customization applies to all containers started in with your Docker client.
Users can override your custom or the default key sequence on a per-container
basis. To do this, the user specifies the `--detach-keys` flag with the `docker
attach`, `docker exec`, `docker run` or `docker start` command.
Following is a sample `config.json` file:
```json
{
"HttpHeaders": {
"MyHeader": "MyValue"
},
"psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
"imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
"pluginsFormat": "table {{.ID}}\t{{.Name}}\t{{.Enabled}}",
"statsFormat": "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}",
"servicesFormat": "table {{.ID}}\t{{.Name}}\t{{.Mode}}",
"secretFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"configFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"serviceInspectFormat": "pretty",
"nodesFormat": "table {{.ID}}\t{{.Hostname}}\t{{.Availability}}",
"detachKeys": "ctrl-e,e",
"credsStore": "secretservice",
"credHelpers": {
"awesomereg.example.org": "hip-star",
"unicorn.example.com": "vcbait"
}
}
```
### Notary
If using your own notary server and a self-signed certificate or an internal
Certificate Authority, you need to place the certificate at
`tls/<registry_url>/ca.crt` in your docker config directory.
Alternatively you can trust the certificate globally by adding it to your system's
list of root Certificate Authorities.
## Examples
### Display help text
To list the help on any command just execute the command, followed by the
`--help` option.
$ docker run --help
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
Options:
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
...
### Option types
Single character command line options can be combined, so rather than
typing `docker run -i -t --name test busybox sh`,
you can write `docker run -it --name test busybox sh`.
#### Boolean
Boolean options take the form `-d=false`. The value you see in the help text is
the default value which is set if you do **not** specify that flag. If you
specify a Boolean flag without a value, this will set the flag to `true`,
irrespective of the default value.
For example, running `docker run -d` will set the value to `true`, so your
container **will** run in "detached" mode, in the background.
Options which default to `true` (e.g., `docker build --rm=true`) can only be
set to the non-default value by explicitly setting them to `false`:
```bash
$ docker build --rm=false .
```
#### Multi
You can specify options like `-a=[]` multiple times in a single command line,
for example in these commands:
```bash
$ docker run -a stdin -a stdout -i -t ubuntu /bin/bash
$ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls
```
Sometimes, multiple options can call for a more complex value string as for
`-v`:
```bash
$ docker run -v /host:/container example/mysql
```
> **Note**: Do not use the `-t` and `-a stderr` options together due to
> limitations in the `pty` implementation. All `stderr` in `pty` mode
> simply goes to `stdout`.
#### Strings and Integers
Options like `--name=""` expect a string, and they
can only be specified once. Options like `-c=0`
expect an integer, and they can only be specified once.

View File

@ -0,0 +1,117 @@
---
title: "commit"
description: "The commit command description and usage"
keywords: "commit, file, changes"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# commit
```markdown
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
Create a new image from a container's changes
Options:
-a, --author string Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
-c, --change value Apply Dockerfile instruction to the created image (default [])
--help Print usage
-m, --message string Commit message
-p, --pause Pause container during commit (default true)
```
## Description
It can be useful to commit a container's file changes or settings into a new
image. This allows you to debug a container by running an interactive shell, or to
export a working dataset to another server. Generally, it is better to use
Dockerfiles to manage your images in a documented and maintainable way.
[Read more about valid image names and tags](tag.md).
The commit operation will not include any data contained in
volumes mounted inside the container.
By default, the container being committed and its processes will be paused
while the image is committed. This reduces the likelihood of encountering data
corruption during the process of creating the commit. If this behavior is
undesired, set the `--pause` option to false.
The `--change` option will apply `Dockerfile` instructions to the image that is
created. Supported `Dockerfile` instructions:
`CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`LABEL`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
## Examples
### Commit a container
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
$ docker commit c3f279d17e0a svendowideit/testimage:version3
f5283438590d
$ docker images
REPOSITORY TAG ID CREATED SIZE
svendowideit/testimage version3 f5283438590d 16 seconds ago 335.7 MB
```
### Commit a container with new configurations
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
$ docker inspect -f "{{ .Config.Env }}" c3f279d17e0a
[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
$ docker commit --change "ENV DEBUG true" c3f279d17e0a svendowideit/testimage:version3
f5283438590d
$ docker inspect -f "{{ .Config.Env }}" f5283438590d
[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBUG=true]
```
### Commit a container with new `CMD` and `EXPOSE` instructions
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
$ docker commit --change='CMD ["apachectl", "-DFOREGROUND"]' -c "EXPOSE 80" c3f279d17e0a svendowideit/testimage:version4
f5283438590d
$ docker run -d svendowideit/testimage:version4
89373736e2e7f00bc149bd783073ac43d0507da250e999f3f1036e0db60817c0
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
89373736e2e7 testimage:version4 "apachectl -DFOREGROU" 3 seconds ago Up 2 seconds 80/tcp distracted_fermat
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours desperate_dubinsky
197387f1b436 ubuntu:12.04 /bin/bash 7 days ago Up 25 hours focused_hamilton
```

View File

@ -0,0 +1,61 @@
---
title: "container"
description: "The container command description and usage"
keywords: "container"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# container
```markdown
Usage: docker container COMMAND
Manage containers
Options:
--help Print usage
Commands:
attach Attach to a running container
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes to files or directories on a container's filesystem
exec Run a command in a running container
export Export a container's filesystem as a tar archive
inspect Display detailed information on one or more containers
kill Kill one or more running containers
logs Fetch the logs of a container
ls List containers
pause Pause all processes within one or more containers
port List port mappings or a specific mapping for the container
prune Remove all stopped containers
rename Rename a container
restart Restart one or more containers
rm Remove one or more containers
run Run a command in a new container
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop one or more running containers
top Display the running processes of a container
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
wait Block until one or more containers stop, then print their exit codes
Run 'docker container COMMAND --help' for more information on a command.
```
## Description
Manage containers.

View File

@ -0,0 +1,126 @@
---
title: "container prune"
description: "Remove all stopped containers"
keywords: container, prune, delete, remove
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# container prune
```markdown
Usage: docker container prune [OPTIONS]
Remove all stopped containers
Options:
Options:
--filter filter Provide filter values (e.g. 'until=<timestamp>')
-f, --force Do not prompt for confirmation
--help Print usage
```
## Description
Removes all stopped containers.
## Examples
### Prune containers
```bash
$ docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
4a7f7eebae0f63178aff7eb0aa39cd3f0627a203ab2df258c1a00b456cf20063
f98f9c2aa1eaf727e4ec9c0283bc7d4aa4762fbdba7f26191f26c97f64090360
Total reclaimed space: 212 B
```
### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
The currently supported filters are:
* until (`<timestamp>`) - only remove containers created before given timestamp
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove containers with (or without, in case `label!=...` is used) the specified labels.
The `until` filter can be Unix timestamps, date formatted
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
relative to the daemon machines time. Supported formats for date
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
timezone on the daemon will be used if you do not provide either a `Z` or a
`+-00:00` timezone offset at the end of the timestamp. When providing Unix
timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
fraction of a second no more than nine digits long.
The `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`),
which removes containers with the specified labels. The other
format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes
containers without the specified labels.
The following removes containers created more than 5 minutes ago:
```bash
$ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
CONTAINER ID IMAGE COMMAND CREATED AT STATUS
61b9efa71024 busybox "sh" 2017-01-04 13:23:33 -0800 PST Exited (0) 41 seconds ago
53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 12 minutes ago
$ docker container prune --force --filter "until=5m"
Deleted Containers:
53a9bc23a5168b6caa2bfbefddf1b30f93c7ad57f3dec271fd32707497cb9369
Total reclaimed space: 25 B
$ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
CONTAINER ID IMAGE COMMAND CREATED AT STATUS
61b9efa71024 busybox "sh" 2017-01-04 13:23:33 -0800 PST Exited (0) 44 seconds ago
```
The following removes containers created before `2017-01-04T13:10:00`:
```bash
$ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
CONTAINER ID IMAGE COMMAND CREATED AT STATUS
53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 7 minutes ago
4a75091a6d61 busybox "sh" 2017-01-04 13:09:53 -0800 PST Exited (0) 9 minutes ago
$ docker container prune --force --filter "until=2017-01-04T13:10:00"
Deleted Containers:
4a75091a6d618526fcd8b33ccd6e5928ca2a64415466f768a6180004b0c72c6c
Total reclaimed space: 27 B
$ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}'
CONTAINER ID IMAGE COMMAND CREATED AT STATUS
53a9bc23a516 busybox "sh" 2017-01-04 13:11:59 -0800 PST Exited (0) 9 minutes ago
```
## Related commands
* [system df](system_df.md)
* [volume prune](volume_prune.md)
* [image prune](image_prune.md)
* [network prune](network_prune.md)
* [system prune](system_prune.md)

View File

@ -0,0 +1,115 @@
---
title: "cp"
description: "The cp command description and usage"
keywords: "copy, container, files, folders"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# cp
```markdown
Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
Copy files/folders between a container and the local filesystem
Use '-' as the source to read a tar archive from stdin
and extract it to a directory destination in a container.
Use '-' as the destination to stream a tar archive of a
container source to stdout.
Options:
-L, --follow-link Always follow symbol link in SRC_PATH
--help Print usage
```
## Description
The `docker cp` utility copies the contents of `SRC_PATH` to the `DEST_PATH`.
You can copy from the container's file system to the local machine or the
reverse, from the local filesystem to the container. If `-` is specified for
either the `SRC_PATH` or `DEST_PATH`, you can also stream a tar archive from
`STDIN` or to `STDOUT`. The `CONTAINER` can be a running or stopped container.
The `SRC_PATH` or `DEST_PATH` can be a file or directory.
The `docker cp` command assumes container paths are relative to the container's
`/` (root) directory. This means supplying the initial forward slash is optional;
The command sees `compassionate_darwin:/tmp/foo/myfile.txt` and
`compassionate_darwin:tmp/foo/myfile.txt` as identical. Local machine paths can
be an absolute or relative value. The command interprets a local machine's
relative paths as relative to the current working directory where `docker cp` is
run.
The `cp` command behaves like the Unix `cp -a` command in that directories are
copied recursively with permissions preserved if possible. Ownership is set to
the user and primary group at the destination. For example, files copied to a
container are created with `UID:GID` of the root user. Files copied to the local
machine are created with the `UID:GID` of the user which invoked the `docker cp`
command. If you specify the `-L` option, `docker cp` follows any symbolic link
in the `SRC_PATH`. `docker cp` does *not* create parent directories for
`DEST_PATH` if they do not exist.
Assuming a path separator of `/`, a first argument of `SRC_PATH` and second
argument of `DEST_PATH`, the behavior is as follows:
- `SRC_PATH` specifies a file
- `DEST_PATH` does not exist
- the file is saved to a file created at `DEST_PATH`
- `DEST_PATH` does not exist and ends with `/`
- Error condition: the destination directory must exist.
- `DEST_PATH` exists and is a file
- the destination is overwritten with the source file's contents
- `DEST_PATH` exists and is a directory
- the file is copied into this directory using the basename from
`SRC_PATH`
- `SRC_PATH` specifies a directory
- `DEST_PATH` does not exist
- `DEST_PATH` is created as a directory and the *contents* of the source
directory are copied into this directory
- `DEST_PATH` exists and is a file
- Error condition: cannot copy a directory to a file
- `DEST_PATH` exists and is a directory
- `SRC_PATH` does not end with `/.` (that is: _slash_ followed by _dot_)
- the source directory is copied into this directory
- `SRC_PATH` does end with `/.` (that is: _slash_ followed by _dot_)
- the *content* of the source directory is copied into this
directory
The command requires `SRC_PATH` and `DEST_PATH` to exist according to the above
rules. If `SRC_PATH` is local and is a symbolic link, the symbolic link, not
the target, is copied by default. To copy the link target and not the link, specify
the `-L` option.
A colon (`:`) is used as a delimiter between `CONTAINER` and its path. You can
also use `:` when specifying paths to a `SRC_PATH` or `DEST_PATH` on a local
machine, for example `file:name.txt`. If you use a `:` in a local machine path,
you must be explicit with a relative or absolute path, for example:
`/path/to/file:name.txt` or `./file:name.txt`
It is not possible to copy certain system files such as resources under
`/proc`, `/sys`, `/dev`, [tmpfs](run.md#mount-tmpfs-tmpfs), and mounts created by
the user in the container. However, you can still copy such files by manually
running `tar` in `docker exec`. Both of the following examples do the same thing
in different ways (consider `SRC_PATH` and `DEST_PATH` are directories):
```bash
$ docker exec foo tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH -
```
```bash
$ tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i foo tar Cxf DEST_PATH -
```
Using `-` as the `SRC_PATH` streams the contents of `STDIN` as a tar archive.
The command extracts the content of the tar to the `DEST_PATH` in container's
filesystem. In this case, `DEST_PATH` must specify a directory. Using `-` as
the `DEST_PATH` streams the contents of the resource as a tar archive to `STDOUT`.

View File

@ -0,0 +1,260 @@
---
title: "create"
description: "The create command description and usage"
keywords: "docker, create, container"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# create
Creates a new container.
```markdown
Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
Create a new container
Options:
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
--blkio-weight value Block IO (relative weight), between 10 and 1000
--blkio-weight-device value Block IO weight (relative device weight) (default [])
--cap-add value Add Linux capabilities (default [])
--cap-drop value Drop Linux capabilities (default [])
--cgroup-parent string Optional parent cgroup for the container
--cidfile string Write the container ID to the file
--cpu-count int The number of CPUs available for execution by the container.
Windows daemon only. On Windows Server containers, this is
approximated as a percentage of total CPU usage.
--cpu-percent int CPU percent (Windows only)
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
-c, --cpu-shares int CPU shares (relative weight)
--cpus NanoCPUs Number of CPUs (default 0.000)
--cpu-rt-period int Limit the CPU real-time period in microseconds
--cpu-rt-runtime int Limit the CPU real-time runtime in microseconds
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
--device value Add a host device to the container (default [])
--device-cgroup-rule value Add a rule to the cgroup allowed devices list
--device-read-bps value Limit read rate (bytes per second) from a device (default [])
--device-read-iops value Limit read rate (IO per second) from a device (default [])
--device-write-bps value Limit write rate (bytes per second) to a device (default [])
--device-write-iops value Limit write rate (IO per second) to a device (default [])
--disable-content-trust Skip image verification (default true)
--dns value Set custom DNS servers (default [])
--dns-option value Set DNS options (default [])
--dns-search value Set custom DNS search domains (default [])
--entrypoint string Overwrite the default ENTRYPOINT of the image
-e, --env value Set environment variables (default [])
--env-file value Read in a file of environment variables (default [])
--expose value Expose a port or a range of ports (default [])
--group-add value Add additional groups to join (default [])
--health-cmd string Command to run to check health
--health-interval duration Time between running the check (ns|us|ms|s|m|h) (default 0s)
--health-retries int Consecutive failures needed to report unhealthy
--health-timeout duration Maximum time to allow one check to run (ns|us|ms|s|m|h) (default 0s)
--health-start-period duration Start period for the container to initialize before counting retries towards unstable (ns|us|ms|s|m|h) (default 0s)
--help Print usage
-h, --hostname string Container host name
--init Run an init inside the container that forwards signals and reaps processes
-i, --interactive Keep STDIN open even if not attached
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
--io-maxiops uint Maximum IOps limit for the system drive (Windows only)
--ip string IPv4 address (e.g., 172.30.100.104)
--ip6 string IPv6 address (e.g., 2001:db8::33)
--ipc string IPC namespace to use
--isolation string Container isolation technology
--kernel-memory string Kernel memory limit
-l, --label value Set meta data on a container (default [])
--label-file value Read in a line delimited file of labels (default [])
--link value Add link to another container (default [])
--link-local-ip value Container IPv4/IPv6 link-local addresses (default [])
--log-driver string Logging driver for the container
--log-opt value Log driver options (default [])
--mac-address string Container MAC address (e.g., 92:d0:c6:0a:29:33)
-m, --memory string Memory limit
--memory-reservation string Memory soft limit
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--memory-swappiness int Tune container memory swappiness (0 to 100) (default -1)
--mount value Attach a filesytem mount to the container (default [])
--name string Assign a name to the container
--network-alias value Add network-scoped alias for the container (default [])
--network string Connect a container to a network (default "default")
'bridge': create a network stack on the default Docker bridge
'none': no networking
'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network
--no-healthcheck Disable any container-specified HEALTHCHECK
--oom-kill-disable Disable OOM Killer
--oom-score-adj int Tune host's OOM preferences (-1000 to 1000)
--pid string PID namespace to use
--pids-limit int Tune container pids limit (set -1 for unlimited), kernel >= 4.3
--privileged Give extended privileges to this container
-p, --publish value Publish a container's port(s) to the host (default [])
-P, --publish-all Publish all exposed ports to random ports
--read-only Mount the container's root filesystem as read only
--restart string Restart policy to apply when a container exits (default "no")
Possible values are: no, on-failure[:max-retry], always, unless-stopped
--rm Automatically remove the container when it exits
--runtime string Runtime to use for this container
--security-opt value Security Options (default [])
--shm-size bytes Size of /dev/shm
The format is `<number><unit>`. `number` must be greater than `0`.
Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes),
or `g` (gigabytes). If you omit the unit, the system uses bytes.
--stop-signal string Signal to stop a container (default "SIGTERM")
--stop-timeout=10 Timeout (in seconds) to stop a container
--storage-opt value Storage driver options for the container (default [])
--sysctl value Sysctl options (default map[])
--tmpfs value Mount a tmpfs directory (default [])
-t, --tty Allocate a pseudo-TTY
--ulimit value Ulimit options (default [])
-u, --user string Username or UID (format: <name|uid>[:<group|gid>])
--userns string User namespace to use
'host': Use the Docker host user namespace
'': Use the Docker daemon user namespace specified by `--userns-remap` option.
--uts string UTS namespace to use
-v, --volume value Bind mount a volume (default []). The format
is `[host-src:]container-dest[:<options>]`.
The comma-delimited `options` are [rw|ro],
[z|Z], [[r]shared|[r]slave|[r]private],
[delegated|cached|consistent], and
[nocopy]. The 'host-src' is an absolute path
or a name value.
--volume-driver string Optional volume driver for the container
--volumes-from value Mount volumes from the specified container(s) (default [])
-w, --workdir string Working directory inside the container
```
## Description
The `docker create` command creates a writeable container layer over the
specified image and prepares it for running the specified command. The
container ID is then printed to `STDOUT`. This is similar to `docker run -d`
except the container is never started. You can then use the
`docker start <container_id>` command to start the container at any point.
This is useful when you want to set up a container configuration ahead of time
so that it is ready to start when you need it. The initial status of the
new container is `created`.
Please see the [run command](run.md) section and the [Docker run reference](../run.md) for more details.
## Examples
### Create and start a container
```bash
$ docker create -t -i fedora bash
6d8af538ec541dd581ebc2a24153a28329acb5268abe5ef868c1f1a261221752
$ docker start -a -i 6d8af538ec5
bash-4.2#
```
### Initialize volumes
As of v1.4.0 container volumes are initialized during the `docker create` phase
(i.e., `docker run` too). For example, this allows you to `create` the `data`
volume container, and then use it from another container:
```bash
$ docker create -v /data --name data ubuntu
240633dfbb98128fa77473d3d9018f6123b99c454b3251427ae190a7d951ad57
$ docker run --rm --volumes-from data ubuntu ls -la /data
total 8
drwxr-xr-x 2 root root 4096 Dec 5 04:10 .
drwxr-xr-x 48 root root 4096 Dec 5 04:11 ..
```
Similarly, `create` a host directory bind mounted volume container, which can
then be used from the subsequent container:
```bash
$ docker create -v /home/docker:/docker --name docker ubuntu
9aa88c08f319cd1e4515c3c46b0de7cc9aa75e878357b1e96f91e2c773029f03
$ docker run --rm --volumes-from docker ubuntu ls -la /docker
total 20
drwxr-sr-x 5 1000 staff 180 Dec 5 04:00 .
drwxr-xr-x 48 root root 4096 Dec 5 04:13 ..
-rw-rw-r-- 1 1000 staff 3833 Dec 5 04:01 .ash_history
-rw-r--r-- 1 1000 staff 446 Nov 28 11:51 .ashrc
-rw-r--r-- 1 1000 staff 25 Dec 5 04:00 .gitconfig
drwxr-sr-x 3 1000 staff 60 Dec 1 03:28 .local
-rw-r--r-- 1 1000 staff 920 Nov 28 11:51 .profile
drwx--S--- 2 1000 staff 460 Dec 5 00:51 .ssh
drwxr-xr-x 32 1000 staff 1140 Dec 5 04:01 docker
```
Set storage driver options per container.
```bash
$ docker create -it --storage-opt size=120G fedora /bin/bash
```
This (size) will allow to set the container rootfs size to 120G at creation time.
This option is only available for the `devicemapper`, `btrfs`, `overlay2`,
`windowsfilter` and `zfs` graph drivers.
For the `devicemapper`, `btrfs`, `windowsfilter` and `zfs` graph drivers,
user cannot pass a size less than the Default BaseFS Size.
For the `overlay2` storage driver, the size option is only available if the
backing fs is `xfs` and mounted with the `pquota` mount option.
Under these conditions, user can pass any size less then the backing fs size.
### Specify isolation technology for container (--isolation)
This option is useful in situations where you are running Docker containers on
Windows. The `--isolation=<value>` option sets a container's isolation
technology. On Linux, the only supported is the `default` option which uses
Linux namespaces. On Microsoft Windows, you can specify these values:
| Value | Description |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `default` | Use the value specified by the Docker daemon's `--exec-opt` . If the `daemon` does not specify an isolation technology, Microsoft Windows uses `process` as its default value if the
daemon is running on Windows server, or `hyperv` if running on Windows client. |
| `process` | Namespace isolation only. |
| `hyperv` | Hyper-V hypervisor partition-based isolation. |
Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`.
### Dealing with dynamically created devices (--device-cgroup-rule)
Devices available to a container are assigned at creation time. The
assigned devices will both be added to the cgroup.allow file and
created into the container once it is run. This poses a problem when
a new device needs to be added to running container.
One of the solution is to add a more permissive rule to a container
allowing it access to a wider range of devices. For example, supposing
our container needs access to a character device with major `42` and
any number of minor number (added as new devices appear), the
following rule would be added:
```
docker create --device-cgroup-rule='c 42:* rmw' -name my-container my-image
```
Then, a user could ask `udev` to execute a script that would `docker exec my-container mknod newDevX c 42 <minor>`
the required device when it is added.
NOTE: initially present devices still need to be explicitely added to
the create/run command

View File

@ -0,0 +1,112 @@
---
title: "deploy"
description: "The deploy command description and usage"
keywords: "stack, deploy"
advisory: "experimental"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# deploy (experimental)
An alias for `stack deploy`.
```markdown
Usage: docker deploy [OPTIONS] STACK
Deploy a new stack or update an existing stack
Aliases:
deploy, up
Options:
--bundle-file string Path to a Distributed Application Bundle file
--compose-file string Path to a Compose file
--help Print usage
--prune Prune services that are no longer referenced
--with-registry-auth Send registry authentication details to Swarm agents
```
## Description
Create and update a stack from a `compose` or a `dab` file on the swarm. This command
has to be run targeting a manager node.
## Examples
### Compose file
The `deploy` command supports compose file version `3.0` and above.
```bash
$ docker stack deploy --compose-file docker-compose.yml vossibility
Ignoring unsupported options: links
Creating network vossibility_vossibility
Creating network vossibility_default
Creating service vossibility_nsqd
Creating service vossibility_logstash
Creating service vossibility_elasticsearch
Creating service vossibility_kibana
Creating service vossibility_ghollector
Creating service vossibility_lookupd
```
You can verify that the services were correctly created
```bash
$ docker service ls
ID NAME MODE REPLICAS IMAGE
29bv0vnlm903 vossibility_lookupd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
4awt47624qwh vossibility_nsqd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
4tjx9biia6fs vossibility_elasticsearch replicated 1/1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
7563uuzr9eys vossibility_kibana replicated 1/1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
9gc5m4met4he vossibility_logstash replicated 1/1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
axqh55ipl40h vossibility_vossibility-collector replicated 1/1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
```
### DAB file
```bash
$ docker stack deploy --bundle-file vossibility-stack.dab vossibility
Loading bundle from vossibility-stack.dab
Creating service vossibility_elasticsearch
Creating service vossibility_kibana
Creating service vossibility_logstash
Creating service vossibility_lookupd
Creating service vossibility_nsqd
Creating service vossibility_vossibility-collector
```
You can verify that the services were correctly created:
```bash
$ docker service ls
ID NAME MODE REPLICAS IMAGE
29bv0vnlm903 vossibility_lookupd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
4awt47624qwh vossibility_nsqd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
4tjx9biia6fs vossibility_elasticsearch replicated 1/1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
7563uuzr9eys vossibility_kibana replicated 1/1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
9gc5m4met4he vossibility_logstash replicated 1/1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
axqh55ipl40h vossibility_vossibility-collector replicated 1/1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
```
## Related commands
* [stack config](stack_config.md)
* [stack deploy](stack_deploy.md)
* [stack ls](stack_ls.md)
* [stack ps](stack_ps.md)
* [stack rm](stack_rm.md)
* [stack services](stack_services.md)

View File

@ -0,0 +1,67 @@
---
title: "diff"
description: "The diff command description and usage"
keywords: "list, changed, files, container"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# diff
```markdown
Usage: docker diff CONTAINER
Inspect changes to files or directories on a container's filesystem
Options:
--help Print usage
```
## Description
List the changed files and directories in a container᾿s filesystem since the
container was created. Three different types of change are tracked:
| Symbol | Description |
|--------|---------------------------------|
| `A` | A file or directory was added |
| `D` | A file or directory was deleted |
| `C` | A file or directory was changed |
You can use the full or shortened container ID or the container name set using
`docker run --name` option.
## Examples
Inspect the changes to an `nginx` container:
```bash
$ docker diff 1fdfd1f54c1b
C /dev
C /dev/console
C /dev/core
C /dev/stdout
C /dev/fd
C /dev/ptmx
C /dev/stderr
C /dev/stdin
C /run
A /run/nginx.pid
C /var/lib/nginx/tmp
A /var/lib/nginx/tmp/client_body
A /var/lib/nginx/tmp/fastcgi
A /var/lib/nginx/tmp/proxy
A /var/lib/nginx/tmp/scgi
A /var/lib/nginx/tmp/uwsgi
C /var/log/nginx
A /var/log/nginx/access.log
A /var/log/nginx/error.log
```

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,345 @@
---
title: "events"
description: "The events command description and usage"
keywords: "events, container, report"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/moby/moby/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# events
```markdown
Usage: docker events [OPTIONS]
Get real time events from the server
Options:
-f, --filter value Filter output based on conditions provided (default [])
--format string Format the output using the given Go template
--help Print usage
--since string Show all events created since timestamp
--until string Stream events until this timestamp
```
## Description
Use `docker events` to get real-time events from the server. These events differ
per Docker object type.
### Object types
#### Containers
Docker containers report the following events:
- `attach`
- `commit`
- `copy`
- `create`
- `destroy`
- `detach`
- `die`
- `exec_create`
- `exec_detach`
- `exec_start`
- `export`
- `health_status`
- `kill`
- `oom`
- `pause`
- `rename`
- `resize`
- `restart`
- `start`
- `stop`
- `top`
- `unpause`
- `update`
#### Images
Docker images report the following events:
- `delete`
- `import`
- `load`
- `pull`
- `push`
- `save`
- `tag`
- `untag`
#### Plugins
Docker plugins report the following events:
- `install`
- `enable`
- `disable`
- `remove`
#### Volumes
Docker volumes report the following events:
- `create`
- `mount`
- `unmount`
- `destroy`
#### Networks
Docker networks report the following events:
- `create`
- `connect`
- `disconnect`
- `destroy`
#### Daemons
Docker daemons report the following events:
- `reload`
### Limiting, filtering, and formatting the output
#### Limit events by time
The `--since` and `--until` parameters can be Unix timestamps, date formatted
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
relative to the client machines time. If you do not provide the `--since` option,
the command returns only new and/or live events. Supported formats for date
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
timezone on the client will be used if you do not provide either a `Z` or a
`+-00:00` timezone offset at the end of the timestamp. When providing Unix
timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
fraction of a second no more than nine digits long.
#### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If you would
like to use multiple filters, pass multiple flags (e.g.,
`--filter "foo=bar" --filter "bif=baz"`)
Using the same filter multiple times will be handled as a *OR*; for example
`--filter container=588a23dac085 --filter container=a8f7720b8c22` will display
events for container 588a23dac085 *OR* container a8f7720b8c22
Using multiple filters will be handled as a *AND*; for example
`--filter container=588a23dac085 --filter event=start` will display events for
container container 588a23dac085 *AND* the event type is *start*
The currently supported filters are:
* container (`container=<name or id>`)
* daemon (`daemon=<name or id>`)
* event (`event=<event action>`)
* image (`image=<tag or id>`)
* label (`label=<key>` or `label=<key>=<value>`)
* network (`network=<name or id>`)
* plugin (`plugin=<name or id>`)
* type (`type=<container or image or volume or network or daemon or plugin>`)
* volume (`volume=<name or id>`)
#### Format
If a format (`--format`) is specified, the given template will be executed
instead of the default
format. Go's [text/template](http://golang.org/pkg/text/template/) package
describes all the details of the format.
If a format is set to `{{json .}}`, the events are streamed as valid JSON
Lines. For information about JSON Lines, please refer to http://jsonlines.org/ .
## Examples
### Basic example
You'll need two shells for this example.
**Shell 1: Listening for events:**
```bash
$ docker events
```
**Shell 2: Start and Stop containers:**
```bash
$ docker create --name test alpine:latest top
$ docker start test
$ docker stop test
```
**Shell 1: (Again .. now showing events):**
```none
2017-01-05T00:35:58.859401177+08:00 container create 0fdb48addc82871eb34eb23a847cfd033dedd1a0a37bef2e6d9eb3870fc7ff37 (image=alpine:latest, name=test)
2017-01-05T00:36:04.703631903+08:00 network connect e2e1f5ceda09d4300f3a846f0acfaa9a8bb0d89e775eb744c5acecd60e0529e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
```
To exit the `docker events` command, use `CTRL+C`.
### Filter events by time
You can filter the output by an absolute timestamp or relative time on the host
machine, using the following different time syntaxes:
```bash
$ docker events --since 1483283804
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
$ docker events --since '2017-01-05'
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
$ docker events --since '2013-09-03T15:49:29'
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
$ docker events --since '10m'
2017-01-05T00:35:41.241772953+08:00 volume create testVol (driver=local)
2017-01-05T00:35:58.859401177+08:00 container create d9cd...4d70 (image=alpine:latest, name=test)
2017-01-05T00:36:04.703631903+08:00 network connect e2e1...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:04.795031609+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:36:09.830268747+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
2017-01-05T00:36:09.840186338+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
2017-01-05T00:36:09.880113663+08:00 network disconnect e2e...29e2 (container=0fdb...ff37, name=bridge, type=bridge)
2017-01-05T00:36:09.890214053+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
```
### Filter events by criteria
The following commands show several different ways to filter the `docker event`
output.
```bash
$ docker events --filter 'event=stop'
2017-01-05T00:40:22.880175420+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:41:17.888104182+08:00 container stop 2a8f...4e78 (image=alpine, name=kickass_brattain)
$ docker events --filter 'image=alpine'
2017-01-05T00:41:55.784240236+08:00 container create d9cd...4d70 (image=alpine, name=happy_meitner)
2017-01-05T00:41:55.913156783+08:00 container start d9cd...4d70 (image=alpine, name=happy_meitner)
2017-01-05T00:42:01.106875249+08:00 container kill d9cd...4d70 (image=alpine, name=happy_meitner, signal=15)
2017-01-05T00:42:11.111934041+08:00 container kill d9cd...4d70 (image=alpine, name=happy_meitner, signal=9)
2017-01-05T00:42:11.119578204+08:00 container die d9cd...4d70 (exitCode=137, image=alpine, name=happy_meitner)
2017-01-05T00:42:11.173276611+08:00 container stop d9cd...4d70 (image=alpine, name=happy_meitner)
$ docker events --filter 'container=test'
2017-01-05T00:43:00.139719934+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:43:09.259951086+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=15)
2017-01-05T00:43:09.270102715+08:00 container die 0fdb...ff37 (exitCode=143, image=alpine:latest, name=test)
2017-01-05T00:43:09.312556440+08:00 container stop 0fdb...ff37 (image=alpine:latest, name=test)
$ docker events --filter 'container=test' --filter 'container=d9cdb1525ea8'
2017-01-05T00:44:11.517071981+08:00 container start 0fdb...ff37 (image=alpine:latest, name=test)
2017-01-05T00:44:17.685870901+08:00 container start d9cd...4d70 (image=alpine, name=happy_meitner)
2017-01-05T00:44:29.757658470+08:00 container kill 0fdb...ff37 (image=alpine:latest, name=test, signal=9)
2017-01-05T00:44:29.767718510+08:00 container die 0fdb...ff37 (exitCode=137, image=alpine:latest, name=test)
2017-01-05T00:44:29.815798344+08:00 container destroy 0fdb...ff37 (image=alpine:latest, name=test)
$ docker events --filter 'container=test' --filter 'event=stop'
2017-01-05T00:46:13.664099505+08:00 container stop a9d1...e130 (image=alpine, name=test)
$ docker events --filter 'type=volume'
2015-12-23T21:05:28.136212689Z volume create test-event-volume-local (driver=local)
2015-12-23T21:05:28.383462717Z volume mount test-event-volume-local (read/write=true, container=562f...5025, destination=/foo, driver=local, propagation=rprivate)
2015-12-23T21:05:28.650314265Z volume unmount test-event-volume-local (container=562f...5025, driver=local)
2015-12-23T21:05:28.716218405Z volume destroy test-event-volume-local (driver=local)
$ docker events --filter 'type=network'
2015-12-23T21:38:24.705709133Z network create 8b11...2c5b (name=test-event-network-local, type=bridge)
2015-12-23T21:38:25.119625123Z network connect 8b11...2c5b (name=test-event-network-local, container=b4be...c54e, type=bridge)
$ docker events --filter 'container=container_1' --filter 'container=container_2'
2014-09-03T15:49:29.999999999Z07:00 container die 4386fb97867d (image=ubuntu-1:14.04)
2014-05-10T17:42:14.999999999Z07:00 container stop 4386fb97867d (image=ubuntu-1:14.04)
2014-05-10T17:42:14.999999999Z07:00 container die 7805c1d35632 (imager=redis:2.8)
2014-09-03T15:49:29.999999999Z07:00 container stop 7805c1d35632 (image=redis:2.8)
$ docker events --filter 'type=volume'
2015-12-23T21:05:28.136212689Z volume create test-event-volume-local (driver=local)
2015-12-23T21:05:28.383462717Z volume mount test-event-volume-local (read/write=true, container=562fe10671e9273da25eed36cdce26159085ac7ee6707105fd534866340a5025, destination=/foo, driver=local, propagation=rprivate)
2015-12-23T21:05:28.650314265Z volume unmount test-event-volume-local (container=562fe10671e9273da25eed36cdce26159085ac7ee6707105fd534866340a5025, driver=local)
2015-12-23T21:05:28.716218405Z volume destroy test-event-volume-local (driver=local)
$ docker events --filter 'type=network'
2015-12-23T21:38:24.705709133Z network create 8b111217944ba0ba844a65b13efcd57dc494932ee2527577758f939315ba2c5b (name=test-event-network-local, type=bridge)
2015-12-23T21:38:25.119625123Z network connect 8b111217944ba0ba844a65b13efcd57dc494932ee2527577758f939315ba2c5b (name=test-event-network-local, container=b4be644031a3d90b400f88ab3d4bdf4dc23adb250e696b6328b85441abe2c54e, type=bridge)
$ docker events --filter 'type=plugin'
2016-07-25T17:30:14.825557616Z plugin pull ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)
2016-07-25T17:30:14.888127370Z plugin enable ec7b87f2ce84330fe076e666f17dfc049d2d7ae0b8190763de94e1f2d105993f (name=tiborvass/sample-volume-plugin:latest)
```
### Format the output
```bash
$ docker events --filter 'type=container' --format 'Type={{.Type}} Status={{.Status}} ID={{.ID}}'
Type=container Status=create ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
Type=container Status=attach ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
Type=container Status=start ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
Type=container Status=resize ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
Type=container Status=die ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
Type=container Status=destroy ID=2ee349dac409e97974ce8d01b70d250b85e0ba8189299c126a87812311951e26
```
#### Format as JSON
```none
$ docker events --format '{{json .}}'
{"status":"create","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
{"status":"attach","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
{"Type":"network","Action":"connect","Actor":{"ID":"1b50a5bf755f6021dfa78e..
{"status":"start","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f42..
{"status":"resize","id":"196016a57679bf42424484918746a9474cd905dd993c4d0f4..
```

View File

@ -0,0 +1,99 @@
---
title: "exec"
description: "The exec command description and usage"
keywords: "command, container, run, execute"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# exec
```markdown
Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
Run a command in a running container
Options:
-d, --detach Detached mode: run command in the background
--detach-keys Override the key sequence for detaching a container
-e, --env=[] Set environment variables
--help Print usage
-i, --interactive Keep STDIN open even if not attached
--privileged Give extended privileges to the command
-t, --tty Allocate a pseudo-TTY
-u, --user Username or UID (format: <name|uid>[:<group|gid>])
```
## Description
The `docker exec` command runs a new command in a running container.
The command started using `docker exec` only runs while the container's primary
process (`PID 1`) is running, and it is not restarted if the container is
restarted.
COMMAND will run in the default directory of the container. It the
underlying image has a custom directory specified with the WORKDIR directive
in its Dockerfile, this will be used instead.
COMMAND should be an executable, a chained or a quoted command
will not work. Example: `docker exec -ti my_container "echo a && echo b"` will
not work, but `docker exec -ti my_container sh -c "echo a && echo b"` will.
## Examples
### Run `docker exec` on a running container
First, start a container.
```bash
$ docker run --name ubuntu_bash --rm -i -t ubuntu bash
```
This will create a container named `ubuntu_bash` and start a Bash session.
Next, execute a command on the container.
```bash
$ docker exec -d ubuntu_bash touch /tmp/execWorks
```
This will create a new file `/tmp/execWorks` inside the running container
`ubuntu_bash`, in the background.
Next, execute an interactive `bash` shell on the container.
```bash
$ docker exec -it ubuntu_bash bash
```
This will create a new Bash session in the container `ubuntu_bash`.
### Try to run `docker exec` on a paused container
If the container is paused, then the `docker exec` command will fail with an error:
```bash
$ docker pause test
test
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1ae3b36715d2 ubuntu:latest "bash" 17 seconds ago Up 16 seconds (Paused) test
$ docker exec test ls
FATA[0000] Error response from daemon: Container test is paused, unpause the container before exec
$ echo $?
1
```

View File

@ -0,0 +1,48 @@
---
title: "export"
description: "The export command description and usage"
keywords: "export, file, system, container"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# export
```markdown
Usage: docker export [OPTIONS] CONTAINER
Export a container's filesystem as a tar archive
Options:
--help Print usage
-o, --output string Write to a file, instead of STDOUT
```
## Description
The `docker export` command does not export the contents of volumes associated
with the container. If a volume is mounted on top of an existing directory in
the container, `docker export` will export the contents of the *underlying*
directory, not the contents of the volume.
Refer to [Backup, restore, or migrate data volumes](https://docs.docker.com/engine/tutorials/dockervolumes/#backup-restore-or-migrate-data-volumes)
in the user guide for examples on exporting data in a volume.
## Examples
Each of these commands has the same result.
```bash
$ docker export red_panda > latest.tar
```
```bash
$ docker export --output="latest.tar" red_panda
```

View File

@ -0,0 +1,93 @@
---
title: "history"
description: "The history command description and usage"
keywords: "docker, image, history"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# history
```markdown
Usage: docker history [OPTIONS] IMAGE
Show the history of an image
Options:
--format string Pretty-print images using a Go template
--help Print usage
-H, --human Print sizes and dates in human readable format (default true)
--no-trunc Don't truncate output
-q, --quiet Only show numeric IDs
```
## Examples
To see how the `docker:latest` image was built:
```bash
$ docker history docker
IMAGE CREATED CREATED BY SIZE COMMENT
3e23a5875458 8 days ago /bin/sh -c #(nop) ENV LC_ALL=C.UTF-8 0 B
8578938dd170 8 days ago /bin/sh -c dpkg-reconfigure locales && loc 1.245 MB
be51b77efb42 8 days ago /bin/sh -c apt-get update && apt-get install 338.3 MB
4b137612be55 6 weeks ago /bin/sh -c #(nop) ADD jessie.tar.xz in / 121 MB
750d58736b4b 6 weeks ago /bin/sh -c #(nop) MAINTAINER Tianon Gravi <ad 0 B
511136ea3c5a 9 months ago 0 B Imported from -
```
To see how the `docker:apache` image was added to a container's base image:
```bash
$ docker history docker:scm
IMAGE CREATED CREATED BY SIZE COMMENT
2ac9d1098bf1 3 months ago /bin/bash 241.4 MB Added Apache to Fedora base image
88b42ffd1f7c 5 months ago /bin/sh -c #(nop) ADD file:1fd8d7f9f6557cafc7 373.7 MB
c69cab00d6ef 5 months ago /bin/sh -c #(nop) MAINTAINER Lokesh Mandvekar 0 B
511136ea3c5a 19 months ago 0 B Imported from -
```
### Format the output
The formatting option (`--format`) will pretty-prints history output
using a Go template.
Valid placeholders for the Go template are listed below:
| Placeholder | Description |
| --------------- | ----------- |
| `.ID` | Image ID |
| `.CreatedSince` | Elapsed time since the image was created if `--human=true`, otherwise timestamp of when image was created |
| `.CreatedAt` | Timestamp of when image was created |
| `.CreatedBy` | Command that was used to create the image |
| `.Size` | Image disk size |
| `.Comment` | Comment for image |
When using the `--format` option, the `history` command will either
output the data exactly as the template declares or, when using the
`table` directive, will include column headers as well.
The following example uses a template without headers and outputs the
`ID` and `CreatedSince` entries separated by a colon for all images:
```bash
$ docker images --format "{{.ID}}: {{.Created}} ago"
cc1b61406712: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 2 weeks ago
<missing>: 3 weeks ago
<missing>: 3 weeks ago
<missing>: 3 weeks ago
```

View File

@ -0,0 +1,47 @@
---
title: "image"
description: "The image command description and usage"
keywords: "image"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# image
```markdown
Usage: docker image COMMAND
Manage images
Options:
--help Print usage
Commands:
build Build an image from a Dockerfile
history Show the history of an image
import Import the contents from a tarball to create a filesystem image
inspect Display detailed information on one or more images
load Load an image from a tar archive or STDIN
ls List images
prune Remove unused images
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rm Remove one or more images
save Save one or more images to a tar archive (streamed to STDOUT by default)
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Run 'docker image COMMAND --help' for more information on a command.
```
## Description
Manage images.

View File

@ -0,0 +1,171 @@
---
title: "image prune"
description: "Remove all stopped images"
keywords: "image, prune, delete, remove"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# image prune
```markdown
Usage: docker image prune [OPTIONS]
Remove unused images
Options:
-a, --all Remove all unused images, not just dangling ones
--filter filter Provide filter values (e.g. 'until=<timestamp>')
-f, --force Do not prompt for confirmation
--help Print usage
```
## Description
Remove all dangling images. If `-a` is specified, will also remove all images not referenced by any container.
## Examples
Example output:
```bash
$ docker image prune -a
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y
Deleted Images:
untagged: alpine:latest
untagged: alpine@sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a
deleted: sha256:4e38e38c8ce0b8d9041a9c4fefe786631d1416225e13b0bfe8cfa2321aec4bba
deleted: sha256:4fe15f8d0ae69e169824f25f1d4da3015a48feeeeebb265cd2e328e15c6a869f
untagged: alpine:3.3
untagged: alpine@sha256:4fa633f4feff6a8f02acfc7424efd5cb3e76686ed3218abf4ca0fa4a2a358423
untagged: my-jq:latest
deleted: sha256:ae67841be6d008a374eff7c2a974cde3934ffe9536a7dc7ce589585eddd83aff
deleted: sha256:34f6f1261650bc341eb122313372adc4512b4fceddc2a7ecbb84f0958ce5ad65
deleted: sha256:cf4194e8d8db1cb2d117df33f2c75c0369c3a26d96725efb978cc69e046b87e7
untagged: my-curl:latest
deleted: sha256:b2789dd875bf427de7f9f6ae001940073b3201409b14aba7e5db71f408b8569e
deleted: sha256:96daac0cb203226438989926fc34dd024f365a9a8616b93e168d303cfe4cb5e9
deleted: sha256:5cbd97a14241c9cd83250d6b6fc0649833c4a3e84099b968dd4ba403e609945e
deleted: sha256:a0971c4015c1e898c60bf95781c6730a05b5d8a2ae6827f53837e6c9d38efdec
deleted: sha256:d8359ca3b681cc5396a4e790088441673ed3ce90ebc04de388bfcd31a0716b06
deleted: sha256:83fc9ba8fb70e1da31dfcc3c88d093831dbd4be38b34af998df37e8ac538260c
deleted: sha256:ae7041a4cc625a9c8e6955452f7afe602b401f662671cea3613f08f3d9343b35
deleted: sha256:35e0f43a37755b832f0bbea91a2360b025ee351d7309dae0d9737bc96b6d0809
deleted: sha256:0af941dd29f00e4510195dd00b19671bc591e29d1495630e7e0f7c44c1e6a8c0
deleted: sha256:9fc896fc2013da84f84e45b3096053eb084417b42e6b35ea0cce5a3529705eac
deleted: sha256:47cf20d8c26c46fff71be614d9f54997edacfe8d46d51769706e5aba94b16f2b
deleted: sha256:2c675ee9ed53425e31a13e3390bf3f539bf8637000e4bcfbb85ee03ef4d910a1
Total reclaimed space: 16.43 MB
```
### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
The currently supported filters are:
* until (`<timestamp>`) - only remove images created before given timestamp
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove images with (or without, in case `label!=...` is used) the specified labels.
The `until` filter can be Unix timestamps, date formatted
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
relative to the daemon machines time. Supported formats for date
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
timezone on the daemon will be used if you do not provide either a `Z` or a
`+-00:00` timezone offset at the end of the timestamp. When providing Unix
timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
fraction of a second no more than nine digits long.
The `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`),
which removes images with the specified labels. The other
format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes
images without the specified labels.
The following removes images created before `2017-01-04T00:00:00`:
```bash
$ docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}'
REPOSITORY TAG IMAGE ID CREATED AT SIZE
foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB
alpine latest 88e169ea8f46 2016-12-27 10:17:25 -0800 PST 3.98 MB
busybox latest e02e811dd08f 2016-10-07 14:03:58 -0700 PDT 1.09 MB
$ docker image prune -a --force --filter "until=2017-01-04T00:00:00"
Deleted Images:
untagged: alpine:latest
untagged: alpine@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
untagged: busybox:latest
untagged: busybox@sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912
deleted: sha256:e02e811dd08fd49e7f6032625495118e63f597eb150403d02e3238af1df240ba
deleted: sha256:e88b3f82283bc59d5e0df427c824e9f95557e661fcb0ea15fb0fb6f97760f9d9
Total reclaimed space: 1.093 MB
$ docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}'
REPOSITORY TAG IMAGE ID CREATED AT SIZE
foo latest 2f287ac753da 2017-01-04 13:42:23 -0800 PST 3.98 MB
```
The following removes images created more than 10 days (`240h`) ago:
```bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
foo latest 2f287ac753da 14 seconds ago 3.98 MB
alpine latest 88e169ea8f46 8 days ago 3.98 MB
debian jessie 7b0a06c805e8 2 months ago 123 MB
busybox latest e02e811dd08f 2 months ago 1.09 MB
golang 1.7.0 138c2e655421 4 months ago 670 MB
$ docker image prune -a --force --filter "until=240h"
Deleted Images:
untagged: golang:1.7.0
untagged: golang@sha256:6765038c2b8f407fd6e3ecea043b44580c229ccfa2a13f6d85866cf2b4a9628e
deleted: sha256:138c2e6554219de65614d88c15521bfb2da674cbb0bf840de161f89ff4264b96
deleted: sha256:ec353c2e1a673f456c4b78906d0d77f9d9456cfb5229b78c6a960bfb7496b76a
deleted: sha256:fe22765feaf3907526b4921c73ea6643ff9e334497c9b7e177972cf22f68ee93
deleted: sha256:ff845959c80148421a5c3ae11cc0e6c115f950c89bc949646be55ed18d6a2912
deleted: sha256:a4320831346648c03db64149eafc83092e2b34ab50ca6e8c13112388f25899a7
deleted: sha256:4c76020202ee1d9709e703b7c6de367b325139e74eebd6b55b30a63c196abaf3
deleted: sha256:d7afd92fb07236c8a2045715a86b7d5f0066cef025018cd3ca9a45498c51d1d6
deleted: sha256:9e63c5bce4585dd7038d830a1f1f4e44cb1a1515b00e620ac718e934b484c938
untagged: debian:jessie
untagged: debian@sha256:c1af755d300d0c65bb1194d24bce561d70c98a54fb5ce5b1693beb4f7988272f
deleted: sha256:7b0a06c805e8f23807fb8856621c60851727e85c7bcb751012c813f122734c8d
deleted: sha256:f96222d75c5563900bc4dd852179b720a0885de8f7a0619ba0ac76e92542bbc8
Total reclaimed space: 792.6 MB
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
foo latest 2f287ac753da About a minute ago 3.98 MB
alpine latest 88e169ea8f46 8 days ago 3.98 MB
busybox latest e02e811dd08f 2 months ago 1.09 MB
```
## Related commands
* [system df](system_df.md)
* [container prune](container_prune.md)
* [volume prune](volume_prune.md)
* [network prune](network_prune.md)
* [system prune](system_prune.md)

View File

@ -0,0 +1,343 @@
---
title: "images"
description: "The images command description and usage"
keywords: "list, docker, images"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# images
```markdown
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
List images
Options:
-a, --all Show all images (default hides intermediate images)
--digests Show digests
-f, --filter value Filter output based on conditions provided (default [])
- dangling=(true|false)
- label=<key> or label=<key>=<value>
- before=(<image-name>[:tag]|<image-id>|<image@digest>)
- since=(<image-name>[:tag]|<image-id>|<image@digest>)
- reference=(pattern of an image reference)
--format string Pretty-print images using a Go template
--help Print usage
--no-trunc Don't truncate output
-q, --quiet Only show numeric IDs
```
## Description
The default `docker images` will show all top level
images, their repository and tags, and their size.
Docker images have intermediate layers that increase reusability,
decrease disk usage, and speed up `docker build` by
allowing each step to be cached. These intermediate layers are not shown
by default.
The `SIZE` is the cumulative space taken up by the image and all
its parent images. This is also the disk space used by the contents of the
Tar file created when you `docker save` an image.
An image will be listed more than once if it has multiple repository names
or tags. This single image (identifiable by its matching `IMAGE ID`)
uses up the `SIZE` listed only once.
## Examples
### List the most recently created images
```bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 77af4d6b9913 19 hours ago 1.089 GB
committ latest b6fa739cedf5 19 hours ago 1.089 GB
<none> <none> 78a85c484f71 19 hours ago 1.089 GB
docker latest 30557a29d5ab 20 hours ago 1.089 GB
<none> <none> 5ed6274db6ce 24 hours ago 1.089 GB
postgres 9 746b819f315e 4 days ago 213.4 MB
postgres 9.3 746b819f315e 4 days ago 213.4 MB
postgres 9.3.5 746b819f315e 4 days ago 213.4 MB
postgres latest 746b819f315e 4 days ago 213.4 MB
```
### List images by name and tag
The `docker images` command takes an optional `[REPOSITORY[:TAG]]` argument
that restricts the list to images that match the argument. If you specify
`REPOSITORY`but no `TAG`, the `docker images` command lists all images in the
given repository.
For example, to list all images in the "java" repository, run this command :
```bash
$ docker images java
REPOSITORY TAG IMAGE ID CREATED SIZE
java 8 308e519aac60 6 days ago 824.5 MB
java 7 493d82594c15 3 months ago 656.3 MB
java latest 2711b1d6f3aa 5 months ago 603.9 MB
```
The `[REPOSITORY[:TAG]]` value must be an "exact match". This means that, for example,
`docker images jav` does not match the image `java`.
If both `REPOSITORY` and `TAG` are provided, only images matching that
repository and tag are listed. To find all local images in the "java"
repository with tag "8" you can use:
```bash
$ docker images java:8
REPOSITORY TAG IMAGE ID CREATED SIZE
java 8 308e519aac60 6 days ago 824.5 MB
```
If nothing matches `REPOSITORY[:TAG]`, the list is empty.
```bash
$ docker images java:0
REPOSITORY TAG IMAGE ID CREATED SIZE
```
### List the full length image IDs
```bash
$ docker images --no-trunc
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> sha256:77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182 19 hours ago 1.089 GB
committest latest sha256:b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f 19 hours ago 1.089 GB
<none> <none> sha256:78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921 19 hours ago 1.089 GB
docker latest sha256:30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 1.089 GB
<none> <none> sha256:0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5 20 hours ago 1.089 GB
<none> <none> sha256:18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b 22 hours ago 1.082 GB
<none> <none> sha256:f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a 23 hours ago 1.089 GB
tryout latest sha256:2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074 23 hours ago 131.5 MB
<none> <none> sha256:5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df 24 hours ago 1.089 GB
```
### List image digests
Images that use the v2 or later format have a content-addressable identifier
called a `digest`. As long as the input used to generate the image is
unchanged, the digest value is predictable. To list image digest values, use
the `--digests` flag:
```bash
$ docker images --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
localhost:5000/test/busybox <none> sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf 4986bf8c1536 9 weeks ago 2.43 MB
```
When pushing or pulling to a 2.0 registry, the `push` or `pull` command
output includes the image digest. You can `pull` using a digest value. You can
also reference by digest in `create`, `run`, and `rmi` commands, as well as the
`FROM` image reference in a Dockerfile.
### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
The currently supported filters are:
* dangling (boolean - true or false)
* label (`label=<key>` or `label=<key>=<value>`)
* before (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - filter images created before given id or references
* since (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - filter images created since given id or references
* reference (pattern of an image reference) - filter images whose reference matches the specified pattern
#### Show untagged images (dangling)
```bash
$ docker images --filter "dangling=true"
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 8abc22fbb042 4 weeks ago 0 B
<none> <none> 48e5f45168b9 4 weeks ago 2.489 MB
<none> <none> bf747efa0e2f 4 weeks ago 0 B
<none> <none> 980fe10e5736 12 weeks ago 101.4 MB
<none> <none> dea752e4e117 12 weeks ago 101.4 MB
<none> <none> 511136ea3c5a 8 months ago 0 B
```
This will display untagged images that are the leaves of the images tree (not
intermediary layers). These images occur when a new build of an image takes the
`repo:tag` away from the image ID, leaving it as `<none>:<none>` or untagged.
A warning will be issued if trying to remove an image when a container is presently
using it. By having this flag it allows for batch cleanup.
You can use this in conjunction with `docker rmi ...`:
```bash
$ docker rmi $(docker images -f "dangling=true" -q)
8abc22fbb042
48e5f45168b9
bf747efa0e2f
980fe10e5736
dea752e4e117
511136ea3c5a
```
> **Note**: Docker warns you if any containers exist that are using these
> untagged images.
#### Show images with a given label
The `label` filter matches images based on the presence of a `label` alone or a `label` and a
value.
The following filter matches images with the `com.example.version` label regardless of its value.
```bash
$ docker images --filter "label=com.example.version"
REPOSITORY TAG IMAGE ID CREATED SIZE
match-me-1 latest eeae25ada2aa About a minute ago 188.3 MB
match-me-2 latest dea752e4e117 About a minute ago 188.3 MB
```
The following filter matches images with the `com.example.version` label with the `1.0` value.
```bash
$ docker images --filter "label=com.example.version=1.0"
REPOSITORY TAG IMAGE ID CREATED SIZE
match-me latest 511136ea3c5a About a minute ago 188.3 MB
```
In this example, with the `0.1` value, it returns an empty set because no matches were found.
```bash
$ docker images --filter "label=com.example.version=0.1"
REPOSITORY TAG IMAGE ID CREATED SIZE
```
#### Filter images by time
The `before` filter shows only images created before the image with
given id or reference. For example, having these images:
```bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
image1 latest eeae25ada2aa 4 minutes ago 188.3 MB
image2 latest dea752e4e117 9 minutes ago 188.3 MB
image3 latest 511136ea3c5a 25 minutes ago 188.3 MB
```
Filtering with `before` would give:
```bash
$ docker images --filter "before=image1"
REPOSITORY TAG IMAGE ID CREATED SIZE
image2 latest dea752e4e117 9 minutes ago 188.3 MB
image3 latest 511136ea3c5a 25 minutes ago 188.3 MB
```
Filtering with `since` would give:
```bash
$ docker images --filter "since=image3"
REPOSITORY TAG IMAGE ID CREATED SIZE
image1 latest eeae25ada2aa 4 minutes ago 188.3 MB
image2 latest dea752e4e117 9 minutes ago 188.3 MB
```
#### Filter images by reference
The `reference` filter shows only images whose reference matches
the specified pattern.
```bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox latest e02e811dd08f 5 weeks ago 1.09 MB
busybox uclibc e02e811dd08f 5 weeks ago 1.09 MB
busybox musl 733eb3059dce 5 weeks ago 1.21 MB
busybox glibc 21c16b6787c6 5 weeks ago 4.19 MB
```
Filtering with `reference` would give:
```bash
$ docker images --filter=reference='busy*:*libc'
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox uclibc e02e811dd08f 5 weeks ago 1.09 MB
busybox glibc 21c16b6787c6 5 weeks ago 4.19 MB
```
### Format the output
The formatting option (`--format`) will pretty print container output
using a Go template.
Valid placeholders for the Go template are listed below:
| Placeholder | Description|
| ---- | ---- |
| `.ID` | Image ID |
| `.Repository` | Image repository |
| `.Tag` | Image tag |
| `.Digest` | Image digest |
| `.CreatedSince` | Elapsed time since the image was created |
| `.CreatedAt` | Time when the image was created |
| `.Size` | Image disk size |
When using the `--format` option, the `image` command will either
output the data exactly as the template declares or, when using the
`table` directive, will include column headers as well.
The following example uses a template without headers and outputs the
`ID` and `Repository` entries separated by a colon for all images:
```bash
$ docker images --format "{{.ID}}: {{.Repository}}"
77af4d6b9913: <none>
b6fa739cedf5: committ
78a85c484f71: <none>
30557a29d5ab: docker
5ed6274db6ce: <none>
746b819f315e: postgres
746b819f315e: postgres
746b819f315e: postgres
746b819f315e: postgres
```
To list all images with their repository and tag in a table format you
can use:
```bash
$ docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}"
IMAGE ID REPOSITORY TAG
77af4d6b9913 <none> <none>
b6fa739cedf5 committ latest
78a85c484f71 <none> <none>
30557a29d5ab docker latest
5ed6274db6ce <none> <none>
746b819f315e postgres 9
746b819f315e postgres 9.3
746b819f315e postgres 9.3.5
746b819f315e postgres latest
```

View File

@ -0,0 +1,89 @@
---
title: "import"
description: "The import command description and usage"
keywords: "import, file, system, container"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# import
```markdown
Usage: docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
Import the contents from a tarball to create a filesystem image
Options:
-c, --change value Apply Dockerfile instruction to the created image (default [])
--help Print usage
-m, --message string Set commit message for imported image
```
## Description
You can specify a `URL` or `-` (dash) to take data directly from `STDIN`. The
`URL` can point to an archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz)
containing a filesystem or to an individual file on the Docker host. If you
specify an archive, Docker untars it in the container relative to the `/`
(root). If you specify an individual file, you must specify the full path within
the host. To import from a remote location, specify a `URI` that begins with the
`http://` or `https://` protocol.
The `--change` option will apply `Dockerfile` instructions to the image
that is created.
Supported `Dockerfile` instructions:
`CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
## Examples
### Import from a remote location
This will create a new untagged image.
```bash
$ docker import http://example.com/exampleimage.tgz
```
### Import from a local file
- Import to docker via pipe and `STDIN`.
```bash
$ cat exampleimage.tgz | docker import - exampleimagelocal:new
```
- Import with a commit message.
```bash
$ cat exampleimage.tgz | docker import --message "New image imported from tarball" - exampleimagelocal:new
```
- Import to docker from a local archive.
```bash
$ docker import /path/to/exampleimage.tgz
```
### Import from a local directory
```bash
$ sudo tar -c . | docker import - exampleimagedir
```
### Import from a local directory with new configurations
```bash
$ sudo tar -c . | docker import --change "ENV DEBUG true" - exampleimagedir
```
Note the `sudo` in this example you must preserve
the ownership of the files (especially root ownership) during the
archiving with tar. If you are not root (or the sudo command) when you
tar, then the ownerships might not get preserved.

View File

@ -0,0 +1,184 @@
---
title: "Docker commands"
description: "Docker's CLI command description and usage"
keywords: "Docker, Docker documentation, CLI, command line"
identifier: "smn_cli_guide"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# The Docker commands
This section contains reference information on using Docker's command line
client. Each command has a reference page along with samples. If you are
unfamiliar with the command line, you should start by reading about how to [Use
the Docker command line](cli.md).
You start the Docker daemon with the command line. How you start the daemon
affects your Docker containers. For that reason you should also make sure to
read the [`dockerd`](dockerd.md) reference page.
## Commands by object
### Docker management commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [dockerd](dockerd.md) | Launch the Docker daemon |
| [info](info.md) | Display system-wide information |
| [inspect](inspect.md)| Return low-level information on a container or image |
| [version](version.md) | Show the Docker version information |
### Image commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [build](build.md) | Build an image from a Dockerfile |
| [commit](commit.md) | Create a new image from a container's changes |
| [history](history.md) | Show the history of an image |
| [images](images.md) | List images |
| [import](import.md) | Import the contents from a tarball to create a filesystem image |
| [load](load.md) | Load an image from a tar archive or STDIN |
| [image prune](image_prune.md) | Remove unused images |
| [rmi](rmi.md) | Remove one or more images |
| [save](save.md) | Save images to a tar archive |
| [tag](tag.md) | Tag an image into a repository |
### Container commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [attach](attach.md) | Attach to a running container |
| [container prune](container_prune.md) | Remove all stopped containers |
| [cp](cp.md) | Copy files/folders from a container to a HOSTDIR or to STDOUT |
| [create](create.md) | Create a new container |
| [diff](diff.md) | Inspect changes on a container's filesystem |
| [events](events.md) | Get real time events from the server |
| [exec](exec.md) | Run a command in a running container |
| [export](export.md) | Export a container's filesystem as a tar archive |
| [kill](kill.md) | Kill a running container |
| [logs](logs.md) | Fetch the logs of a container |
| [pause](pause.md) | Pause all processes within a container |
| [port](port.md) | List port mappings or a specific mapping for the container |
| [ps](ps.md) | List containers |
| [rename](rename.md) | Rename a container |
| [restart](restart.md) | Restart a running container |
| [rm](rm.md) | Remove one or more containers |
| [run](run.md) | Run a command in a new container |
| [start](start.md) | Start one or more stopped containers |
| [stats](stats.md) | Display a live stream of container(s) resource usage statistics |
| [stop](stop.md) | Stop a running container |
| [top](top.md) | Display the running processes of a container |
| [unpause](unpause.md) | Unpause all processes within a container |
| [update](update.md) | Update configuration of one or more containers |
| [wait](wait.md) | Block until a container stops, then print its exit code |
### Hub and registry commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [login](login.md) | Register or log in to a Docker registry |
| [logout](logout.md) | Log out from a Docker registry |
| [pull](pull.md) | Pull an image or a repository from a Docker registry |
| [push](push.md) | Push an image or a repository to a Docker registry |
| [search](search.md) | Search the Docker Hub for images |
### Network and connectivity commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [network connect](network_connect.md) | Connect a container to a network |
| [network create](network_create.md) | Create a new network |
| [network disconnect](network_disconnect.md) | Disconnect a container from a network |
| [network inspect](network_inspect.md) | Display information about a network |
| [network ls](network_ls.md) | Lists all the networks the Engine `daemon` knows about |
| [network prune](network_prune.md) | Remove all unused networks |
| [network rm](network_rm.md) | Removes one or more networks |
### Shared data volume commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [volume create](volume_create.md) | Creates a new volume where containers can consume and store data |
| [volume inspect](volume_inspect.md) | Display information about a volume |
| [volume ls](volume_ls.md) | Lists all the volumes Docker knows about |
| [volume prune](volume_prune.md) | Remove all unused volumes |
| [volume rm](volume_rm.md) | Remove one or more volumes |
### Swarm node commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [node demote](node_demote.md) | Demotes an existing manager so that it is no longer a manager |
| [node inspect](node_inspect.md) | Inspect a node in the swarm |
| [node ls](node_ls.md) | List nodes in the swarm |
| [node promote](node_promote.md) | Promote a node that is pending a promotion to manager |
| [node ps](node_ps.md) | List tasks running on one or more nodes |
| [node rm](node_rm.md) | Remove one or more nodes from the swarm |
| [node update](node_update.md) | Update attributes for a node |
### Swarm management commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [swarm init](swarm_init.md) | Initialize a swarm |
| [swarm join](swarm_join.md) | Join a swarm as a manager node or worker node |
| [swarm leave](swarm_leave.md) | Remove the current node from the swarm |
| [swarm join-token](swarm_join_token.md) | Display or rotate join tokens |
| [swarm unlock](swarm_unlock.md) | Unlock swarm |
| [swarm unlock-key](swarm_unlock_key.md) | Manage the unlock key |
| [swarm update](swarm_update.md) | Update attributes of a swarm |
### Swarm service commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [service create](service_create.md) | Create a new service |
| [service inspect](service_inspect.md) | Inspect a service |
| [service logs](service_logs.md) | Fetch the logs of a service or task |
| [service ls](service_ls.md) | List services in the swarm |
| [service ps](service_ps.md) | List the tasks of a service |
| [service rm](service_rm.md) | Remove a service from the swarm |
| [service scale](service_scale.md) | Set the number of replicas for the desired state of the service |
| [service update](service_update.md) | Update the attributes of a service |
### Swarm secret commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [secret create](secret_create.md) | Create a secret from a file or STDIN as content |
| [secret inspect](service_inspect.md) | Inspect the specified secret |
| [secret ls](secret_ls.md) | List secrets in the swarm |
| [secret rm](secret_rm.md) | Remove the specified secrets from the swarm |
### Swarm stack commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [stack deploy](stack_deploy.md) | Deploy a new stack or update an existing stack |
| [stack ls](stack_ls.md) | List stacks in the swarm |
| [stack ps](stack_ps.md) | List the tasks in the stack |
| [stack rm](stack_rm.md) | Remove the stack from the swarm |
| [stack services](stack_services.md) | List the services in the stack |
### Plugin commands
| Command | Description |
|:--------|:-------------------------------------------------------------------|
| [plugin create](plugin_create.md) | Create a plugin from a rootfs and configuration |
| [plugin disable](plugin_disable.md) | Disable a plugin |
| [plugin enable](plugin_enable.md) | Enable a plugin |
| [plugin inspect](plugin_inspect.md) | Display detailed information on a plugin |
| [plugin install](plugin_install.md) | Install a plugin |
| [plugin ls](plugin_ls.md) | List plugins |
| [plugin push](plugin_push.md) | Push a plugin to a registry |
| [plugin rm](plugin_rm.md) | Remove a plugin |
| [plugin set](plugin_set.md) | Change settings for a plugin |

View File

@ -0,0 +1,245 @@
---
title: "info"
description: "The info command description and usage"
keywords: "display, docker, information"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# info
```markdown
Usage: docker info [OPTIONS]
Display system-wide information
Options:
-f, --format string Format the output using the given Go template
--help Print usage
```
## Description
This command displays system wide information regarding the Docker installation.
Information displayed includes the kernel version, number of containers and images.
The number of images shown is the number of unique images. The same image tagged
under different names is counted only once.
If a format is specified, the given template will be executed instead of the
default format. Go's [text/template](http://golang.org/pkg/text/template/) package
describes all the details of the format.
Depending on the storage driver in use, additional information can be shown, such
as pool name, data file, metadata file, data space used, total data space, metadata
space used, and total metadata space.
The data file is where the images are stored and the metadata file is where the
meta data regarding those images are stored. When run for the first time Docker
allocates a certain amount of data space and meta data space from the space
available on the volume where `/var/lib/docker` is mounted.
## Examples
### Show output
The example below shows the output for a daemon running on Red Hat Enterprise Linux,
using the `devicemapper` storage driver. As can be seen in the output, additional
information about the `devicemapper` storage driver is shown:
```bash
$ docker info
Containers: 14
Running: 3
Paused: 1
Stopped: 10
Images: 52
Server Version: 1.10.3
Storage Driver: devicemapper
Pool Name: docker-202:2-25583803-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 1.68 GB
Data Space Total: 107.4 GB
Data Space Available: 7.548 GB
Metadata Space Used: 2.322 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.145 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.107-RHEL7 (2015-12-01)
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: null host bridge
Kernel Version: 3.10.0-327.el7.x86_64
Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 991.7 MiB
Name: ip-172-30-0-91.ec2.internal
ID: I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Username: gordontheturtle
Registry: https://index.docker.io/v1/
Insecure registries:
myinsecurehost:5000
127.0.0.0/8
```
### Show debugging output
Here is a sample output for a daemon running on Ubuntu, using the overlay2
storage driver and a node that is part of a 2-node swarm:
```bash
$ docker -D info
Containers: 14
Running: 3
Paused: 1
Stopped: 10
Images: 52
Server Version: 1.13.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: active
NodeID: rdjq45w1op418waxlairloqbm
Is Manager: true
ClusterID: te8kdyw33n36fqiz74bfjeixd
Managers: 1
Nodes: 2
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Root Rotation In Progress: false
Node Address: 172.16.66.128 172.16.66.129
Manager Addresses:
172.16.66.128:2477
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8517738ba4b82aff5662c97ca4627e7e4d03b531
runc version: ac031b5bf1cc92239461125f4c1ffb760522bbf2
init version: N/A (expected: v0.13.0)
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-31-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.937 GiB
Name: ubuntu
ID: H52R:7ZR6:EIIA:76JG:ORIY:BVKF:GSFU:HNPG:B5MK:APSC:SZ3Q:N326
Docker Root Dir: /var/lib/docker
Debug Mode (client): true
Debug Mode (server): true
File Descriptors: 30
Goroutines: 123
System Time: 2016-11-12T17:24:37.955404361-08:00
EventsListeners: 0
Http Proxy: http://test:test@proxy.example.com:8080
Https Proxy: https://test:test@proxy.example.com:8080
No Proxy: localhost,127.0.0.1,docker-registry.somecorporation.com
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Labels:
storage=ssd
staging=true
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
http://192.168.1.2/
http://registry-mirror.example.com:5000/
Live Restore Enabled: false
```
The global `-D` option causes all `docker` commands to output debug information.
### Format the output
You can also specify the output format:
```bash
$ docker info --format '{{json .}}'
{"ID":"I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S","Containers":14, ...}
```
### Run `docker info` on Windows
Here is a sample output for a daemon running on Windows Server 2016:
```none
E:\docker>docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 17
Server Version: 1.13.0
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: nat null overlay
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.206.amd64fre.rs1_release.160912-1937)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 3.999 GiB
Name: WIN-V0V70C0LU5P
ID: NYMS:B5VK:UMSL:FVDZ:EWB5:FKVK:LPFL:FJMQ:H6FT:BZJ6:L2TD:XH62
Docker Root Dir: C:\control
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
http://192.168.1.2/
http://registry-mirror.example.com:5000/
Live Restore Enabled: false
```

View File

@ -0,0 +1,122 @@
---
title: "inspect"
description: "The inspect command description and usage"
keywords: "inspect, container, json"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# inspect
```markdown
Usage: docker inspect [OPTIONS] NAME|ID [NAME|ID...]
Return low-level information on Docker object(s) (e.g. container, image, volume,
network, node, service, or task) identified by name or ID
Options:
-f, --format Format the output using the given Go template
--help Print usage
-s, --size Display total file sizes if the type is container
--type Return JSON for specified type
```
## Description
Docker inspect provides detailed information on constructs controlled by Docker.
By default, `docker inspect` will render results in a JSON array.
## Request a custom response format (--format)
If a format is specified, the given template will be executed for each result.
Go's [text/template](http://golang.org/pkg/text/template/) package
describes all the details of the format.
## Specify target type (--type)
`--type container|image|node|network|secret|service|volume|task|plugin`
The `docker inspect` command matches any type of object by either ID or name.
In some cases multiple type of objects (for example, a container and a volume)
exist with the same name, making the result ambigious.
To restrict `docker inspect` to a specific type of object, use the `--type`
option.
The following example inspects a _volume_ named "myvolume"
```bash
$ docker inspect --type=volume myvolume
```
## Examples
### Get an instance's IP address
For the most part, you can pick out any field from the JSON in a fairly
straightforward manner.
```bash
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $INSTANCE_ID
```
### Get an instance's MAC address
```bash
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.MacAddress}}{{end}}' $INSTANCE_ID
```
### Get an instance's log path
```bash
$ docker inspect --format='{{.LogPath}}' $INSTANCE_ID
```
### Get an instance's image name
```bash
$ docker inspect --format='{{.Config.Image}}' $INSTANCE_ID
```
### List all port bindings
You can loop over arrays and maps in the results to produce simple text
output:
```bash
$ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
```
### Find a specific port mapping
The `.Field` syntax doesn't work when the field name begins with a
number, but the template language's `index` function does. The
`.NetworkSettings.Ports` section contains a map of the internal port
mappings to a list of external address/port objects. To grab just the
numeric public port, you use `index` to find the specific port map, and
then `index` 0 contains the first object inside of that. Then we ask for
the `HostPort` field to get the public address.
```bash
$ docker inspect --format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID
```
### Get a subsection in JSON format
If you request a field which is itself a structure containing other
fields, by default you get a Go-style dump of the inner values.
Docker adds a template function, `json`, which can be applied to get
results in JSON format.
```bash
$ docker inspect --format='{{json .Config}}' $INSTANCE_ID
```

View File

@ -0,0 +1,35 @@
---
title: "kill"
description: "The kill command description and usage"
keywords: "container, kill, signal"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# kill
```markdown
Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
Kill one or more running containers
Options:
--help Print usage
-s, --signal string Signal to send to the container (default "KILL")
```
## Description
The main process inside the container will be sent `SIGKILL`, or any
signal specified with option `--signal`.
> **Note**: `ENTRYPOINT` and `CMD` in the *shell* form run as a subcommand of
> `/bin/sh -c`, which does not pass signals. This means that the executable is
> not the containers PID 1 and does not receive Unix signals.

View File

@ -0,0 +1,62 @@
---
title: "load"
description: "The load command description and usage"
keywords: "stdin, tarred, repository"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# load
```markdown
Usage: docker load [OPTIONS]
Load an image from a tar archive or STDIN
Options:
--help Print usage
-i, --input string Read from tar archive file, instead of STDIN.
The tarball may be compressed with gzip, bzip, or xz
-q, --quiet Suppress the load output but still outputs the imported images
```
## Description
`docker load` loads a tarred repository from a file or the standard input stream.
It restores both images and tags.
## Examples
```bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker load < busybox.tar.gz
Loaded image: busybox:latest
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox latest 769b9341d937 7 weeks ago 2.489 MB
$ docker load --input fedora.tar
Loaded image: fedora:rawhide
Loaded image: fedora:20
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox latest 769b9341d937 7 weeks ago 2.489 MB
fedora rawhide 0d20aec6529d 7 weeks ago 387 MB
fedora 20 58394af37342 7 weeks ago 385.5 MB
fedora heisenbug 58394af37342 7 weeks ago 385.5 MB
fedora latest 58394af37342 7 weeks ago 385.5 MB
```

View File

@ -0,0 +1,158 @@
---
title: "login"
description: "The login command description and usage"
keywords: "registry, login, image"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# login
```markdown
Usage: docker login [OPTIONS] [SERVER]
Log in to a Docker registry.
If no server is specified, the default is defined by the daemon.
Options:
--help Print usage
-p, --password string Password
-u, --username string Username
```
## Description
Login to a registry.
### Login to a self-hosted registry
If you want to login to a self-hosted registry you can specify this by
adding the server name.
```bash
$ docker login localhost:8080
```
### Privileged user requirement
`docker login` requires user to use `sudo` or be `root`, except when:
1. connecting to a remote daemon, such as a `docker-machine` provisioned `docker engine`.
2. user is added to the `docker` group. This will impact the security of your system; the `docker` group is `root` equivalent. See [Docker Daemon Attack Surface](https://docs.docker.com/security/security/#docker-daemon-attack-surface) for details.
You can log into any public or private repository for which you have
credentials. When you log in, the command stores encoded credentials in
`$HOME/.docker/config.json` on Linux or `%USERPROFILE%/.docker/config.json` on Windows.
### Credentials store
The Docker Engine can keep user credentials in an external credentials store,
such as the native keychain of the operating system. Using an external store
is more secure than storing credentials in the Docker configuration file.
To use a credentials store, you need an external helper program to interact
with a specific keychain or external store. Docker requires the helper
program to be in the client's host `$PATH`.
This is the list of currently available credentials helpers and where
you can download them from:
- D-Bus Secret Service: https://github.com/docker/docker-credential-helpers/releases
- Apple macOS keychain: https://github.com/docker/docker-credential-helpers/releases
- Microsoft Windows Credential Manager: https://github.com/docker/docker-credential-helpers/releases
You need to specify the credentials store in `$HOME/.docker/config.json`
to tell the docker engine to use it. The value of the config property should be
the suffix of the program to use (i.e. everything after `docker-credential-`).
For example, to use `docker-credential-osxkeychain`:
```json
{
"credsStore": "osxkeychain"
}
```
If you are currently logged in, run `docker logout` to remove
the credentials from the file and run `docker login` again.
### Credential helper protocol
Credential helpers can be any program or script that follows a very simple protocol.
This protocol is heavily inspired by Git, but it differs in the information shared.
The helpers always use the first argument in the command to identify the action.
There are only three possible values for that argument: `store`, `get`, and `erase`.
The `store` command takes a JSON payload from the standard input. That payload carries
the server address, to identify the credential, the user name, and either a password
or an identity token.
```json
{
"ServerURL": "https://index.docker.io/v1",
"Username": "david",
"Secret": "passw0rd1"
}
```
If the secret being stored is an identity token, the Username should be set to
`<token>`.
The `store` command can write error messages to `STDOUT` that the docker engine
will show if there was an issue.
The `get` command takes a string payload from the standard input. That payload carries
the server address that the docker engine needs credentials for. This is
an example of that payload: `https://index.docker.io/v1`.
The `get` command writes a JSON payload to `STDOUT`. Docker reads the user name
and password from this payload:
```json
{
"Username": "david",
"Secret": "passw0rd1"
}
```
The `erase` command takes a string payload from `STDIN`. That payload carries
the server address that the docker engine wants to remove credentials for. This is
an example of that payload: `https://index.docker.io/v1`.
The `erase` command can write error messages to `STDOUT` that the docker engine
will show if there was an issue.
### Credential helpers
Credential helpers are similar to the credential store above, but act as the
designated programs to handle credentials for *specific registries*. The default
credential store (`credsStore` or the config file itself) will not be used for
operations concerning credentials of the specified registries.
### Logging out
If you are currently logged in, run `docker logout` to remove
the credentials from the default store.
Credential helpers are specified in a similar way to `credsStore`, but
allow for multiple helpers to be configured at a time. Keys specify the
registry domain, and values specify the suffix of the program to use
(i.e. everything after `docker-credential-`).
For example:
```json
{
"credHelpers": {
"registry.example.com": "registryhelper",
"awesomereg.example.org": "hip-star",
"unicorn.example.io": "vcbait"
}
}
```

View File

@ -0,0 +1,32 @@
---
title: "logout"
description: "The logout command description and usage"
keywords: "logout, docker, registry"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# logout
```markdown
Usage: docker logout [SERVER]
Log out from a Docker registry.
If no server is specified, the default is defined by the daemon.
Options:
--help Print usage
```
## Examples
```bash
$ docker logout localhost:8080
```

View File

@ -0,0 +1,68 @@
---
title: "logs"
description: "The logs command description and usage"
keywords: "logs, retrieve, docker"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# logs
```markdown
Usage: docker logs [OPTIONS] CONTAINER
Fetch the logs of a container
Options:
--details Show extra details provided to logs
-f, --follow Follow log output
--help Print usage
--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
--tail string Number of lines to show from the end of the logs (default "all")
-t, --timestamps Show timestamps
```
## Description
The `docker logs` command batch-retrieves logs present at the time of execution.
> **Note**: this command is only functional for containers that are started with
> the `json-file` or `journald` logging driver.
For more information about selecting and configuring logging drivers, refer to
[Configure logging drivers](https://docs.docker.com/engine/admin/logging/overview/).
The `docker logs --follow` command will continue streaming the new output from
the container's `STDOUT` and `STDERR`.
Passing a negative number or a non-integer to `--tail` is invalid and the
value is set to `all` in that case.
The `docker logs --timestamps` command will add an [RFC3339Nano timestamp](https://golang.org/pkg/time/#pkg-constants)
, for example `2014-09-16T06:17:46.000000000Z`, to each
log entry. To ensure that the timestamps are aligned the
nano-second part of the timestamp will be padded with zero when necessary.
The `docker logs --details` command will add on extra attributes, such as
environment variables and labels, provided to `--log-opt` when creating the
container.
The `--since` option shows only the container logs generated after
a given date. You can specify the date as an RFC 3339 date, a UNIX
timestamp, or a Go duration string (e.g. `1m30s`, `3h`). Besides RFC3339 date
format you may also use RFC3339Nano, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
timezone on the client will be used if you do not provide either a `Z` or a
`+-00:00` timezone offset at the end of the timestamp. When providing Unix
timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
fraction of a second no more than nine digits long. You can combine the
`--since` option with either or both of the `--follow` or `--tail` options.

View File

@ -0,0 +1,51 @@
---
title: "network"
description: "The network command description and usage"
keywords: "network"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network
```markdown
Usage: docker network COMMAND
Manage networks
Options:
--help Print usage
Commands:
connect Connect a container to a network
create Create a network
disconnect Disconnect a container from a network
inspect Display detailed information on one or more networks
ls List networks
prune Remove all unused networks
rm Remove one or more networks
Run 'docker network COMMAND --help' for more information on a command.
```
## Description
Manage networks. You can use subcommands to create, inspect, list, remove,
prune, connect, and disconnect networks.
## Related commands
* [network create](network_create.md)
* [network inspect](network_inspect.md)
* [network list](network_list.md)
* [network rm](network_rm.md)
* [network prune](network_prune.md)
* [network connect](network_connect.md)
* [network disconnect](network_disconnect.md)

View File

@ -0,0 +1,117 @@
---
title: "network connect"
description: "The network connect command description and usage"
keywords: "network, connect, user-defined"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network connect
```markdown
Usage: docker network connect [OPTIONS] NETWORK CONTAINER
Connect a container to a network
Options:
--alias value Add network-scoped alias for the container (default [])
--help Print usage
--ip string IPv4 address (e.g., 172.30.100.104)
--ip6 string IPv6 address (e.g., 2001:db8::33)
--link value Add link to another container (default [])
--link-local-ip value Add a link-local address for the container (default [])
```
## Description
Connects a container to a network. You can connect a container by name
or by ID. Once connected, the container can communicate with other containers in
the same network.
## Examples
### Connect a running container to a network
```bash
$ docker network connect multi-host-network container1
```
### Connect a container to a network when it starts
You can also use the `docker run --network=<network-name>` option to start a container and immediately connect it to a network.
```bash
$ docker run -itd --network=multi-host-network busybox
```
### Specify the IP address a container will use on a given network
You can specify the IP address you want to be assigned to the container's interface.
```bash
$ docker network connect --ip 10.10.36.122 multi-host-network container2
```
### Use the legacy `--link` option
You can use `--link` option to link another container with a preferred alias
```bash
$ docker network connect --link container1:c1 multi-host-network container2
```
### Create a network alias for a container
`--alias` option can be used to resolve the container by another name in the network
being connected to.
```bash
$ docker network connect --alias db --alias mysql multi-host-network container2
```
### Network implications of stopping, pausing, or restarting containers
You can pause, restart, and stop containers that are connected to a network.
A container connects to its configured networks when it runs.
If specified, the container's IP address(es) is reapplied when a stopped
container is restarted. If the IP address is no longer available, the container
fails to start. One way to guarantee that the IP address is available is
to specify an `--ip-range` when creating the network, and choose the static IP
address(es) from outside that range. This ensures that the IP address is not
given to another container while this container is not on the network.
```bash
$ docker network create --subnet 172.20.0.0/16 --ip-range 172.20.240.0/20 multi-host-network
```
```bash
$ docker network connect --ip 172.20.128.2 multi-host-network container2
```
To verify the container is connected, use the `docker network inspect` command. Use `docker network disconnect` to remove a container from the network.
Once connected in network, containers can communicate using only another
container's IP address or name. For `overlay` networks or custom plugins that
support multi-host connectivity, containers connected to the same multi-host
network but launched from different Engines can also communicate in this way.
You can connect a container to one or more networks. The networks need not be the same type. For example, you can connect a single container bridge and overlay networks.
## Related commands
* [network inspect](network_inspect.md)
* [network create](network_create.md)
* [network disconnect](network_disconnect.md)
* [network ls](network_ls.md)
* [network rm](network_rm.md)
* [network prune](network_prune.md)
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)
* [Work with networks](https://docs.docker.com/engine/userguide/networking/work-with-networks/)

View File

@ -0,0 +1,227 @@
---
title: "network create"
description: "The network create command description and usage"
keywords: "network, create"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network create
```markdown
Usage: docker network create [OPTIONS] NETWORK
Create a network
Options:
--attachable Enable manual container attachment
--ingress Specify the network provides the routing-mesh
--aux-address value Auxiliary IPv4 or IPv6 addresses used by Network
driver (default map[])
-d, --driver string Driver to manage the Network (default "bridge")
--gateway value IPv4 or IPv6 Gateway for the master subnet (default [])
--help Print usage
--internal Restrict external access to the network
--ip-range value Allocate container ip from a sub-range (default [])
--ipam-driver string IP Address Management Driver (default "default")
--ipam-opt value Set IPAM driver specific options (default map[])
--ipv6 Enable IPv6 networking
--label value Set metadata on a network (default [])
-o, --opt value Set driver specific options (default map[])
--subnet value Subnet in CIDR format that represents a
network segment (default [])
--scope value Promote a network to swarm scope (value = [ local | swarm ])
--config-only Creates a configuration only network
--config-from The name of the network from which copying the configuration
```
## Description
Creates a new network. The `DRIVER` accepts `bridge` or `overlay` which are the
built-in network drivers. If you have installed a third party or your own custom
network driver you can specify that `DRIVER` here also. If you don't specify the
`--driver` option, the command automatically creates a `bridge` network for you.
When you install Docker Engine it creates a `bridge` network automatically. This
network corresponds to the `docker0` bridge that Engine has traditionally relied
on. When you launch a new container with `docker run` it automatically connects to
this bridge network. You cannot remove this default bridge network, but you can
create new ones using the `network create` command.
```bash
$ docker network create -d bridge my-bridge-network
```
Bridge networks are isolated networks on a single Engine installation. If you
want to create a network that spans multiple Docker hosts each running an
Engine, you must create an `overlay` network. Unlike `bridge` networks, overlay
networks require some pre-existing conditions before you can create one. These
conditions are:
* Access to a key-value store. Engine supports Consul, Etcd, and ZooKeeper (Distributed store) key-value stores.
* A cluster of hosts with connectivity to the key-value store.
* A properly configured Engine `daemon` on each host in the cluster.
The `dockerd` options that support the `overlay` network are:
* `--cluster-store`
* `--cluster-store-opt`
* `--cluster-advertise`
To read more about these options and how to configure them, see ["*Get started
with multi-host network*"](https://docs.docker.com/engine/userguide/networking/get-started-overlay).
While not required, it is a good idea to install Docker Swarm to
manage the cluster that makes up your network. Swarm provides sophisticated
discovery and server management tools that can assist your implementation.
Once you have prepared the `overlay` network prerequisites you simply choose a
Docker host in the cluster and issue the following to create the network:
```bash
$ docker network create -d overlay my-multihost-network
```
Network names must be unique. The Docker daemon attempts to identify naming
conflicts but this is not guaranteed. It is the user's responsibility to avoid
name conflicts.
## Examples
### Connect containers
When you start a container, use the `--network` flag to connect it to a network.
This example adds the `busybox` container to the `mynet` network:
```bash
$ docker run -itd --network=mynet busybox
```
If you want to add a container to a network after the container is already
running, use the `docker network connect` subcommand.
You can connect multiple containers to the same network. Once connected, the
containers can communicate using only another container's IP address or name.
For `overlay` networks or custom plugins that support multi-host connectivity,
containers connected to the same multi-host network but launched from different
Engines can also communicate in this way.
You can disconnect a container from a network using the `docker network
disconnect` command.
### Specify advanced options
When you create a network, Engine creates a non-overlapping subnetwork for the
network by default. This subnetwork is not a subdivision of an existing
network. It is purely for ip-addressing purposes. You can override this default
and specify subnetwork values directly using the `--subnet` option. On a
`bridge` network you can only create a single subnet:
```bash
$ docker network create --driver=bridge --subnet=192.168.0.0/16 br0
```
Additionally, you also specify the `--gateway` `--ip-range` and `--aux-address`
options.
```bash
$ docker network create \
--driver=bridge \
--subnet=172.28.0.0/16 \
--ip-range=172.28.5.0/24 \
--gateway=172.28.5.254 \
br0
```
If you omit the `--gateway` flag the Engine selects one for you from inside a
preferred pool. For `overlay` networks and for network driver plugins that
support it you can create multiple subnetworks.
```bash
$ docker network create -d overlay \
--subnet=192.168.0.0/16 \
--subnet=192.170.0.0/16 \
--gateway=192.168.0.100 \
--gateway=192.170.0.100 \
--ip-range=192.168.1.0/24 \
--aux-address="my-router=192.168.1.5" --aux-address="my-switch=192.168.1.6" \
--aux-address="my-printer=192.170.1.5" --aux-address="my-nas=192.170.1.6" \
my-multihost-network
```
Be sure that your subnetworks do not overlap. If they do, the network create
fails and Engine returns an error.
### Bridge driver options
When creating a custom network, the default network driver (i.e. `bridge`) has
additional options that can be passed. The following are those options and the
equivalent docker daemon flags used for docker0 bridge:
| Option | Equivalent | Description |
|--------------------------------------------------|-------------|-------------------------------------------------------|
| `com.docker.network.bridge.name` | - | bridge name to be used when creating the Linux bridge |
| `com.docker.network.bridge.enable_ip_masquerade` | `--ip-masq` | Enable IP masquerading |
| `com.docker.network.bridge.enable_icc` | `--icc` | Enable or Disable Inter Container Connectivity |
| `com.docker.network.bridge.host_binding_ipv4` | `--ip` | Default IP when binding container ports |
| `com.docker.network.driver.mtu` | `--mtu` | Set the containers network MTU |
The following arguments can be passed to `docker network create` for any
network driver, again with their approximate equivalents to `docker daemon`.
| Argument | Equivalent | Description |
|--------------|----------------|--------------------------------------------|
| `--gateway` | - | IPv4 or IPv6 Gateway for the master subnet |
| `--ip-range` | `--fixed-cidr` | Allocate IPs from a range |
| `--internal` | - | Restrict external access to the network |
| `--ipv6` | `--ipv6` | Enable IPv6 networking |
| `--subnet` | `--bip` | Subnet for network |
For example, let's use `-o` or `--opt` options to specify an IP address binding
when publishing ports:
```bash
$ docker network create \
-o "com.docker.network.bridge.host_binding_ipv4"="172.19.0.1" \
simple-network
```
### Network internal mode
By default, when you connect a container to an `overlay` network, Docker also
connects a bridge network to it to provide external connectivity. If you want
to create an externally isolated `overlay` network, you can specify the
`--internal` option.
### Network ingress mode
You can create the network which will be used to provide the routing-mesh in the
swarm cluster. You do so by specifying `--ingress` when creating the network. Only
one ingress network can be created at the time. The network can be removed only
if no services depend on it. Any option available when creating a overlay network
is also available when creating the ingress network, besides the `--attachable` option.
```bash
$ docker network create -d overlay \
--subnet=10.11.0.0/16 \
--ingress \
--opt com.docker.network.mtu=9216 \
--opt encrypted=true \
my-ingress-network
```
## Related commands
* [network inspect](network_inspect.md)
* [network connect](network_connect.md)
* [network disconnect](network_disconnect.md)
* [network ls](network_ls.md)
* [network rm](network_rm.md)
* [network prune](network_prune.md)
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)

View File

@ -0,0 +1,48 @@
---
title: "network disconnect"
description: "The network disconnect command description and usage"
keywords: "network, disconnect, user-defined"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network disconnect
```markdown
Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER
Disconnect a container from a network
Options:
-f, --force Force the container to disconnect from a network
--help Print usage
```
## Description
Disconnects a container from a network. The container must be running to
disconnect it from the network.
## Examples
```bash
$ docker network disconnect multi-host-network container1
```
## Related commands
* [network inspect](network_inspect.md)
* [network connect](network_connect.md)
* [network create](network_create.md)
* [network ls](network_ls.md)
* [network rm](network_rm.md)
* [network prune](network_prune.md)
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)

View File

@ -0,0 +1,307 @@
---
title: "network inspect"
description: "The network inspect command description and usage"
keywords: "network, inspect, user-defined"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network inspect
```markdown
Usage: docker network inspect [OPTIONS] NETWORK [NETWORK...]
Display detailed information on one or more networks
Options:
-f, --format string Format the output using the given Go template
--help Print usage
```
## Description
Returns information about one or more networks. By default, this command renders
all results in a JSON object.
## Examples
## Inspect the `bridge` network
Connect two containers to the default `bridge` network:
```bash
$ sudo docker run -itd --name=container1 busybox
f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27
$ sudo docker run -itd --name=container2 busybox
bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727
```
The `network inspect` command shows the containers, by id, in its
results. For networks backed by multi-host network driver, such as Overlay,
this command also shows the container endpoints in other hosts in the
cluster. These endpoints are represented as "ep-{endpoint-id}" in the output.
However, for swarm mode networks, only the endpoints that are local to the
node are shown.
You can specify an alternate format to execute a given
template for each result. Go's
[text/template](http://golang.org/pkg/text/template/) package describes all the
details of the format.
```none
$ sudo docker network inspect bridge
[
{
"Name": "bridge",
"Id": "b2b1a2cba717161d984383fd68218cf70bbbd17d328496885f7c921333228b0f",
"Created": "2016-10-19T04:33:30.360899459Z",
"Scope": "local",
"Driver": "bridge",
"IPAM": {
"Driver": "default",
"Config": [
{
"Subnet": "172.17.42.1/16",
"Gateway": "172.17.42.1"
}
]
},
"Internal": false,
"Containers": {
"bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727": {
"Name": "container2",
"EndpointID": "0aebb8fcd2b282abe1365979536f21ee4ceaf3ed56177c628eae9f706e00e019",
"MacAddress": "02:42:ac:11:00:02",
"IPv4Address": "172.17.0.2/16",
"IPv6Address": ""
},
"f2870c98fd504370fb86e59f32cd0753b1ac9b69b7d80566ffc7192a82b3ed27": {
"Name": "container1",
"EndpointID": "a00676d9c91a96bbe5bcfb34f705387a33d7cc365bac1a29e4e9728df92d10ad",
"MacAddress": "02:42:ac:11:00:01",
"IPv4Address": "172.17.0.1/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
```
### Inspect a user-defined network
Create and inspect a user-defined network:
```bash
$ docker network create simple-network
69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a
```
```none
$ docker network inspect simple-network
[
{
"Name": "simple-network",
"Id": "69568e6336d8c96bbf57869030919f7c69524f71183b44d80948bd3927c87f6a",
"Created": "2016-10-19T04:33:30.360899459Z",
"Scope": "local",
"Driver": "bridge",
"IPAM": {
"Driver": "default",
"Config": [
{
"Subnet": "172.22.0.0/16",
"Gateway": "172.22.0.1"
}
]
},
"Containers": {},
"Options": {},
"Labels": {}
}
]
```
### Inspect the `ingress` network
For swarm mode overlay networks `network inspect` also shows the IP address and node name
of the peers. Peers are the nodes in the swarm cluster which have at least one task attached
to the network. Node name is of the format `<hostname>-<unique ID>`.
```none
$ docker network inspect ingress
[
{
"Name": "ingress",
"Id": "j0izitrut30h975vk4m1u5kk3",
"Created": "2016-11-08T06:49:59.803387552Z",
"Scope": "swarm",
"Driver": "overlay",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "10.255.0.0/16",
"Gateway": "10.255.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Containers": {
"ingress-sbox": {
"Name": "ingress-endpoint",
"EndpointID": "40e002d27b7e5d75f60bc72199d8cae3344e1896abec5eddae9743755fe09115",
"MacAddress": "02:42:0a:ff:00:03",
"IPv4Address": "10.255.0.3/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
},
"Labels": {},
"Peers": [
{
"Name": "net-1-1d22adfe4d5c",
"IP": "192.168.33.11"
},
{
"Name": "net-2-d55d838b34af",
"IP": "192.168.33.12"
},
{
"Name": "net-3-8473f8140bd9",
"IP": "192.168.33.13"
}
]
}
]
```
### Using `verbose` option for `network inspect`
`docker network inspect --verbose` for swarm mode overlay networks shows service-specific
details such as the service's VIP and port mappings. It also shows IPs of service tasks,
and the IPs of the nodes where the tasks are running.
Following is an example output for a overlay network `ov1` that has one service `s1`
attached to. service `s1` in this case has three replicas.
```bash
$ docker network inspect --verbose ov1
[
{
"Name": "ov1",
"Id": "ybmyjvao9vtzy3oorxbssj13b",
"Created": "2017-03-13T17:04:39.776106792Z",
"Scope": "swarm",
"Driver": "overlay",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "10.0.0.0/24",
"Gateway": "10.0.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Containers": {
"020403bd88a15f60747fd25d1ad5fa1272eb740e8a97fc547d8ad07b2f721c5e": {
"Name": "s1.1.pjn2ik0sfgkfzed3h0s00gs9o",
"EndpointID": "ad16946f416562d658f3bb30b9830d73ad91ccf6feae44411269cd0ff674714e",
"MacAddress": "02:42:0a:00:00:04",
"IPv4Address": "10.0.0.4/24",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "4097"
},
"Labels": {},
"Peers": [
{
"Name": "net-3-5d3cfd30a58c",
"IP": "192.168.33.13"
},
{
"Name": "net-1-6ecbc0040a73",
"IP": "192.168.33.11"
},
{
"Name": "net-2-fb80208efd75",
"IP": "192.168.33.12"
}
],
"Services": {
"s1": {
"VIP": "10.0.0.2",
"Ports": [],
"LocalLBIndex": 257,
"Tasks": [
{
"Name": "s1.2.q4hcq2aiiml25ubtrtg4q1txt",
"EndpointID": "040879b027e55fb658e8b60ae3b87c6cdac7d291e86a190a3b5ac6567b26511a",
"EndpointIP": "10.0.0.5",
"Info": {
"Host IP": "192.168.33.11"
}
},
{
"Name": "s1.3.yawl4cgkp7imkfx469kn9j6lm",
"EndpointID": "106edff9f120efe44068b834e1cddb5b39dd4a3af70211378b2f7a9e562bbad8",
"EndpointIP": "10.0.0.3",
"Info": {
"Host IP": "192.168.33.12"
}
},
{
"Name": "s1.1.pjn2ik0sfgkfzed3h0s00gs9o",
"EndpointID": "ad16946f416562d658f3bb30b9830d73ad91ccf6feae44411269cd0ff674714e",
"EndpointIP": "10.0.0.4",
"Info": {
"Host IP": "192.168.33.13"
}
}
]
}
}
}
]
```
## Related commands
* [network disconnect ](network_disconnect.md)
* [network connect](network_connect.md)
* [network create](network_create.md)
* [network ls](network_ls.md)
* [network rm](network_rm.md)
* [network prune](network_prune.md)
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)

View File

@ -0,0 +1,250 @@
---
title: "network ls"
description: "The network ls command description and usage"
keywords: "network, list, user-defined"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# docker network ls
```markdown
Usage: docker network ls [OPTIONS]
List networks
Aliases:
ls, list
Options:
-f, --filter filter Provide filter values (e.g. 'driver=bridge')
--format string Pretty-print networks using a Go template
--help Print usage
--no-trunc Do not truncate the output
-q, --quiet Only display network IDs
```
## Description
Lists all the networks the Engine `daemon` knows about. This includes the
networks that span across multiple hosts in a cluster.
## Examples
### List all networks
```bash
$ sudo docker network ls
NETWORK ID NAME DRIVER SCOPE
7fca4eb8c647 bridge bridge local
9f904ee27bf5 none null local
cf03ee007fb4 host host local
78b03ee04fc4 multi-host overlay swarm
```
Use the `--no-trunc` option to display the full network id:
```bash
$ docker network ls --no-trunc
NETWORK ID NAME DRIVER SCOPE
18a2866682b85619a026c81b98a5e375bd33e1b0936a26cc497c283d27bae9b3 none null local
c288470c46f6c8949c5f7e5099b5b7947b07eabe8d9a27d79a9cbf111adcbf47 host host local
7b369448dccbf865d397c8d2be0cda7cf7edc6b0945f77d2529912ae917a0185 bridge bridge local
95e74588f40db048e86320c6526440c504650a1ff3e9f7d60a497c4d2163e5bd foo bridge local
63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161 dev bridge local
```
### Filtering
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there
is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`).
Multiple filter flags are combined as an `OR` filter. For example,
`-f type=custom -f type=builtin` returns both `custom` and `builtin` networks.
The currently supported filters are:
* driver
* id (network's id)
* label (`label=<key>` or `label=<key>=<value>`)
* name (network's name)
* scope (`swarm|global|local`)
* type (`custom|builtin`)
#### Driver
The `driver` filter matches networks based on their driver.
The following example matches networks with the `bridge` driver:
```bash
$ docker network ls --filter driver=bridge
NETWORK ID NAME DRIVER SCOPE
db9db329f835 test1 bridge local
f6e212da9dfd test2 bridge local
```
#### ID
The `id` filter matches on all or part of a network's ID.
The following filter matches all networks with an ID containing the
`63d1ff1f77b0...` string.
```bash
$ docker network ls --filter id=63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161
NETWORK ID NAME DRIVER SCOPE
63d1ff1f77b0 dev bridge local
```
You can also filter for a substring in an ID as this shows:
```bash
$ docker network ls --filter id=95e74588f40d
NETWORK ID NAME DRIVER SCOPE
95e74588f40d foo bridge local
$ docker network ls --filter id=95e
NETWORK ID NAME DRIVER SCOPE
95e74588f40d foo bridge local
```
#### Label
The `label` filter matches networks based on the presence of a `label` alone or a `label` and a
value.
The following filter matches networks with the `usage` label regardless of its value.
```bash
$ docker network ls -f "label=usage"
NETWORK ID NAME DRIVER SCOPE
db9db329f835 test1 bridge local
f6e212da9dfd test2 bridge local
```
The following filter matches networks with the `usage` label with the `prod` value.
```bash
$ docker network ls -f "label=usage=prod"
NETWORK ID NAME DRIVER SCOPE
f6e212da9dfd test2 bridge local
```
#### Name
The `name` filter matches on all or part of a network's name.
The following filter matches all networks with a name containing the `foobar` string.
```bash
$ docker network ls --filter name=foobar
NETWORK ID NAME DRIVER SCOPE
06e7eef0a170 foobar bridge local
```
You can also filter for a substring in a name as this shows:
```bash
$ docker network ls --filter name=foo
NETWORK ID NAME DRIVER SCOPE
95e74588f40d foo bridge local
06e7eef0a170 foobar bridge local
```
#### Scope
The `scope` filter matches networks based on their scope.
The following example matches networks with the `swarm` scope:
```bash
$ docker network ls --filter scope=swarm
NETWORK ID NAME DRIVER SCOPE
xbtm0v4f1lfh ingress overlay swarm
ic6r88twuu92 swarmnet overlay swarm
```
The following example matches networks with the `local` scope:
```bash
$ docker network ls --filter scope=local
NETWORK ID NAME DRIVER SCOPE
e85227439ac7 bridge bridge local
0ca0e19443ed host host local
ca13cc149a36 localnet bridge local
f9e115d2de35 none null local
```
#### Type
The `type` filter supports two values; `builtin` displays predefined networks
(`bridge`, `none`, `host`), whereas `custom` displays user defined networks.
The following filter matches all user defined networks:
```bash
$ docker network ls --filter type=custom
NETWORK ID NAME DRIVER SCOPE
95e74588f40d foo bridge local
63d1ff1f77b0 dev bridge local
```
By having this flag it allows for batch cleanup. For example, use this filter
to delete all user defined networks:
```bash
$ docker network rm `docker network ls --filter type=custom -q`
```
A warning will be issued when trying to remove a network that has containers
attached.
### Formatting
The formatting options (`--format`) pretty-prints networks output
using a Go template.
Valid placeholders for the Go template are listed below:
Placeholder | Description
-------------|------------------------------------------------------------------------------------------
`.ID` | Network ID
`.Name` | Network name
`.Driver` | Network driver
`.Scope` | Network scope (local, global)
`.IPv6` | Whether IPv6 is enabled on the network or not.
`.Internal` | Whether the network is internal or not.
`.Labels` | All labels assigned to the network.
`.Label` | Value of a specific label for this network. For example `{{.Label "project.version"}}`
`.CreatedAt` | Time when the network was created
When using the `--format` option, the `network ls` command will either
output the data exactly as the template declares or, when using the
`table` directive, includes column headers as well.
The following example uses a template without headers and outputs the
`ID` and `Driver` entries separated by a colon for all networks:
```bash
$ docker network ls --format "{{.ID}}: {{.Driver}}"
afaaab448eb2: bridge
d1584f8dc718: host
391df270dc66: null
```
## Related commands
* [network disconnect ](network_disconnect.md)
* [network connect](network_connect.md)
* [network create](network_create.md)
* [network inspect](network_inspect.md)
* [network rm](network_rm.md)
* [network prune](network_prune.md)
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)

View File

@ -0,0 +1,104 @@
---
title: "network prune"
description: "Remove unused networks"
keywords: "network, prune, delete"
---
# network prune
```markdown
Usage: docker network prune [OPTIONS]
Remove all unused networks
Options:
--filter filter Provide filter values (e.g. 'until=<timestamp>')
-f, --force Do not prompt for confirmation
--help Print usage
```
## Description
Remove all unused networks. Unused networks are those which are not referenced
by any containers.
## Examples
```bash
$ docker network prune
WARNING! This will remove all networks not used by at least one container.
Are you sure you want to continue? [y/N] y
Deleted Networks:
n1
n2
```
### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
The currently supported filters are:
* until (`<timestamp>`) - only remove networks created before given timestamp
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove networks with (or without, in case `label!=...` is used) the specified labels.
The `until` filter can be Unix timestamps, date formatted
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
relative to the daemon machines time. Supported formats for date
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02Z07:00`, and `2006-01-02`. The local
timezone on the daemon will be used if you do not provide either a `Z` or a
`+-00:00` timezone offset at the end of the timestamp. When providing Unix
timestamps enter seconds[.nanoseconds], where seconds is the number of seconds
that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a
fraction of a second no more than nine digits long.
The `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`),
which removes networks with the specified labels. The other
format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes
networks without the specified labels.
The following removes networks created more than 5 minutes ago. Note that
system networks such as `bridge`, `host`, and `none` will never be pruned:
```none
$ docker network ls
NETWORK ID NAME DRIVER SCOPE
7430df902d7a bridge bridge local
ea92373fd499 foo-1-day-ago bridge local
ab53663ed3c7 foo-1-min-ago bridge local
97b91972bc3b host host local
f949d337b1f5 none null local
$ docker network prune --force --filter until=5m
Deleted Networks:
foo-1-day-ago
$ docker network ls
NETWORK ID NAME DRIVER SCOPE
7430df902d7a bridge bridge local
ab53663ed3c7 foo-1-min-ago bridge local
97b91972bc3b host host local
f949d337b1f5 none null local
```
## Related commands
* [network disconnect ](network_disconnect.md)
* [network connect](network_connect.md)
* [network create](network_create.md)
* [network ls](network_ls.md)
* [network inspect](network_inspect.md)
* [network rm](network_rm.md)
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)
* [system df](system_df.md)
* [container prune](container_prune.md)
* [image prune](image_prune.md)
* [volume prune](volume_prune.md)
* [system prune](system_prune.md)

View File

@ -0,0 +1,68 @@
---
title: "network rm"
description: "the network rm command description and usage"
keywords: "network, rm, user-defined"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network rm
```markdown
Usage: docker network rm NETWORK [NETWORK...]
Remove one or more networks
Aliases:
rm, remove
Options:
--help Print usage
```
## Description
Removes one or more networks by name or identifier. To remove a network,
you must first disconnect any containers connected to it.
## Examples
### Remove a network
To remove the network named 'my-network':
```bash
$ docker network rm my-network
```
### Remove multiple networks
To delete multiple networks in a single `docker network rm` command, provide
multiple network names or ids. The following example deletes a network with id
`3695c422697f` and a network named `my-network`:
```bash
$ docker network rm 3695c422697f my-network
```
When you specify multiple networks, the command attempts to delete each in turn.
If the deletion of one network fails, the command continues to the next on the
list and tries to delete that. The command reports success or failure for each
deletion.
## Related commands
* [network disconnect ](network_disconnect.md)
* [network connect](network_connect.md)
* [network create](network_create.md)
* [network ls](network_ls.md)
* [network inspect](network_inspect.md)
* [network prune](network_prune.md)
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)

View File

@ -0,0 +1,42 @@
---
title: "node"
description: "The node command description and usage"
keywords: "node"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node
```markdown
Usage: docker node COMMAND
Manage Swarm nodes
Options:
--help Print usage
Commands:
demote Demote one or more nodes from manager in the swarm
inspect Display detailed information on one or more nodes
ls List nodes in the swarm
promote Promote one or more nodes to manager in the swarm
ps List tasks running on one or more nodes, defaults to current node
rm Remove one or more nodes from the swarm
update Update a node
Run 'docker node COMMAND --help' for more information on a command.
```
## Description
Manage nodes.

View File

@ -0,0 +1,47 @@
---
title: "node demote"
description: "The node demote command description and usage"
keywords: "node, demote"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node demote
```markdown
Usage: docker node demote NODE [NODE...]
Demote one or more nodes from manager in the swarm
Options:
--help Print usage
```
## Description
Demotes an existing manager so that it is no longer a manager. This command
targets a docker engine that is a manager in the swarm.
## Examples
```bash
$ docker node demote <node name>
```
## Related commands
* [node inspect](node_inspect.md)
* [node ls](node_ls.md)
* [node promote](node_promote.md)
* [node ps](node_ps.md)
* [node rm](node_rm.md)
* [node update](node_update.md)

View File

@ -0,0 +1,167 @@
---
title: "node inspect"
description: "The node inspect command description and usage"
keywords: "node, inspect"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node inspect
```markdown
Usage: docker node inspect [OPTIONS] self|NODE [NODE...]
Display detailed information on one or more nodes
Options:
-f, --format string Format the output using the given Go template
--help Print usage
--pretty Print the information in a human friendly format
```
## Description
Returns information about a node. By default, this command renders all results
in a JSON array. You can specify an alternate format to execute a
given template for each result. Go's
[text/template](http://golang.org/pkg/text/template/) package describes all the
details of the format.
## Examples
### Inspect a node
```none
$ docker node inspect swarm-manager
[
{
"ID": "e216jshn25ckzbvmwlnh5jr3g",
"Version": {
"Index": 10
},
"CreatedAt": "2017-05-16T22:52:44.9910662Z",
"UpdatedAt": "2017-05-16T22:52:45.230878043Z",
"Spec": {
"Role": "manager",
"Availability": "active"
},
"Description": {
"Hostname": "swarm-manager",
"Platform": {
"Architecture": "x86_64",
"OS": "linux"
},
"Resources": {
"NanoCPUs": 1000000000,
"MemoryBytes": 1039843328
},
"Engine": {
"EngineVersion": "17.06.0-ce",
"Plugins": [
{
"Type": "Volume",
"Name": "local"
},
{
"Type": "Network",
"Name": "overlay"
},
{
"Type": "Network",
"Name": "null"
},
{
"Type": "Network",
"Name": "host"
},
{
"Type": "Network",
"Name": "bridge"
},
{
"Type": "Network",
"Name": "overlay"
}
]
},
"TLSInfo": {
"TrustRoot": "-----BEGIN CERTIFICATE-----\nMIIBazCCARCgAwIBAgIUOzgqU4tA2q5Yv1HnkzhSIwGyIBswCgYIKoZIzj0EAwIw\nEzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNTAyMDAyNDAwWhcNMzcwNDI3MDAy\nNDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\nA0IABMbiAmET+HZyve35ujrnL2kOLBEQhFDZ5MhxAuYs96n796sFlfxTxC1lM/2g\nAh8DI34pm3JmHgZxeBPKUURJHKWjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\nAf8EBTADAQH/MB0GA1UdDgQWBBS3sjTJOcXdkls6WSY2rTx1KIJueTAKBggqhkjO\nPQQDAgNJADBGAiEAoeVWkaXgSUAucQmZ3Yhmx22N/cq1EPBgYHOBZmHt0NkCIQC3\nzONcJ/+WA21OXtb+vcijpUOXtNjyHfcox0N8wsLDqQ==\n-----END CERTIFICATE-----\n",
"CertIssuerSubject": "MBMxETAPBgNVBAMTCHN3YXJtLWNh",
"CertIssuerPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExuICYRP4dnK97fm6OucvaQ4sERCEUNnkyHEC5iz3qfv3qwWV/FPELWUz/aACHwMjfimbcmYeBnF4E8pRREkcpQ=="
}
},
"Status": {
"State": "ready",
"Addr": "168.0.32.137"
},
"ManagerStatus": {
"Leader": true,
"Reachability": "reachable",
"Addr": "168.0.32.137:2377"
}
}
]
```
### Specify an output format
```none
$ docker node inspect --format '{{ .ManagerStatus.Leader }}' self
false
$ docker node inspect --pretty self
ID: e216jshn25ckzbvmwlnh5jr3g
Hostname: swarm-manager
Joined at: 2017-05-16 22:52:44.9910662 +0000 utc
Status:
State: Ready
Availability: Active
Address: 172.17.0.2
Manager Status:
Address: 172.17.0.2:2377
Raft Status: Reachable
Leader: Yes
Platform:
Operating System: linux
Architecture: x86_64
Resources:
CPUs: 4
Memory: 7.704 GiB
Plugins:
Network: overlay, bridge, null, host, overlay
Volume: local
Engine Version: 17.06.0-ce
TLS Info:
TrustRoot:
-----BEGIN CERTIFICATE-----
MIIBazCCARCgAwIBAgIUOzgqU4tA2q5Yv1HnkzhSIwGyIBswCgYIKoZIzj0EAwIw
EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNTAyMDAyNDAwWhcNMzcwNDI3MDAy
NDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
A0IABMbiAmET+HZyve35ujrnL2kOLBEQhFDZ5MhxAuYs96n796sFlfxTxC1lM/2g
Ah8DI34pm3JmHgZxeBPKUURJHKWjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBS3sjTJOcXdkls6WSY2rTx1KIJueTAKBggqhkjO
PQQDAgNJADBGAiEAoeVWkaXgSUAucQmZ3Yhmx22N/cq1EPBgYHOBZmHt0NkCIQC3
zONcJ/+WA21OXtb+vcijpUOXtNjyHfcox0N8wsLDqQ==
-----END CERTIFICATE-----
Issuer Public Key: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExuICYRP4dnK97fm6OucvaQ4sERCEUNnkyHEC5iz3qfv3qwWV/FPELWUz/aACHwMjfimbcmYeBnF4E8pRREkcpQ==
Issuer Subject: MBMxETAPBgNVBAMTCHN3YXJtLWNh
```
## Related commands
* [node demote](node_demote.md)
* [node ls](node_ls.md)
* [node promote](node_promote.md)
* [node ps](node_ps.md)
* [node rm](node_rm.md)
* [node update](node_update.md)

View File

@ -0,0 +1,171 @@
---
title: "node ls"
description: "The node ls command description and usage"
keywords: "node, list"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node ls
```markdown
Usage: docker node ls [OPTIONS]
List nodes in the swarm
Aliases:
ls, list
Options:
-f, --filter filter Filter output based on conditions provided
--format string Pretty-print nodes using a Go template
--help Print usage
-q, --quiet Only display IDs
```
## Description
Lists all the nodes that the Docker Swarm manager knows about. You can filter
using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section
for more information about available filter options.
## Examples
```bash
$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active
38ciaotwjuritcdtn9npbnkuz swarm-worker1 Ready Active
e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader
```
> **Note**:
> In the above example output, there is a hidden column of `.Self` that indicates if the
> node is the same node as the current docker daemon. A `*` (e.g., `e216jshn25ckzbvmwlnh5jr3g *`)
> means this node is the current docker daemon.
### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
The currently supported filters are:
* [id](node_ls.md#id)
* [label](node_ls.md#label)
* [membership](node_ls.md#membership)
* [name](node_ls.md#name)
* [role](node_ls.md#role)
#### id
The `id` filter matches all or part of a node's id.
```bash
$ docker node ls -f id=1
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active
```
#### label
The `label` filter matches nodes based on engine labels and on the presence of a `label` alone or a `label` and a value. Node labels are currently not used for filtering.
The following filter matches nodes with the `foo` label regardless of its value.
```bash
$ docker node ls -f "label=foo"
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active
```
#### membersip
The `membership` filter matches nodes based on the presence of a `membership` and a value
`accepted` or `pending`.
The following filter matches nodes with the `membership` of `accepted`.
```bash
$ docker node ls -f "membership=accepted"
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
1bcef6utixb0l0ca7gxuivsj0 swarm-worker2 Ready Active
38ciaotwjuritcdtn9npbnkuz swarm-worker1 Ready Active
```
#### name
The `name` filter matches on all or part of a node hostname.
The following filter matches the nodes with a name equal to `swarm-master` string.
```bash
$ docker node ls -f name=swarm-manager1
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader
```
#### role
The `role` filter matches nodes based on the presence of a `role` and a value `worker` or `manager`.
The following filter matches nodes with the `manager` role.
```bash
$ docker node ls -f "role=manager"
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
e216jshn25ckzbvmwlnh5jr3g * swarm-manager1 Ready Active Leader
```
### Formatting
The formatting options (`--format`) pretty-prints nodes output
using a Go template.
Valid placeholders for the Go template are listed below:
Placeholder | Description
-----------------|------------------------------------------------------------------------------------------
`.ID` | Node ID
`.Self` | Node of the daemon (`true/false`, `true`indicates that the node is the same as current docker daemon)
`.Hostname` | Node hostname
`.Status` | Node status
`.Availability` | Node availability ("active", "pause", or "drain")
`.ManagerStatus` | Manager status of the node
`.TLSStatus` | TLS status of the node ("Ready", or "Needs Rotation" has TLS certificate signed by an old CA)
When using the `--format` option, the `node ls` command will either
output the data exactly as the template declares or, when using the
`table` directive, includes column headers as well.
The following example uses a template without headers and outputs the
`ID`, `Hostname`, and `TLS Status` entries separated by a colon for all nodes:
```bash
$ docker node ls --format "{{.ID}}: {{.Hostname}} {{.TLSStatus}}"
e216jshn25ckzbvmwlnh5jr3g: swarm-manager1 Ready
35o6tiywb700jesrt3dmllaza: swarm-worker1 Needs Rotation
``
## Related commands
* [node demote](node_demote.md)
* [node inspect](node_inspect.md)
* [node promote](node_promote.md)
* [node ps](node_ps.md)
* [node rm](node_rm.md)
* [node update](node_update.md)

View File

@ -0,0 +1,45 @@
---
title: "node promote"
description: "The node promote command description and usage"
keywords: "node, promote"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node promote
```markdown
Usage: docker node promote NODE [NODE...]
Promote one or more nodes to manager in the swarm
Options:
--help Print usage
```
## Description
Promotes a node to manager. This command targets a docker engine that is a
manager in the swarm.
## Examples
```bash
$ docker node promote <node name>
```
## Related commands
* [node demote](node_demote.md)
* [node inspect](node_inspect.md)
* [node ls](node_ls.md)
* [node ps](node_ps.md)
* [node rm](node_rm.md)
* [node update](node_update.md)

View File

@ -0,0 +1,148 @@
---
title: "node ps"
description: "The node ps command description and usage"
keywords: node, tasks, ps
aliases: ["/engine/reference/commandline/node_tasks/"]
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node ps
```markdown
Usage: docker node ps [OPTIONS] [NODE...]
List tasks running on one or more nodes, defaults to current node.
Options:
-f, --filter filter Filter output based on conditions provided
--format string Pretty-print tasks using a Go template
--help Print usage
--no-resolve Do not map IDs to Names
--no-trunc Do not truncate output
-q, --quiet Only display task IDs
```
## Description
Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options.
## Examples
```bash
$ docker node ps swarm-manager1
NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds
```
### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`)
The currently supported filters are:
* [name](#name)
* [id](#id)
* [label](#label)
* [desired-state](#desired-state)
#### name
The `name` filter matches on all or part of a task's name.
The following filter matches all tasks with a name containing the `redis` string.
```bash
$ docker node ps -f name=redis swarm-manager1
NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds
```
#### id
The `id` filter matches a task's id.
```bash
$ docker node ps -f id=bg8c07zzg87di2mufeq51a2qp swarm-manager1
NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
```
#### label
The `label` filter matches tasks based on the presence of a `label` alone or a `label` and a
value.
The following filter matches tasks with the `usage` label regardless of its value.
```bash
$ docker node ps -f "label=usage"
NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 10 minutes
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 9 minutes
```
#### desired-state
The `desired-state` filter can take the values `running`, `shutdown`, or `accepted`.
### Formatting
The formatting options (`--format`) pretty-prints tasks output
using a Go template.
Valid placeholders for the Go template are listed below:
Placeholder | Description
----------------|------------------------------------------------------------------------------------------
`.Name` | Task name
`.Image` | Task image
`.Node` | Node ID
`.DesiredState` | Desired state of the task (`running`, `shutdown`, or `accepted`)
`.CurrentState` | Current state of the task
`.Error` | Error
`.Ports` | Task published ports
When using the `--format` option, the `node ps` command will either
output the data exactly as the template declares or, when using the
`table` directive, includes column headers as well.
The following example uses a template without headers and outputs the
`Name` and `Image` entries separated by a colon for all tasks:
```bash
$ docker node ps --format "{{.Name}}: {{.Image}}"
top.1: busybox
top.2: busybox
top.3: busybox
```
## Related commands
* [node demote](node_demote.md)
* [node inspect](node_inspect.md)
* [node ls](node_ls.md)
* [node promote](node_promote.md)
* [node rm](node_rm.md)
* [node update](node_update.md)

View File

@ -0,0 +1,80 @@
---
title: "node rm"
description: "The node rm command description and usage"
keywords: "node, remove"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node rm
```markdown
Usage: docker node rm [OPTIONS] NODE [NODE...]
Remove one or more nodes from the swarm
Aliases:
rm, remove
Options:
-f, --force Force remove a node from the swarm
--help Print usage
```
## Description
When run from a manager node, removes the specified nodes from a swarm.
## Examples
### Remove a stopped node from the swarm
```bash
$ docker node rm swarm-node-02
Node swarm-node-02 removed from swarm
```
### Attempt to remove a running node from a swarm
Removes the specified nodes from the swarm, but only if the nodes are in the
down state. If you attempt to remove an active node you will receive an error:
```non
$ docker node rm swarm-node-03
Error response from daemon: rpc error: code = 9 desc = node swarm-node-03 is not
down and can't be removed
```
### Forcibly remove an inaccessible node from a swarm
If you lose access to a worker node or need to shut it down because it has been
compromised or is not behaving as expected, you can use the `--force` option.
This may cause transient errors or interruptions, depending on the type of task
being run on the node.
```bash
$ docker node rm --force swarm-node-03
Node swarm-node-03 removed from swarm
```
A manager node must be demoted to a worker node (using `docker node demote`)
before you can remove it from the swarm.
## Related commands
* [node demote](node_demote.md)
* [node inspect](node_inspect.md)
* [node ls](node_ls.md)
* [node promote](node_promote.md)
* [node ps](node_ps.md)
* [node update](node_update.md)

View File

@ -0,0 +1,77 @@
---
title: "node update"
description: "The node update command description and usage"
keywords: "resources, update, dynamically"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# update
```markdown
Usage: docker node update [OPTIONS] NODE
Update a node
Options:
--availability string Availability of the node ("active"|"pause"|"drain")
--help Print usage
--label-add value Add or update a node label (key=value) (default [])
--label-rm value Remove a node label if exists (default [])
--role string Role of the node ("worker"|"manager")
```
## Description
Update metadata about a node, such as its availability, labels, or roles.
## Examples
### Add label metadata to a node
Add metadata to a swarm node using node labels. You can specify a node label as
a key with an empty value:
``` bash
$ docker node update --label-add foo worker1
```
To add multiple labels to a node, pass the `--label-add` flag for each label:
```bash
$ docker node update --label-add foo --label-add bar worker1
```
When you [create a service](service_create.md),
you can use node labels as a constraint. A constraint limits the nodes where the
scheduler deploys tasks for a service.
For example, to add a `type` label to identify nodes where the scheduler should
deploy message queue service tasks:
``` bash
$ docker node update --label-add type=queue worker1
```
The labels you set for nodes using `docker node update` apply only to the node
entity within the swarm. Do not confuse them with the docker daemon labels for
[dockerd](https://docs.docker.com/engine/userguide/labels-custom-metadata/#daemon-labels).
For more information about labels, refer to [apply custom
metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/).
## Related commands
* [node demote](node_demote.md)
* [node inspect](node_inspect.md)
* [node ls](node_ls.md)
* [node promote](node_promote.md)
* [node ps](node_ps.md)
* [node rm](node_rm.md)

View File

@ -0,0 +1,48 @@
---
title: "pause"
description: "The pause command description and usage"
keywords: "cgroups, container, suspend, SIGSTOP"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# pause
```markdown
Usage: docker pause CONTAINER [CONTAINER...]
Pause all processes within one or more containers
Options:
--help Print usage
```
## Description
The `docker pause` command suspends all processes in the specified containers.
On Linux, this uses the cgroups freezer. Traditionally, when suspending a process
the `SIGSTOP` signal is used, which is observable by the process being suspended.
With the cgroups freezer the process is unaware, and unable to capture,
that it is being suspended, and subsequently resumed. On Windows, only Hyper-V
containers can be paused.
See the
[cgroups freezer documentation](https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt)
for further details.
## Examples
```bash
$ docker pause my_container
```
## Related commands
* [unpause](unpause.md)

View File

@ -0,0 +1,44 @@
---
title: "plugin"
description: "The plugin command description and usage"
keywords: "plugin"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin
```markdown
Usage: docker plugin COMMAND
Manage plugins
Options:
--help Print usage
Commands:
create Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
disable Disable a plugin
enable Enable a plugin
inspect Display detailed information on one or more plugins
install Install a plugin
ls List plugins
push Push a plugin to a registry
rm Remove one or more plugins
set Change settings for a plugin
upgrade Upgrade an existing plugin
Run 'docker plugin COMMAND --help' for more information on a command.
```
## Description
Manage plugins.

View File

@ -0,0 +1,66 @@
---
title: "plugin create"
description: "the plugin create command description and usage"
keywords: "plugin, create"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin create
```markdown
Usage: docker plugin create [OPTIONS] PLUGIN PLUGIN-DATA-DIR
Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
Options:
--compress Compress the context using gzip
--help Print usage
```
## Description
Creates a plugin. Before creating the plugin, prepare the plugin's root filesystem as well as
[the config.json](../../extend/config.md)
## Examples
The following example shows how to create a sample `plugin`.
```bash
$ ls -ls /home/pluginDir
total 4
4 -rw-r--r-- 1 root root 431 Nov 7 01:40 config.json
0 drwxr-xr-x 19 root root 420 Nov 7 01:40 rootfs
$ docker plugin create plugin /home/pluginDir
plugin
$ docker plugin ls
ID NAME TAG DESCRIPTION ENABLED
672d8144ec02 plugin latest A sample plugin for Docker false
```
The plugin can subsequently be enabled for local use or pushed to the public registry.
## Related commands
* [plugin disable](plugin_disable.md)
* [plugin enable](plugin_enable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin install](plugin_install.md)
* [plugin ls](plugin_ls.md)
* [plugin push](plugin_push.md)
* [plugin rm](plugin_rm.md)
* [plugin set](plugin_set.md)
* [plugin upgrade](plugin_upgrade.md)

View File

@ -0,0 +1,69 @@
---
title: "plugin disable"
description: "the plugin disable command description and usage"
keywords: "plugin, disable"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin disable
```markdown
Usage: docker plugin disable [OPTIONS] PLUGIN
Disable a plugin
Options:
-f, --force Force the disable of an active plugin
--help Print usage
```
## Description
Disables a plugin. The plugin must be installed before it can be disabled,
see [`docker plugin install`](plugin_install.md). Without the `-f` option,
a plugin that has references (e.g., volumes, networks) cannot be disabled.
## Examples
The following example shows that the `sample-volume-plugin` plugin is installed
and enabled:
```bash
$ docker plugin ls
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker true
```
To disable the plugin, use the following command:
```bash
$ docker plugin disable tiborvass/sample-volume-plugin
tiborvass/sample-volume-plugin
$ docker plugin ls
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker false
```
## Related commands
* [plugin create](plugin_create.md)
* [plugin enable](plugin_enable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin install](plugin_install.md)
* [plugin ls](plugin_ls.md)
* [plugin push](plugin_push.md)
* [plugin rm](plugin_rm.md)
* [plugin set](plugin_set.md)
* [plugin upgrade](plugin_upgrade.md)

View File

@ -0,0 +1,68 @@
---
title: "plugin enable"
description: "the plugin enable command description and usage"
keywords: "plugin, enable"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin enable
```markdown
Usage: docker plugin enable [OPTIONS] PLUGIN
Enable a plugin
Options:
--help Print usage
--timeout int HTTP client timeout (in seconds)
```
## Description
Enables a plugin. The plugin must be installed before it can be enabled,
see [`docker plugin install`](plugin_install.md).
## Examples
The following example shows that the `sample-volume-plugin` plugin is installed,
but disabled:
```bash
$ docker plugin ls
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker false
```
To enable the plugin, use the following command:
```bash
$ docker plugin enable tiborvass/sample-volume-plugin
tiborvass/sample-volume-plugin
$ docker plugin ls
ID NAME TAG DESCRIPTION ENABLED
69553ca1d123 tiborvass/sample-volume-plugin latest A test plugin for Docker true
```
## Related commands
* [plugin create](plugin_create.md)
* [plugin disable](plugin_disable.md)
* [plugin inspect](plugin_inspect.md)
* [plugin install](plugin_install.md)
* [plugin ls](plugin_ls.md)
* [plugin push](plugin_push.md)
* [plugin rm](plugin_rm.md)
* [plugin set](plugin_set.md)
* [plugin upgrade](plugin_upgrade.md)

View File

@ -0,0 +1,166 @@
---
title: "plugin inspect"
description: "The plugin inspect command description and usage"
keywords: "plugin, inspect"
---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin inspect
```markdown
Usage: docker plugin inspect [OPTIONS] PLUGIN [PLUGIN...]
Display detailed information on one or more plugins
Options:
-f, --format string Format the output using the given Go template
--help Print usage
```
## Description
Returns information about a plugin. By default, this command renders all results
in a JSON array.
## Examples
```none
$ docker plugin inspect tiborvass/sample-volume-plugin:latest
{
"Id": "8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21",
"Name": "tiborvass/sample-volume-plugin:latest",
"PluginReference": "tiborvas/sample-volume-plugin:latest",
"Enabled": true,
"Config": {
"Mounts": [
{
"Name": "",
"Description": "",
"Settable": null,
"Source": "/data",
"Destination": "/data",
"Type": "bind",
"Options": [
"shared",
"rbind"
]
},
{
"Name": "",
"Description": "",
"Settable": null,
"Source": null,
"Destination": "/foobar",
"Type": "tmpfs",
"Options": null
}
],
"Env": [
"DEBUG=1"
],
"Args": null,
"Devices": null
},
"Manifest": {
"ManifestVersion": "v0",
"Description": "A test plugin for Docker",
"Documentation": "https://docs.docker.com/engine/extend/plugins/",
"Interface": {
"Types": [
"docker.volumedriver/1.0"
],
"Socket": "plugins.sock"
},
"Entrypoint": [
"plugin-sample-volume-plugin",
"/data"
],
"Workdir": "",
"User": {
},
"Network": {
"Type": "host"
},
"Capabilities": null,
"Mounts": [
{
"Name": "",
"Description": "",
"Settable": null,
"Source": "/data",
"Destination": "/data",
"Type": "bind",
"Options": [
"shared",
"rbind"
]
},
{
"Name": "",
"Description": "",
"Settable": null,
"Source": null,
"Destination": "/foobar",
"Type": "tmpfs",
"Options": null
}
],
"Devices": [
{
"Name": "device",
"Description": "a host device to mount",
"Settable": null,
"Path": "/dev/cpu_dma_latency"
}
],
"Env": [
{
"Name": "DEBUG",
"Description": "If set, prints debug messages",
"Settable": null,
"Value": "1"
}
],
"Args": {
"Name": "args",
"Description": "command line arguments",
"Settable": null,
"Value": [
]
}
}
}
```
(output formatted for readability)
### Formatting the output
```bash
$ docker plugin inspect -f '{{.Id}}' tiborvass/sample-volume-plugin:latest
8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21
```
## Related commands
* [plugin create](plugin_create.md)
* [plugin enable](plugin_enable.md)
* [plugin disable](plugin_disable.md)
* [plugin install](plugin_install.md)
* [plugin ls](plugin_ls.md)
* [plugin push](plugin_push.md)
* [plugin rm](plugin_rm.md)
* [plugin set](plugin_set.md)
* [plugin upgrade](plugin_upgrade.md)

Some files were not shown because too many files have changed in this diff Show More