-1

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.

Heikura
  • 1,009
  • 3
  • 13
  • 27
Fahad Ali
  • 17
  • 1
  • I found the answer to my question already. I'm sharing what I've learner about these letters on a stick below in the hope it will help you, too! – hakre Jul 15 '21 at 21:41

1 Answers1

1

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 volumnes.


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)
hakre
  • 193,403
  • 52
  • 435
  • 836