Docker and Containers: Commands Set 3

Which of the following command is used to list the different options that could be used with the "container ls" commands?


Options are :

  • docker container --help
  • docker container ls --help
  • docker ls --help
  • docker container ls --Search

Answer : docker container ls --help

Which of the following command is used to list the all the containers including the stopped ones?


Options are :

  • docker image ls -a
  • docker container ls -a
  • docker container image ls -a
  • docker container ls -all

Answer : docker container ls -a

Docker Certified Associate (DCA) Practice Exams Set 8

Which command is used to view only the containers idís ?


Options are :

  • -q
  • -l
  • -lq
  • -ql

Answer : -q

Which command is used to view only the last container started?


Options are :

  • -q
  • -l
  • -lq
  • -ql

Answer : -l

Which command is used to view the id of the last container started?


Options are :

  • -q
  • -l
  • -lq
  • -ql

Answer : -lq

Docker Certified Associate (DCA) Practice Exams Set 3

We can also combine the -q with -a option (-aq) to display all the container idís. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

Which of the following is a valid command to list the docker containers?


Options are :

  • docker container ls -a
  • docker container ls -aq
  • docker container ls -l
  • All

Answer : All

Which of the following is a valid command to list the docker containers?


Options are :

  • docker container ls -a
  • docker container ls -aq
  • docker container ls -lq
  • All

Answer : All

Docker Certified Associate (DCA) Practice Exams Set 6

Which of the following is a valid command to list the docker containers?


Options are :

  • docker container ls -a
  • docker container ls -aq
  • docker container ls -q
  • All

Answer : All

Which of the following is a valid command to list and filter on the docker containers?


Options are :

  • docker container --ls filter key=value
  • docker container ls --filter keys=value
  • docker container ls --filter key=value
  • docker container ls filter key=value

Answer : docker container ls --filter key=value

Which of the following is a valid command to list and filter on the docker containers?


Options are :

  • docker container ls --filter status=exit
  • docker container ls --filter status=exited
  • docker container ls filter status=exited
  • docker container ls filter --status=exited

Answer : docker container ls --filter status=exited

Docker Certified Associate (DCA) Practice Exams Set 6

Which of the following is a valid command to list and filter on the docker containers?


Options are :

  • docker container ls --filter images=
  • docker container ls --filter image=
  • docker container ls filter image=
  • docker container ls filter --image=

Answer : docker container ls --filter image=

Which of the following is a valid command to list and filter on the docker containers?


Options are :

  • docker container ls filter command=
  • docker container ls --filter command=
  • docker container ls --filter cmd=
  • docker container --ls filter cmd=

Answer : docker container ls --filter command=

Which of the following command can be used to pull the ABC, a fictitious name, web server image?


Options are :

  • docker pull image ABC:
  • docker image pull ABC:
  • docker image pull ABC
  • docker image ABC: pull

Answer : docker image pull ABC:

Docker Certified Associate (DCA) Practice Exams Set 21

Which command can be used to publish the container port that is exposed inside container to a random port on host?


Options are :

  • --nm
  • --name
  • --n
  • --default

Answer : --name

Which command can be used to name the container rather than using the default name generated by docker engine for container?


Options are :

  • --Port
  • --P
  • --p
  • --Pp

Answer : --P

What output the command "docker container run --detach --name webserver -P ABC:<tag> " show?


Options are :

  • The command will name the container as webserver, and publish the container port that is exposed inside container image ABC:.
  • The command will keep the container running in background, name the container as webserver, and publish the container port that is exposed inside container image ABC:.
  • The command will keep the container running in background, name the container as webserver, and unpublish the container port that is exposed inside container image ABC:.
  • The command will keep the container running in background, name the container as ABC:, and publish the container port that is exposed inside container image webserver.

Answer : The command will keep the container running in background, name the container as webserver, and publish the container port that is exposed inside container image ABC:.

Docker Certified Associate (DCA) Practice Exams Set 8

Which of the following command is used to view the publish port?


Options are :

  • docker container --ls
  • docker container ls
  • docker container LS
  • docker container --LS

Answer : docker container ls

To bind a specific port number that is being published we can use the --publish. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

We cant add a collaborator to our repository on docker hub. This statement is


Options are :

  • TRUE
  • FALSE

Answer : FALSE

Docker Certified Associate (DCA) Practice Exams Set 9

While trying to remove a running container what message do we get?


Options are :

  • " Container is removed successfully"
  • " Container is removed partially"
  • "You cant remove a running container"
  • "Container is crashed"

Answer : "You cant remove a running container"

Docker Certified Associate (DCA) Practice Exams Set 9

Which command can be used to remove an existing container?


Options are :

  • -f
  • -force
  • -ff
  • both a and b

Answer : both a and b

Is it possible to pass the output of one docker command to another docker command. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

Which symbol can be used to pass the output of one docker command to another docker command?


Options are :

  • $
  • $$
  • #
  • &

Answer : $

Docker Certified Associate (DCA) Practice Exams Set 1

Which of the command can be used to remove all the containers running or stopped using a single command?


Options are :

  • docker container rm -f $(docker container ls -aq)
  • docker container rm -f &(docker container ls -aq)
  • docker container rm $(docker container ls -aq)
  • docker container rm &(docker container ls -aq)

Answer : docker container rm -f $(docker container ls -aq)

What is the output of the command "docker container run --detach --rm --name webserver --publish 80:80 ABC:<TAG>?


Options are :

  • create a new container that will automatically remove the container when it is stopped.
  • create a new container that will automatically remove the container when it is crashed.
  • create a new container that will automatically remove the container when it is to be updated.
  • create a new container that will automatically remove the container when it is pinged.

Answer : create a new container that will automatically remove the container when it is stopped.

To bind mount the app directory to our web server application we can use the --volume command. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

Docker Certified Associate (DCA) Practice Exams Set 6

To bind mount the app directory to our web server application we can use the -v command. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

To bind mount the app directory to our web server application we can use the --vol comand. This statement is


Options are :

  • TRUE
  • FALSE

Answer : FALSE

What command is used to see a host of commands we can use with volume?


Options are :

  • docker volume --help
  • docker volume -help
  • docker vol --help
  • docker -v --help

Answer : docker volume --help

Docker Certified Associate (DCA) Practice Exams Set 27

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions