Reputation: 17
just a quick question as I am learning docker and doing labs:
I have learnt that to run the same command for all/many docker containers that after the command you can use $(docker -a -q)
I know -a
is to call ALL containers in all states, but what does the -q
mean?
Similarly, in the command:
docker rm -vf $(docker -a -q)
what does the -v
mean?
Thank you in advance.
Upvotes: -1
Views: 811
Reputation: 197832
but what does the -q mean?
the -
in "-q" denotes a short argument and q
is short for quiet.
Similarly, in the command: docker rm -vf $(docker -a -q) what does the -v mean?
again, the -
in "-v" denotes a short argument and v
is short for volumes.
furthermore, the -
in "-vf" denotes a group of short arguments, each short argument one character and therefore the group being of v
short for volumes and f
short for force(=true).
compare with the output of the man docker-rm
command:
DOCKER(1) Docker User Manuals DOCKER(1)
NAME
docker-rm - Remove one or more containers
SYNOPSIS
docker rm [OPTIONS] CONTAINER [CONTAINER...]
DESCRIPTION
Alias for docker container rm.
OPTIONS
-f, --force[=false] Force the removal of a running container
(uses SIGKILL)
-h, --help[=false] help for rm
-l, --link[=false] Remove the specified link
-v, --volumes[=false] Remove anonymous volumes associated with
the container
SEE ALSO
docker(1)
Docker Community Mar 2021 DOCKER(1)
(from: DOCKER(1), consult the sources for authorization, and copyright and licensing)
Upvotes: 2