Commit Graph

319 Commits

Author SHA1 Message Date
Vincent Demeester 86c99be0c9 Complete docker-events man page with filter list…
… and examples.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:10:30 +00:00
Erik St. Martin 42ef78911e 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>
2017-06-02 00:10:28 +00:00
sandyskies b4f6b6d970 add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:10:28 +00:00
Kenfe-Mickael Laventure 47b507e48a Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-02 00:10:28 +00:00
YuPengZTE c8da630897 Fix the typo of URLs
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2017-06-02 00:10:25 +00:00
Jonh Wendell 73dd34b2b3 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>
2017-06-02 00:10:25 +00:00
Yong Tang ef158e3e0a 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>
2017-06-02 00:10:25 +00:00
Daniel Nephin cfdab875ce Update sfp13/pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 00:10:25 +00:00
yuexiao-wang 659eab0574 Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:10:24 +00:00
Yong Tang 4ff84a13da 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>
2017-06-02 00:10:24 +00:00
Amir Goldstein 6190d02e62 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>
2017-06-02 00:10:24 +00:00
Darren Stahl f7bfe86440 Implement Pause Resume support for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-06-02 00:10:13 +00:00
Antonio Murdaca e9cb71acbb daemon: add --userland-proxy-path flag
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:10:12 +00:00
Paul Kehrer 9c85295b1c 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>
2017-06-02 00:10:12 +00:00
Vincent Demeester cd547751df 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>
2017-06-02 00:10:12 +00:00
Antonio Murdaca c17012948e configure docker-init binary path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:10:12 +00:00
Sebastiaan van Stijn 676773a780 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>
2017-06-02 00:10:12 +00:00
Sebastiaan van Stijn 1f015b1700 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>
2017-06-02 00:10:11 +00:00
Boaz Shuster 6f4c4e466b Add documentation for docker stats --format
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-06-02 00:10:11 +00:00
Akihiro Suda a64a1aa0ae fix the man page and zsh completion for `docker images`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-02 00:10:11 +00:00
Michael Crosby d72deed554 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>
2017-06-02 00:10:10 +00:00
Akihiro Suda 71e220fc11 add `docker events --format`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-02 00:10:10 +00:00
Sebastiaan van Stijn 7d50b656d4 Synchronize push reference with man page
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:10 +00:00
Daniel Nephin 37eb9061fc 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>
2017-06-02 00:10:09 +00:00
Akihiro Suda 3b2455d983 update go-md2man to v1.0.6
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-02 00:10:09 +00:00
zhouhao bf70112273 Modify rename function usage
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-06-02 00:10:09 +00:00
Akihiro Suda ba7648fa62 fix docs about `sudo docker login`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-02 00:10:08 +00:00
Yong Tang 6aa365d7e9 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>
2017-06-02 00:10:08 +00:00
Yong Tang 3f171a31b1 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>
2017-06-02 00:10:08 +00:00
zhouhao de4127305e Modify docker-restart.1.md
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-06-02 00:10:08 +00:00
Dan Walsh 5f30004f08 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>
2017-06-02 00:10:08 +00:00
zhouhao d9340c47af Modify restart function prompt
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
2017-06-02 00:10:07 +00:00
Arnaud Porterie (icecrime) a2b443d1df Refactor `docker inspect` to work on all types
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2017-06-02 00:10:07 +00:00
Daniel Nephin 6e33dc2d91 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>
2017-06-02 00:10:06 +00:00
Justin Cormack a8a90829bb 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>
2017-06-02 00:10:06 +00:00
Justin Cormack 6625943f44 Add a Dockerfile for generating manpages on aarch64
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-02 00:10:06 +00:00
Christopher Jones be1a73f200 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>
2017-06-02 00:10:06 +00:00
Brian Goff 3ef90ec019 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>
2017-06-02 00:10:06 +00:00
Zhang Wei f63d53c736 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>
2017-06-02 00:10:05 +00:00
Akihiro Suda 420b6a91af add `--format` flag to `docker info`
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-02 00:10:05 +00:00
Sebastiaan van Stijn 4d268629e2 Fix capitalization
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:05 +00:00
Lei Jitang ac5ac973aa Fix inspect network show gateway with mask
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:10:04 +00:00
Lei Jitang 3b2ecd7052 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>
2017-06-02 00:10:04 +00:00
Zhang Wei 0f6a96d2a4 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>
2017-06-02 00:10:04 +00:00
Vincent Demeester fd30075463 Add network --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:10:04 +00:00
Daniel Nephin d30cedfe7c Fix the man/Dockerfile for arm
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-02 00:10:04 +00:00
Yong Tang 3a778c9e1f 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>
2017-06-02 00:10:03 +00:00
Qiang Huang 69eb98ada5 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>
2017-06-02 00:10:03 +00:00
Sebastiaan van Stijn e2a6cf9fd5 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>
2017-06-02 00:10:03 +00:00
Aaron Lehmann 1918ec3987 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>
2017-06-02 00:10:02 +00:00