Docker and Containers: Commands Set 2

Which of the following commands can be used with the "container" commands.


Options are :

  • Wait
  • Run
  • Start
  • All

Answer : All

Docker Certified Associate (DCA) Practice Exams Set 7

Which of the following commands can be used with the "container" command?


Options are :

  • kill
  • Pause
  • Prune
  • All

Answer : All

Which of the following commands can be used with the "container" command?


Options are :

  • Unpause
  • Update
  • Rename
  • All

Answer : All

Which of the following commands can't be used with the "container" command?


Options are :

  • Unpause
  • Run
  • Start
  • Carry

Answer : Carry

Docker Certified Associate (DCA) Practice Exams Set 8

Which command is to display the different sub-commands available with the docker image command?


Options are :

  • docker image --help
  • docker --help image
  • docker image --search
  • docker --search image

Answer : docker image --help

Which command is used to display all the local images?


Options are :

  • docker image display
  • docker ls image
  • docker image ls
  • docker image display all

Answer : docker image ls

Which of the following url is the default registry to pull an image?


Options are :

  • search.docker.com
  • google.com
  • hub.docker.com
  • docker.hub.com

Answer : hub.docker.com

Docker Certified Associate (DCA) Practice Exams Set 16

Which command is used to pull an image from a registry?


Options are :

  • docker pull image [:]
  • docker image pull [:]
  • Pull image docker
  • docker container image pull [:]

Answer : docker image pull [:]

docker image ls commad is used to list down all the images that are available locally. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

Which of the following commands can be used with the "image" command?


Options are :

  • Build
  • History
  • Import
  • All

Answer : All

Docker Certified Associate (DCA) Practice Exams Set 6

The command "echo $SOME_VAR_ONE && echo $SOME_VAR_TWO && echo $SOME_VAR_THREE" will ouput.


Options are :

  • "Variable" 3 times
  • It is a wrong command
  • "Variable" 1 times
  • Syntax error

Answer : "Variable" 3 times

Docker Certified Associate (DCA) Practice Exams Set 8

Which of the following commands can be used with the "image" command?


Options are :

  • Inspect
  • Load
  • Ls
  • All

Answer : All

Which of the following commands can be used with the "image" command?


Options are :

  • Prune
  • Pull
  • Push
  • All

Answer : All

Which of the following commands can't be used with the "image" command?


Options are :

  • rm
  • Save
  • Tag
  • export

Answer : export

Docker Certified Associate (DCA) Practice Exams Set 20

Which of the following commands can't be used with the "image" command?


Options are :

  • Load
  • Prune
  • Pull
  • untag

Answer : untag

Which command is used to push an image or a repository to a registry?


Options are :

  • docker image push [OPTIONS] NAME[:TAG]
  • docker push [OPTIONS] NAME[:TAG]
  • docker image push [OPTIONS]
  • docker image --push [OPTIONS] NAME[:TAG]

Answer : docker image push [OPTIONS] NAME[:TAG]

Which of the command is used to delete the local image from your docker host machine?


Options are :

  • docker image --rm [OPTIONS] IMAGE [IMAGENAME]
  • docker image rm [OPTIONS] IMAGE [IMAGENAME]
  • docker --image rm [OPTIONS] IMAGE [IMAGENAME]
  • docker rm image [OPTIONS] IMAGE [IMAGENAME]

Answer : docker image rm [OPTIONS] IMAGE [IMAGENAME]

Docker Certified Associate (DCA) Practice Exams Set 14

Which command is used to view the image in your docker host machine?


Options are :

  • docker image --ls
  • docker image ls
  • docker image LS
  • docker img ls

Answer : docker image ls

Which command is used to stop the container?


Options are :

  • docker container --stop webserver
  • docker container stop webserver
  • docker --container stop webserver
  • docker container webserver

Answer : docker container stop webserver

Which of the following command is used to build an image from Dockerfile?


Options are :

  • docker build [OPTIONS] PATH |
  • docker image build [OPTIONS] PATH | URL |
  • docker image --build [OPTIONS] PATH | URL |
  • docker --image build [OPTIONS] PATH

Answer : docker image build [OPTIONS] PATH | URL |

Docker Certified Associate (DCA) Practice Exams Set 7

Which command can be used to show the history of an image?


Options are :

  • docker image history [OPTIONS]
  • docker image history [OPTIONS] IMAGE
  • docker history [OPTIONS] IMAGE
  • docker image history

Answer : docker image history [OPTIONS] IMAGE

Which command is used to view the different options available with the command "history"?


Options are :

  • docker image history help
  • docker image history --help
  • docker history --help
  • docker img history --help

Answer : docker image history --help

Which command is used to view the history of our existing images in host machine?


Options are :

  • docker image --history :
  • docker image history :
  • docker --image history :
  • docker image :

Answer : docker image history :

Docker Certified Associate (DCA) Practice Exams Set 21

Which of the following commands can't be used with the "container" command?


Options are :

  • Unpause
  • Update
  • Rename
  • Import

Answer : Import

Which command is used to set an environment variables that would be used by container?


Options are :

  • --env
  • -ee
  • -e
  • -env

Answer : --env

The command "mkdir ~/demo, cd ~/demo, cp ~/demo-one/Dockerfile, Dockerfile ls -al" will


Options are :

  • Create a new directory demo inside the home directory and copy the existing Dockerfile from docker-one directory
  • Create a new directory demo inside the home directory and move to that directory and copy the existing Dockerfile from docker-one directory
  • Create a new directory demo inside the home directory and move to that directory
  • Create a new directory demo and move to that directory and copy the existing Dockerfile from docker-one directory

Answer : Create a new directory demo inside the home directory and move to that directory and copy the existing Dockerfile from docker-one directory

Docker Certified Associate (DCA) Practice Exams Set 6

Which of the following command will start the container, execute the command and then exit?


Options are :

  • docker container run echo "Output!" exit
  • docker container run execute echo "Output!"
  • docker container run echo "Output!"
  • docker run container echo "Output!"

Answer : docker container run echo "Output!"

container run <image<:<tag> ls will list the directory of the image. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

docker container run <image>:<tag> ps -ef will list the process of the <Image> linux. This statement is


Options are :

  • TRUE
  • FALSE

Answer : TRUE

Docker Certified Associate (DCA) Practice Exams Set 5

What will be the output of the command - docker container run <image> echo "Hello, World!"


Options are :

  • Hello, World
  • echo
  • Hello, World
  • Hello, World

Answer : Hello, World

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions