Commit Graph

471 Commits

Author SHA1 Message Date
Steve Durrheimer fa8f0cd060 Add zsh completion for 'docker {create,run} --stop-timeout'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2017-06-02 00:10:28 +00:00
Harald Albers 7414101f3c Add bash completion for `dockerd --experimental`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:28 +00:00
Steve Durrheimer add78ffc8a Fix zsh completion for 'docker exec --env'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2017-06-02 00:10:28 +00:00
Harald Albers 04b0779de4 Fix bash completion for `docker exec --env`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:28 +00:00
Aaron Lehmann 78c0d50c9f 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>
2017-06-02 00:10:27 +00:00
Harald Albers 4f4c129973 Move bash completion logic to new subcommand: wait
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers d2ef5775b8 Move bash completion logic to new subcommand: update
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers b8d3d1e6ec Move bash completion logic to new subcommand: unpause
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 28cf2654e7 Move bash completion logic to new subcommand: top
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 620d0051c8 Move bash completion logic to new subcommand: stop
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 04886bca2f Move bash completion logic to new subcommand: stats
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers f58b6746d7 Move bash completion logic to new subcommand: start
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 05656756e6 Move bash completion logic to new subcommand: run
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 39880d7731 Move bash completion logic to new subcommand: rm
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 2a9e70cf34 Move bash completion logic to new subcommand: restart
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers f533df0821 Move bash completion logic to new subcommand: port
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 120b57a61c Move bash completion logic to new subcommand: port
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers b659865f57 Move bash completion logic to new subcommand: pause
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers adaa718195 Move bash completion logic to new subcommand: ps
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers bd996a11a1 Move bash completion logic to new subcommand: logs
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:27 +00:00
Harald Albers 13fde2b8c5 Move bash completion logic to new subcommand: kill
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers c2c341f42b Move bash completion logic to new subcommand: inspect
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers 4db49a11a5 Move bash completion logic to new subcommand: diff
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers f560199333 Move bash completion logic to new subcommand: exec
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers eac71844f4 Move bash completion logic to new subcommand: diff
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers 7db1e8272b Move bash completion logic to new subcommand: create
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers 0ef51632ec Move bash completion logic to new subcommand: cp
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers e2678f21d9 Move bash completion logic to new subcommand: commit
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers d5cdbdc734 Move bash completion logic to new subcommand: attach
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +00:00
Harald Albers f857f420aa Add bash completion for `docker container`
At this point, we just delegate to the existing completions.

Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:26 +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
Vincent Bernat 38d93769fe zsh: fix completion when docker output only has the header line
Unfortunately, `(f)` aka `(ps:\n:)` flag will not create an array when
there is only one line. The subsequent use of indexes will then affect
the string. This leads to `docker rmi <tab>` to complete on the header
line instead of nothing.

Therefore, for each use of `(f)`, we ensure that we have an extra new
line to be sure we get an array.

Credit to @povesteam for the original report and fix in #27373.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
2017-06-02 00:10:25 +00:00
Harald Albers ba501cf4fd Improve comments in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:25 +00:00
Harald Albers a511da3c57 Add bash completion for `dockerd --shutdown-timeout`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:25 +00:00
Harald Albers 34630120b3 Align bash completion of plugins to completion of nodes and services
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:25 +00:00
Aaron Lehmann 8c03c1201b 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>
2017-06-02 00:10:25 +00:00
Harald Albers 3ba4b59233 Add bash completion for `docker {run,create} --stop-timeout`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:25 +00:00
Harald Albers 9ef7847f74 Improve bash completion of containers
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:25 +00:00
Harald Albers f1c1bbcbea Align bash completion of networks to completion of nodes and services
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:25 +00:00
Harald Albers 77a6840256 Align bash completion of volumes to completion of nodes and services
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:25 +00:00
Carlos Alexandro Becker 83c7808f3a Added logentries dependency to vendor
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2017-06-02 00:10:24 +00:00
Wenzhi Liang 9ad418fe97 allow restarting stopped containers by id
Signed-off-by: Wenzhi Liang <wenzhi.liang@gmail.com>
2017-06-02 00:10:13 +00:00
Steve Durrheimer 9014b21a61 Add zsh completion for 'dockerd --init-path'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.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
Harald Albers 62e87d4996 Add support for multiple nodes in bash completion for `docker node ps`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:12 +00:00
Harald Albers 3171c7b6e7 Add bash completion for `dockerd --init-path`
Signed-off-by: Harald Albers <github@albersweb.de>
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
Harald Albers ee85efb76d Fix bash completion for `docker logs --since`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:12 +00:00
Steve Durrheimer bed270a507 Add zsh completion for 'docker stats --format'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2017-06-02 00:10:11 +00:00
Steve Durrheimer 365e71d868 Add zsh completion for multi-nodes 'node ps'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2017-06-02 00:10:11 +00:00