Commit Graph

319 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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