Commit Graph

489 Commits

Author SHA1 Message Date
Harald Albers bce3414931 Move bash completion logic to new subcommand: info
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 95f885eb9b Move bash completion logic to new subcommand: events
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 9e164dedaa Add bash completion for new `docker system` command family
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 398d4706d3 Move bash completion logic to new subcommand: tag
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 54bb65787c Move bash completion logic to new subcommand: save
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 52c1a7ed50 Move bash completion logic to new subcommand: rmi
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 509d2cc9b6 Move bash completion logic to new subcommand: push
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 3ed53e5641 Move bash completion logic to new subcommand: pull
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers ff05fa31d5 Move bash completion logic to new subcommand: images
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers eeae0d4c53 Move bash completion logic to new subcommand: load
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 918ff45c1a Delegate bash completion for `docker {container,image} inspect` to parameterized function
In #23614 `docker inspect` was semantically enhanced to inspect "everything".
Therefore moving its logic to `_docker_container_inspect` was not correct.

This commit moves it back to its original top-level location (`_docker_inspect`)
so that it can be called by `_docker_{container,image}_inspect` and others (will
be added in follow-up PRs).
Parameterization was added in order to get caller-specific behavior.

Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers e8310f310d Move bash completion logic to new subcommand: import
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers 583bda0896 Move bash completion logic to new subcommand: history
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:29 +00:00
Harald Albers bd3939dddd Move bash completion logic to new subcommand: build
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:28 +00:00
Harald Albers 3ab25a8ccb Add bash completion for new `docker image` command family
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:28 +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
Steve Durrheimer 85fb527cbf Add zsh completion for 'dockerd --experimental'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2017-06-02 00:10:28 +00:00
Steve Durrheimer 350b1a3f38 Add zsh completion for 'dockerd --shutdown-timeout'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2017-06-02 00:10:28 +00:00
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