Commit Graph

152 Commits

Author SHA1 Message Date
bee99c14d9 Merge pull request #27864 from vdemeester/add-statsformat-to-configfile
Add StatsFormat to the config.json file
Upstream-commit: 63719e1a24
Component: cli
2016-11-01 20:32:13 -07:00
bb91eece7d Merge pull request #27953 from thaJeztah/fix-deprecation-version
Update deprecation versions for "email" and colon in "security options"
Upstream-commit: 3a5d54290d
Component: cli
2016-11-01 14:31:32 -07:00
951b0a97af Merge pull request #22641 from cpuguy83/build_finalization
Adds ability to flatten image after build
Upstream-commit: 09caa1ae97
Component: cli
2016-11-01 14:30:18 -07:00
fad42b5770 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: b90c048804
Component: cli
2016-11-01 13:41:59 -04:00
6edad79979 Update deprecation versions for "email" and colon in "security options"
These features were originally scheduled
for removal in docker 1.13, but we changed
our deprecation policy to keep features
for three releases instead of two.

This updates the deprecation version
to match the deprecation policy.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ac7d79389a
Component: cli
2016-11-01 09:12:27 -07:00
3f0d4ebbb3 Merge pull request #27930 from YuPengZTE/devLogout
Align with other cli descriptions
Upstream-commit: e7e5e6138f
Component: cli
2016-11-01 08:39:04 -04:00
1b6c8e9cf6 Align with other cli descriptions
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 89db77511c
Component: cli
2016-11-01 13:41:49 +08:00
ee6accd430 Merge pull request #27901 from ripcurld00d/load_stdin_valid
Validate docker-load receives a tar file
Upstream-commit: 256b9c6011
Component: cli
2016-10-31 14:23:18 -07:00
44be9bdb95 Merge pull request #26683 from yuexiao-wang/update-inspect
Modify short and flags for docker inspect
Upstream-commit: 36e66d54c9
Component: cli
2016-10-31 13:39:59 -07:00
5175d100a2 Generate container create response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e7e0837702
Component: cli
2016-10-31 11:16:02 -04:00
1dc49df012 Use a config to generate swagger api types
Moves the resposne types to a package under api/types

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 010023c3c6
Component: cli
2016-10-31 11:13:41 -04:00
f382f98092 Generate VolumesCreateRequest from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 120c5f9964
Component: cli
2016-10-31 11:13:41 -04:00
f73b440c5c Validate docker-load receives a tar file
To load an image from a tar file, you can specify
the tar file in the -i/--input option:
docker load -i image_1.tar

or using stdin:

docker load < image_1.tar
cat image_1.tat | docker load

If the image file isn't given the `docker load`
command gets stuck.

To avoid that, the load makes sure the CLI input is
not a terminal or the `--input` option was set.
If not then an error message is shown.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: fdbf29e1fa
Component: cli
2016-10-31 15:30:55 +02:00
0473c568d7 Modify short and flags for docker inspect
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 6027424adf
Component: cli
2016-10-31 18:11:25 +08:00
f6256ed04b Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: faac177285
Component: cli
2016-10-29 15:03:26 +08:00
f65dcbf8f4 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: 378ae7234a
Component: cli
2016-10-28 13:26:31 -07:00
22661cb3e1 Merge pull request #27369 from cezarsa/hc
Add --health-* flags to service create and update
Upstream-commit: 4403644a9e
Component: cli
2016-10-28 21:59:52 +02:00
e527c56131 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: 908aa5b408
Component: cli
2016-10-28 11:48:25 -07:00
2d1410ba92 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: 87e916a171
Component: cli
2016-10-28 15:19:08 -02:00
5099913cf9 Allow providing a custom storage directory for docker checkpoints
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: 5ddcbc3c00
Component: cli
2016-10-28 07:56:05 -04:00
af072edbe5 Merge pull request #27654 from gaocegege/add-quiet-mode-to-service-ps
Add -q option to `docker service ps`
Upstream-commit: 4b65bdd802
Component: cli
2016-10-28 05:21:03 +02:00
64087d642d fixes #27643
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Upstream-commit: 4c1560e987
Component: cli
2016-10-28 08:02:57 +08:00
4671c52f80 Merge pull request #26988 from thaJeztah/remove-service-update-name-flag
Remove service update name flag
Upstream-commit: 881831531a
Component: cli
2016-10-27 16:55:47 -07:00
a467ba4b3e Merge pull request #27701 from ripcurld00d/unit_test_formatter_stats
Add unit tests to cli/command/formatter/stats.go
Upstream-commit: 090093bdbf
Component: cli
2016-10-27 15:10:47 -07:00
01d713986a 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: 1250d2afae
Component: cli
2016-10-27 11:48:32 -07:00
9dc55b4321 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: 6c80d2bb83
Component: cli
2016-10-27 09:16:29 -07:00
1ca668ac55 Add unit tests to cli/command/formatter/stats.go
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: c1da6dc7ac
Component: cli
2016-10-27 18:00:38 +03:00
38aff80fff Merge pull request #27759 from Microsoft/jjh/fixstats
Windows: Fix stats CLI
Upstream-commit: 3b4084cb50
Component: cli
2016-10-26 18:17:18 -07:00
46742b9fba 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: 4f320d7c2a
Component: cli
2016-10-26 11:33:06 -04:00
835f605280 Merge pull request #27702 from tonistiigi/net-builder0
add --network option for docker build
Upstream-commit: 4c4545c92f
Component: cli
2016-10-25 21:50:33 -07:00
84e8a755f4 Windows: Fix stats CLI
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dff7842790
Component: cli
2016-10-25 19:57:47 -07:00
8446b1acdf add --network option for docker build
Signed-off-by: sandyskies <chenmingjie0828@163.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3c9dff2f75
Component: cli
2016-10-25 10:25:36 -07:00
c4d3e691e1 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: d5d520f0d7
Component: cli
2016-10-25 06:43:54 +00:00
47d137eadd Merge pull request #24533 from yongtang/24392-docker-info-label-duplicate-keys
Remove duplicate keys in labels of `docker info`
Upstream-commit: f039ba83d0
Component: cli
2016-10-24 18:12:28 -07:00
c9f7490aeb Merge pull request #27697 from amitkris/fix_units_import
Correct go-units import in cli/command/formatter/stats.go
Upstream-commit: d7a55774ed
Component: cli
2016-10-24 16:59:15 -07:00
2451915c27 Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 66bd963b76
Component: cli
2016-10-24 15:20:01 -07:00
a8ff9481ee Correct go-units import in cli/command/formatter/stats.go
from src/github.com/docker/go-units -> github.com/docker/go-units

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: 15bbb61711
Component: cli
2016-10-24 15:06:58 -07:00
a1ae75f661 Merge pull request #27596 from aaronlehmann/rolling-restart
Add force option to service update
Upstream-commit: 6ec439e875
Component: cli
2016-10-22 13:37:12 +02:00
66f4ef95a8 Merge pull request #27117 from dnephin/swagger-gen
Add swagger.yaml and generate a few types from the spec
Upstream-commit: 0f7cb7208c
Component: cli
2016-10-21 18:15:28 -07:00
cfa1f345dc 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: dfed71a6dd
Component: cli
2016-10-21 17:43:27 -07:00
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
2049cd9e1a Merge pull request #27530 from allencloud/change-join-role-display-judge
change join node role judge
Upstream-commit: 9ef3b7e6ff
Component: cli
2016-10-20 17:46:08 -07:00
a202fe7779 Generate api/types:Image from the swagger spec
and rename it to a more appropriate name ImageSummary.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ef87035bbb
Component: cli
2016-10-20 13:24:23 -07:00
7507bdd910 Merge pull request #27516 from allencloud/change-remove-multi-nodes
make every node and plugin removal call api
Upstream-commit: 3affd9570f
Component: cli
2016-10-20 10:10:52 -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
448fe45059 change join node role judge
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: f2a6d37388
Component: cli
2016-10-19 19:47:42 +08:00
0cbbc04944 make every node and plugin removal call api
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 49512f901c
Component: cli
2016-10-19 06:40:30 +08:00
64a984b1c7 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: 06ebd4517d
Component: cli
2016-10-18 10:09:50 -07:00
43c228543a 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: 805f669512
Component: cli
2016-10-18 07:45:27 -07:00