The command "docker container run -p <HOST-PORT>:<CONTAINER-PORT> <image> " is a valid command. This statement is
Options are :
Answer : TRUE
Docker and Containers: Commands Set 1
The command "docker container run --detach --name webserver2 --publish 80:80 ABC:<tag> " and command "docker container run -d --name webserver2 -p 80:80 ABC:<tag>" will output the same result. This statement is
Options are :
Answer : TRUE
To bind a specific port number that is being published we can use the --p option. This statement is
Options are :
Answer : TRUE
Which of the following command is used to view the different options that can be used with the "logs" commands?
Options are :
- docker logs --help
- docker container logs help
- docker container logs --help
- docker container --help
Answer : docker container logs --help
Docker and Containers: Commands Set 1
Which of the command can be used to see the logs of the webserver named "webserver"?
Options are :
- docker container log webserver
- docker container --logs webserver
- docker container logs webserver
- docker container --l webserver
Answer : docker container logs webserver
To display only the last few logs information we can use the --tail option. This statement is
Options are :
Answer : TRUE
To display only the last 2 logs information of the webserver, we can use which of the following command?
Options are :
- docker container logs 2 --tail webserver
- docker logs --tail 2 webserver
- docker container logs --tail 2 webserver
- docker logs 2 TAIL webserver
Answer : docker container logs --tail 2 webserver
Docker and Containers: Commands Set 2
To display only the last 3 logs information of the webserver, we can use which of the following command?
Options are :
- docker container logs 3 --tail webserver
- docker logs --tail 3 webserver
- docker container logs --tail 3 webserver
- docker logs TAIL 3 webserver
Answer : docker container logs --tail 3 webserver
If we pass a negative number or a non-integer to the "--tail" command, what will be the output?
Options are :
- The value is set to "latest" in that case
- The value is set to "latest 2" in that case
- The value is set to "all" in that case
- The value is set to "first" in that case
Answer : The value is set to "all" in that case
Which command is used to list out the different options that can be used with the command "inspect"?
Options are :
- docker inspect --help
- docker container --help
- docker container inspect --help
- docker container inspect --HELP
Answer : docker container inspect --help
Docker Certified Associate (DCA) Set 2
Which command is used to inspect the different states of container?
Options are :
- docker inspect
- docker container
- docker container inspect
- docker container inspect
Answer : docker container inspect
Which of the following is correct use of the "--format" command?
Options are :
- docker inspect --format "{?{.Config.Image}}" webserver
- docker container --format "{?{.Config.Image}}" webserver
- docker container inspect --format "{?{.Config.Image}}" webserver
- docker container inspect --format "{?{.Config.Image}}"
Answer : docker container inspect --format "{?{.Config.Image}}" webserver
Which of the following is correct use of the "--format" command?
Options are :
- docker inspect --format "{?{json .Config }}" webserver
- docker container --format "{?{json .Config }}" webserver
- docker container inspect --format "{?{json .Config }}" webserver
- docker container inspect --format "{?{json .Config }}"
Answer : docker container inspect --format "{?{json .Config }}" webserver
Docker Certified Associate (DCA) Practice Exams Set 10
Which of the following is a command that can be used with the command "inspect"?
Options are :
Answer : grep
Which of the following command is used for a graceful shutting down of a container?
Options are :
- docker stop
- docker container stop
- docker container stop
- docker stop container
Answer : docker container stop
Which of the following command is used to stop a running container, but it will stop the main entry point process abruptly which may lead to a damaged file system?
Options are :
Answer : Kill
Docker and Containers: Commands Set 3
Which of the following command is used to kill a running container?
Options are :
- docker kill
- docker container
- docker container kill
- docker container KILL
Answer : docker container kill
Which of the following command is used to start a stopped container?
Options are :
- docker start
- docker container
- docker container start
- docker container start
Answer : docker container start
Which of the following keyword is used to start a stopped container?
Options are :
Answer : start
Docker Certified Associate (DCA) Set 6
Which command is the right command to start a container and attach it to the client?
Options are :
- docker container start webserver4
- docker container -a webserver5
- docker container start -a webserver3
- docker container start a webserver6
Answer : docker container start -a webserver3
To start a container and attach it to the client use the -a option with start command. This statement is
Options are :
Answer : TRUE
Which command can be used to remove a stopped container without any error?
Options are :
Answer : rm
Docker Certified Associate (DCA) Practice Exams Set 13
We can remove a running container without receiving any error message. This statement is
Options are :
Answer : FALSE
Which of the following is a valid Entrypoint command?
Options are :
- ENTRYPOINT ["ping", "-c", "4", "localhost"]
- ENTRYPOINT ["ping", "--c", "4", "localhost"]
- ENTRYPOINT ["ping", "c", "4", "localhost"]
- ENTRYPOINT ["ping", "-c"]
Answer : ENTRYPOINT ["ping", "-c", "4", "localhost"]
Which of the following is valid form of Entrypoint command?
Options are :
- ENTRYPOINT command param1 param2
- ENTRYPOINT ["executable", "param1", "param2"]
- Both A and B
- ENTRYPOINT command "param1" "param2"
Answer : Both A and B
Docker Certified Associate (DCA) Practice Exams Set 7
Which of the following is a valid command to set environment variable?
Options are :
- docker container run --rm \ --env SOME_VAR_ONE=HelloWorld1 \ --env SOME_VAR_TWO=HelloWorld1 \ --env SOME_VAR_THREE=HelloWorld1 \ -it ABC: sh
- docker container run --rm \ --env SOME_VAR_ONE=HelloWorld1 --env SOME_VAR_TWO=HelloWorld1 --env SOME_VAR_THREE=HelloWorld1 -it ABC: sh
- docker container run --rm \ env SOME_VAR_ONE=HelloWorld1 \ env SOME_VAR_TWO=HelloWorld1 \ env SOME_VAR_THREE=HelloWorld1 \ -it ABC: sh
- docker container run --rm \ --env SOME_VAR_ONE=HelloWorld1 \ --env SOME_VAR_TWO=HelloWorld1 \ env SOME_VAR_THREE=HelloWorld1 \ -it ABC: sh
Answer : docker container run --rm \ --env SOME_VAR_ONE=HelloWorld1 \ --env SOME_VAR_TWO=HelloWorld1 \ --env SOME_VAR_THREE=HelloWorld1 \ -it ABC: sh
We can concenate commands using unix syntax of &&. This statement is
Options are :
Answer : TRUE
Is it a valid option available with container run command? --dns list
Options are :
Answer : TRUE
Docker Certified Associate (DCA) Practice Exams Set 12
Is it a valid option available with container run command? --cpus decimal
Options are :
Answer : TRUE
Is it a valid option available with container run command? --device list
Options are :
Answer : TRUE