MCQs > IT & Programming > Docker MCQs > Basic Docker MCQs

Basic Docker MCQ

1. Choose the correct statement for Docker Compose.

Answer

Correct Answer: Allows orchestration of Docker containers natively

Note: This Question is unanswered, help us to find answer for this one

2. Swarm currently supports following values?

Answer

Correct Answer: spread
random

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

3.

How wll manager nodes handle cluster management tasks? (choose all that apply)

Answer

Correct Answer: maintaining cluster state
serving swarm mode HTTP API endpoints
scheduling services

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

4.

A fast way to remove a dangling image is to use the following command:

Answer

Correct Answer: $ docker rmi -f $(docker images -q -a -f dangling=true)

Note: This Question is unanswered, help us to find answer for this one

5.

Swarm supports the following backend discovery services?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

6.

Which statement is True of Docker swarm?

Answer

Correct Answer: A clustering tool for docker

Note: This Question is unanswered, help us to find answer for this one

7.

Which statement is correct about Service discovery?

Answer

Correct Answer: Swarm manager nodes assign each service in the swarm a unique DNS name and load balances running containers

Note: This Question is unanswered, help us to find answer for this one

8.

How can you configure the LDAP integration?

Answer

Correct Answer: Go to the UCP web UI, navigate to the Settings page, and click the Auth tab

Note: This Question is unanswered, help us to find answer for this one

9.

Choose the correct statement to describe the contents directory found under the filesystem location shown below. /var/lib/docker

Answer

Correct Answer: A collection of two files consisting of metadata in json, number of layers, and a subdirectory with the root filesystem for the image.

Note: This Question is unanswered, help us to find answer for this one

10.

Choose the correct statement to describe the Docker Hub in the Docker Workflow.

Answer

Correct Answer: Docker Hub provides both public and private storage for images, where images can be searched for and can be downloaded

Note: This Question is unanswered, help us to find answer for this one

11.

The Docker zfs storage driver makes extensive use of the following ZFS datasets:

Answer

Correct Answer: snapshots
clones
filesystems

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

12.

Choose the correct statement for Automated Builds in the Docker Workflow.

Answer

Correct Answer: Docker Hub supports GitHub and BitBucket for Automated Build via a Web commit hook.

Note: This Question is unanswered, help us to find answer for this one

13.

Choose the correct statement to describe the Docker File entry below. FROM ubuntu

Answer

Correct Answer: Includes the Ubuntu image as the base layer for the Docker File build.

Note: This Question is unanswered, help us to find answer for this one

14.

Choose the correct statement to describe Docker.

Answer

Correct Answer: Docker containers run processes with guarantees of isolation.

Note: This Question is unanswered, help us to find answer for this one

15.

For the following 'docker-compose.yml' fragment scala: build: ./scala expose: - 40000-50000 ports: - 9000:9000 - 4040:4040 links: - mongo volumes: - ../../:/root/cardio - ~/.ivy2:/root/.ivy2 - ~/.sbt:/root/.sbt stdin_open: true Choose the correct statement to describe the 'expose' command as used in the code.

Answer

Correct Answer: The 'expose' instruction indicates the ports on which a container will listen for connections

Note: This Question is unanswered, help us to find answer for this one

16.

How can you create a hashtable with the settings for your container?

Answer

Correct Answer: $webContainer = @{Name="web"; Image="anweiss/docker-platynem"; Port="80:80"}

Note: This Question is unanswered, help us to find answer for this one

17.

Choose the correct statement to describe the ENTRYPOINT argument In Dockerfiles.

Answer

Correct Answer: The ENTRYPOINT specifies a command that will always be executed when the container starts.

Note: This Question is unanswered, help us to find answer for this one

18.

You can use the Docker repository and its __ to create a Docker image, run a Docker container, and develop code in the container?

Answer

Correct Answer: Dockerfile

Note: This Question is unanswered, help us to find answer for this one

19.

Choose the correct statement for Webhooks in the Docker Workflow.

Answer

Correct Answer: Webhooks are configured on a per-repository basis to allow automated builds of your Docker image

Note: This Question is unanswered, help us to find answer for this one

20.

Choose the correct statement to describe the CMD command for Dockerfiles.

Answer

Correct Answer: The CMD command can be used for executing a specific command when docker container runs.

Note: This Question is unanswered, help us to find answer for this one

21.

Which command is True for applications to run in containers?

Answer

Correct Answer: docker run [OPTIONS] IMAGE [COMMAND] [ARG…]

Note: This Question is unanswered, help us to find answer for this one

22.

Choose the correct statement to describe Docker container namespaces.

Answer

Correct Answer: To give a container a docker namespace you have to run an ssh daemon in each container.

Note: This Question is unanswered, help us to find answer for this one

23.

What are the node filters?

Answer

Correct Answer: containerslots
constraint
port
health

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

24.

Which of the following are true? Check all that apply.

Answer

Correct Answer: Docker container is the runtime instance of docker image.
A Docker image is a read-only template.
Each container is an isolated and secure application platform.

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

25.

The is an alpha-numeric string, dots, hyphens, and underscores making up which of the following? Check all that apply.

Answer

Correct Answer: A globbing pattern, for example, abc*
A regular expression in the form of /regexp/. See re2 syntax for the supported regex syntax

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

26.

___ is a portable, lightweight runtime and packaging tool.

Answer

Correct Answer: Docker Engine

Note: This Question is unanswered, help us to find answer for this one

27.

An external CA is a trusted 3rd party company that provides a means of _____ , and otherwise managing certificates?

Answer

Correct Answer: creating, issuing, revoking

Note: This Question is unanswered, help us to find answer for this one

28.

Which statement best describes the difference between the COPY and ADD commands in a Dockerfile.

Answer

Correct Answer: COPY only supports the basic copying of local files into the container, while ADD has some features (like local-only tar extraction and remote URL support)

Note: This Question is unanswered, help us to find answer for this one

29.

Choose the most correct statement to describe Docker 'cgroups'.

Answer

Correct Answer: Docker 'cgroups' control resource usage

Note: This Question is unanswered, help us to find answer for this one

30.

The dockerd options that support the overlay network are?

Answer

Correct Answer: --cluster-store-opt
--cluster-store
--cluster-advertise

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

31.

How can you run services in the background with docker compose?

Answer

Correct Answer: docker-compose up -d

Note: This Question is unanswered, help us to find answer for this one

32.

The legacy link provided following major functionalities to the default bridge network?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

33.

Garbage collection can be run using the following command?

Answer

Correct Answer: bin/registry garbage-collect [--dry-run] /path/to/config.yml

Note: This Question is unanswered, help us to find answer for this one

34.

The cluster management and orchestration features embedded in the Docker Engine are built using?

Answer

Correct Answer: SwarmKit

Note: This Question is unanswered, help us to find answer for this one

35.

Which command is used to list services in a swarm?

Answer

Correct Answer: service ls

Note: This Question is unanswered, help us to find answer for this one

36.

At a high-level, which of the following steps will you use to integrate UCP with DRT?

Answer

Correct Answer: Configure the Docker Engine running on each UCP node to trust DTR
Configure UCP to know about DTR
Configure DTR to trust UCP

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

37.

Using the following command to create a new swarm?

Answer

Correct Answer: docker swarm init --advertise-addr <MANAGER-IP>

Note: This Question is unanswered, help us to find answer for this one

38.

___ is a cloud service for sharing applications and automating workflows.

Answer

Correct Answer: Docker Hub

Note: This Question is unanswered, help us to find answer for this one

39.

Which of the following statement True of Docker Machine?

Answer

Correct Answer: a tool for provisioning and managing your Dockerized hosts

Note: This Question is unanswered, help us to find answer for this one

40.

What does the docker swarm command “swarm join” do?

Answer

Correct Answer: Join a swarm as a manager node or worker node

Note: This Question is unanswered, help us to find answer for this one

41.

Which of the following is True? In Docker, when a container is exited

Answer

Correct Answer: The state of the filesystem is stored but the processes are not

Note: This Question is unanswered, help us to find answer for this one

42.

Swarm agents are responsible for hosting containers. They are regular docker daemons and you can communicate with them using the ___?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

43.

For the 'docker-compose.yml' fragment below

scala:

  build: ./scala

  expose:

    - 40000-50000

  ports:

    - 9000:9000

    - 4040:4040

  links:

    - mongo

  volumes:

    - ../../:/root/cardio

    - ~/.ivy2:/root/.ivy2

    - ~/.sbt:/root/.sbt

  stdin_open: true

 

mongo:

  image: mongo

  volumes_from:

    - data

  ports:

    - "27017:27017"

Choose the most correct statement to describe the 'links' block

Answer

Correct Answer: Allows the container to be linked with ALL instances of the mongo service , but each with different alias

Note: This Question is unanswered, help us to find answer for this one

44.

Docker containers can be

Answer

Correct Answer: run, started, stopped, moved, and deleted

Note: This Question is unanswered, help us to find answer for this one

45.

Choose the best description of the difference between a Docker container and a Linux process.

Answer

Correct Answer: The diference between a container over a process is some extra kernel resources to manage namespaces, file systems and control groups

Note: This Question is unanswered, help us to find answer for this one

46.

Multiple containers share the same kernel, but each container can be constrained to only use a defined amount of resources such as _____ , memory and I/O?

Answer

Correct Answer: CPU

Note: This Question is unanswered, help us to find answer for this one

47.

The default Engine and Swarm ports for TLS are?

Answer

Correct Answer: Swarm manager: 3376/tcp
Engine daemon: 2376/tcp

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

48.

Can data volume containers be used/mounted in containers residing on other hosts within a docker swarm?

Answer

Correct Answer: Docker, by itself, does not provide any facility for either migrating data or sharing data between hosts in a cluster

Note: This Question is unanswered, help us to find answer for this one

49.

Which statement correctly describes a ‘docker.sock’.

Answer

Correct Answer: The docker command line tool contacts the docker daemon process via a UNIX domain socket socket at /var/run/docker.sock

Note: This Question is unanswered, help us to find answer for this one

50.

Choose the correct statement for Docker Swarm

Answer

Correct Answer: Docker Swarm provides a common interface onto the many orchestration and scheduling frameworks.

Note: This Question is unanswered, help us to find answer for this one

51.

Docker is an open platform for developers and __ to build, ship, and run distributed application?

Answer

Correct Answer: sysadmins

Note: This Question is unanswered, help us to find answer for this one

52.

In docker, a union file system is the union of ?

Answer

Correct Answer: Read-write layer and all read-only layers

Note: This Question is unanswered, help us to find answer for this one

53.

Docker diff command has 3 events listed in it. They are

Answer

Correct Answer: A-Add; D-Delete; C-Change;

Note: This Question is unanswered, help us to find answer for this one

54.

The Docker client and daemon can communicate via?

Answer

Correct Answer: Both1 and 2

Note: This Question is unanswered, help us to find answer for this one

55.

What are the two major Docker components?

Answer

Correct Answer: Docker and docker-hub

Note: This Question is unanswered, help us to find answer for this one

56.

How will a server running multiple Docker containers handle the TCP limitation?

Answer

Correct Answer: The total cap of TCP connections will be capped by the Docker host

Note: This Question is unanswered, help us to find answer for this one

57.

When using 'systemd' your docker containers start but get shut down instantly. Choose the best explanation for why this may be happening.

Answer

Correct Answer: You have not specified a Type in your systemd unit file

Note: This Question is unanswered, help us to find answer for this one

58.

Which statement best describes how Docker's Containers are different to Virtual Machines?

Answer

Correct Answer: A Docker containers runs in the same kernel as it's host. A Virtual Machine gets it's own kernel.

Note: This Question is unanswered, help us to find answer for this one

59.

Which of the following is true?

Answer

Correct Answer: Processes running within a container cannot see, and even less affect, processes running in another container, or in the host system.

Note: This Question is unanswered, help us to find answer for this one

60.

Docker can be integrated into various infrastructure tools, including?

Answer

Correct Answer: Amazon Web Services
Google Cloud Platform
IBM Bluemix
Microsoft Azure

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

61.

Custom, cross-host container networks are?

Answer

Correct Answer: Inbound 7946/tcp
Inbound 7946/udp
Inbound

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

62.

The container configuration filters are?

Answer

Correct Answer: affinity
dependency
port

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

63.

The “exec” command in docker is used to

Answer

Correct Answer: Run a command in a running container

Note: This Question is unanswered, help us to find answer for this one

64.

Docker Universal Control Plane (UCP) is the enterprise-grade cluster management solution from?

Answer

Correct Answer: Docker

Note: This Question is unanswered, help us to find answer for this one

65.

Containers on the network ___ DNS mappings for the service via gossip so any container on the network can access the service via its service name?

Answer

Correct Answer: share

Note: This Question is unanswered, help us to find answer for this one

66.

Which statement best describes Docker as a technology innovation.

Answer

Correct Answer: Docker allows developers to pack, ship, and run any application to a lightweight, portable, self sufficient consistent production environment.

Note: This Question is unanswered, help us to find answer for this one

67.

Docker is

Answer

Correct Answer: a software containerization platform

Note: This Question is unanswered, help us to find answer for this one

68.

Scheduling strategies are how Swarm decides which nodes on a cluster to start containers on. Swarm supports the following strategies?

Answer

Correct Answer: binpack
random
spread

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

69.

For the following 'docker-compose.yml' fragement scala: build: ./scala expose: - 40000-50000 ports: - 9000:9000 - 4040:4040 links: - mongo volumes: - ../../:/root/cardio - ~/.ivy2:/root/.ivy2 - ~/.sbt:/root/.sbt stdin_open: true Choose the most correct statement to describe the ' volumes' command as it appears in the code.

Answer

Correct Answer: The ' volumes' command is used here to enable access from your container to a directory on the host machine.

Note: This Question is unanswered, help us to find answer for this one

70.

Which command is used to show all running containers?

Answer

Correct Answer: docker ps

Note: This Question is unanswered, help us to find answer for this one

71.

The docker compose sub-command “up” is used to?

Answer

Correct Answer: C)Both A and B

Note: This Question is unanswered, help us to find answer for this one

72.

Can an individual Docker container, for example a web server, that exposes (listens on) a port be started using systemd's socket activation feature?

Answer

Correct Answer: It is not possible using default docker implementation

Note: This Question is unanswered, help us to find answer for this one

73.

How do links and scaling work together in docker compose?

Answer

Correct Answer: When scaling a container from a compose application you need to use the new multi-host networking functionality to connect containers across different physical or virtual hosts

Note: This Question is unanswered, help us to find answer for this one

74.

What does the docker management command dockerd do?

Answer

Correct Answer: Launch the Docker daemon

Note: This Question is unanswered, help us to find answer for this one

75.

What format of compose files are supported by docker?

Answer

Correct Answer: Both YAML and JSON

Note: This Question is unanswered, help us to find answer for this one

76.

What is the command used to convert a container into an image?

Answer

Correct Answer: docker commit

Note: This Question is unanswered, help us to find answer for this one

77.

Which statement best describes the possible security implications of public docker images

Answer

Correct Answer: If you accidentally publish a credential(s), Delete the public image and update the credentials on whatever system(s) it has compromised

Note: This Question is unanswered, help us to find answer for this one

78.

Which of the following is NOT a valid docker command for images?

Answer

Correct Answer: pause

Note: This Question is unanswered, help us to find answer for this one

79.

Which of the following is NOT true?

Answer

Correct Answer: JSON format can be used for dockerfiles.

Note: This Question is unanswered, help us to find answer for this one

80.

The command to list all currently available images is?

Answer

Correct Answer: docker images

Note: This Question is unanswered, help us to find answer for this one

81.

Signed manifests include an image manifest and a list of signatures generated by libtrust. A signature consists of the following fields?

Answer

Correct Answer: signature
header
protected

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

82.

Choose the correct statement to describe the Docker repository

Answer

Correct Answer: You can tag an image, and store multiple versions of that image with different GUIDs in a single named repository

Note: This Question is unanswered, help us to find answer for this one

83.

Which statement correctly describes a docker image.

Answer

Correct Answer: An image is a read only layer used to build a container. They do not change

Note: This Question is unanswered, help us to find answer for this one

84.

Choose the correct statement

Answer

Correct Answer: The command 'docker rmi' removes an image

Note: This Question is unanswered, help us to find answer for this one

85.

The “rmi” command in docker is used to?

Answer

Correct Answer: Remove one or more docker images

Note: This Question is unanswered, help us to find answer for this one