Commit Graph

294 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
a81a386a03 Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: d219111855
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
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