Commit Graph

40 Commits

Author SHA1 Message Date
fe241a941a Merge pull request #27564 from mlaventure/add-networks-format-to-ps
Add Networks placeholder to ps --format
Upstream-commit: 85a65c7536
Component: cli
2016-10-20 18:43:46 -07:00
b2507ea973 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: 08ac5a3039
Component: cli
2016-10-20 07:41:56 -07:00
3a00f9dfc7 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: a528b05dab
Component: cli
2016-10-19 12:39:25 -02:00
cb9c9cdbfa Merge pull request #27476 from yuexiao-wang/fix-typos-volume
Fix some typos
Upstream-commit: 879b4d1fba
Component: cli
2016-10-18 13:50:20 +01:00
1f163ad243 Merge pull request #27478 from allencloud/wrap-line-in-deleted-containers
wrap line in deleted containers when pruning
Upstream-commit: d52f04b7c1
Component: cli
2016-10-18 13:48:44 +01:00
655c82e562 Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 24d0191a3a
Component: cli
2016-10-18 19:40:16 +08:00
52dbab66cb wrap line in deleted containers when pruning
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 093072cc18
Component: cli
2016-10-18 14:20:12 +08:00
a195f2d433 Update docker stop and docker restart to allow not specifying timeout and use the one specified at container creation time.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c424fb0e3d
Component: cli
2016-10-17 12:53:35 -07:00
17ee92cc91 Merge pull request #26819 from ripcurld00d/fix_stats_mutex
Hide the mutex lock in formatter.ContainerStats
Upstream-commit: bfe16dcfe2
Component: cli
2016-10-13 17:38:22 -07:00
1c68035702 Hide the mutex in formatter.ContainerStats
The formatter.ContainerStats struct exposes its Mutex.
This is a bad design and should be fixed.

To fix that, I separated the statistics
attributes from ContainerStats to StatsEntry and
hid the mutex. Notice that the mutex protects both
the `err` field and the statistics attributes.

Then, implemented SetStatistics, SetError, GetStatistics
and GetError to avoid races.

Moreover, to make this less granular, I decided to
replace the read-write mutex with the regular mutex and
to pass a StatsEntry slice to formatter.ContainerStatsWrite

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 3bc50c45ba
Component: cli
2016-10-10 21:52:53 +03:00
b9c5442c91 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 871b692833
Component: cli
2016-10-11 00:42:21 +08:00
879f289e5a Merge pull request #26778 from WeiZhang555/parallel-operations
Support parallel kill,rm
Upstream-commit: 0c6d66b89a
Component: cli
2016-10-10 18:31:10 +02:00
7f7622756e Add the OPTIONS and Fix the links for contain prune
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 80bc917226
Component: cli
2016-10-11 00:13:33 +08:00
c80b266f91 Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 6f8bb41ecb
Component: cli
2016-09-29 07:42:53 -07:00
cf39dde222 Support parallel rm
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 5c1362ce59
Component: cli
2016-09-28 12:07:18 +08:00
03427eb002 Support parallel kill
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: f612b93d33
Component: cli
2016-09-28 12:03:19 +08:00
37441dedaa Refactor to new events api
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: d700b90576
Component: cli
2016-09-22 14:42:06 -04:00
79df3ddbda Merge pull request #24987 from ripcurld00d/stats_format_prod
Add format to stats
Upstream-commit: 685613f6c9
Component: cli
2016-09-21 10:38:21 -04:00
e5fc4c58fb Revert Box from HostConfig
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1385ad8b00
Component: cli
2016-09-20 12:01:04 -07:00
3deff1380d Merge pull request #26579 from Microsoft/jjh/ociprocess
Windows: OCI `process` struct and console size to uint
Upstream-commit: 889980d6e3
Component: cli
2016-09-19 22:52:16 +02:00
1652332026 Windows: OCI process struct convergence
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f14f7711e7
Component: cli
2016-09-19 10:34:31 -07:00
a765266b0a Only hide commands if the env variable is set.
Better formatting for usage template.
Group commands in usage to management/operation commands.
Remove the word Docker from the description of management commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1f0f7ecb5a
Component: cli
2016-09-19 13:28:15 -04:00
5ae46f25cb Move canonical image and container commands into a command group
Hide some top level commands
Add docker container and image inspect commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: accc5d5bd4
Component: cli
2016-09-19 13:28:02 -04:00
a8c10a8cb0 Add the format switch to the stats command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: a4f3442403
Component: cli
2016-09-18 14:16:13 +03:00
25db3b26a7 Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c323878331
Component: cli
2016-09-16 11:56:15 -07:00
a43858a79d Fix testcases that expect trailing whitespace
and broken integration tests based of nil pointers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2f8c4333fe
Component: cli
2016-09-13 17:58:12 -04:00
91cf73d819 Refactor formatter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: db0952ad22
Component: cli
2016-09-13 17:58:12 -04:00
d9c3f096cf Use opts.FilterOpt for filter flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d9cb421d69
Component: cli
2016-09-13 16:20:10 -04:00
5a7dfca796 Merge pull request #24761 from WeiZhang555/parallel-stop
Enhancement: allow parallel stop, pause, unpause
Upstream-commit: 62f513507e
Component: cli
2016-09-13 10:46:51 -04:00
24c19a8d47 Add parallel operation support for pause/unpause
Support parallel pause/unpause

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 4570bfe8de
Component: cli
2016-09-13 11:01:28 +08:00
45c490c19f Enhancement: allow parallel stop
Stop multiple containers in parallel to speed up stop process, allow
maximum 50 parallel stops.

Signed-off-by: Abhinav Dahiya <abhinavdtu2012@gmail.com>
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 285fef282f
Component: cli
2016-09-13 10:50:55 +08:00
c4973b1822 Merge pull request #26456 from dnephin/move_cli_command_registry
Remove registry/auth helper methods from the DockerCLI object
Upstream-commit: aabe9468aa
Component: cli
2016-09-12 15:11:04 +02:00
8f50e93ae4 Merge pull request #26303 from yongtang/26300-docker-images-3-fractional-digits
Restrict size to 2 fractional digits for `docker images`
Upstream-commit: 2dc3e0341b
Component: cli
2016-09-10 11:32:45 +02:00
3c8785422e Remove remaining registry methods from DockerCLI.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a26ba0e702
Component: cli
2016-09-09 15:50:01 -04:00
e71d793ff1 Merge pull request #22049 from boucher/docker-checkpoint-restore
Implement containerd API for checkpoints
Upstream-commit: 5fe882a494
Component: cli
2016-09-09 13:36:55 -04:00
bea6567477 Move image trust related cli methods into the image package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0cf85349f3
Component: cli
2016-09-09 10:50:16 -04:00
cef9a66721 Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: f0647193dc
Component: cli
2016-09-08 21:31:52 -04:00
9c57f9b583 Restrict size to 2 fractional digits for docker images
This fix tries to address the issue raised in 26300. Previously
`docker images` will use `HumanSize()` to display the size which
has a fixed precision of 4 (thus 3 fractional digits). This
could be problematic in certain languages (e.g. , German, see
26300) as `.` may be interpreted as thousands-separator in number.

This fix use `CustomSize()` instead and limit the precision to 3
(thus 2 fractional digits).

This fix has been tested manually.

This fix fixes 26300.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c68bb57959
Component: cli
2016-09-08 18:26:50 -07:00
b924adb986 Fix a test that expects whitespace at the end of the line.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e2f7387906
Component: cli
2016-09-08 15:50:14 -04:00
964a552e76 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: 3bd1eb4b76
Component: cli
2016-09-08 15:46:29 -04:00