Docker Associate Certification Flashcards

Revise and prepare for the Docker Associate Certification

1
Q

How can we supply our own certificates for UCP and DTR?

A

We can upload them through the web UIs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the CNM concept called that connects a container sandbox to a network?

A

Endpoint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the recommended method for explicitly setting the storage driver?

A

Using the Docker daemon config file /etc/docker/daemon.json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What ‘docker run’ flag is used for automatically deleting a container if it stops?

A

–rm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a pluggable framework used for various implementations of containers’ internal storage?

A

Storage Drivers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the docker daemon config file?

A

/etc/docker/daemon.json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What flag is used to limit which nodes a service’s task will run on using node labels?

A

–constraint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command would we use to delete a stack?

A

docker stack rm STACK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In UCP security a large group of teams that share similar permissions would be called?

A

An organisation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the docker command used for retrieving detailed information about an object?

A

docker inspect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What flag is used for encrypting an overlay network?

A

–opt encrypted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the name of the type of docker mount that manages the location of the data on the host dynamically?

A

Volume

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a ‘devicemapper’ mode that is intended for testing purposes only?

A

loop-lvm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What flag is used for spreading a services task’s evenly based on a node label?

A

–placement-pref spread=LABEL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What three main packages are needed for the installation of Docker CE?

A
  1. docker-ce
  2. docker-ce-cli
  3. containerd.io
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What docker command is used for listing the nodes in a swarm?

A

docker node ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

In UCP security, a group of users that share the same set of permissions is known as what?

A

A team

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What docker command is used for listing all running and stopped containers?

A

docker ps -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is Docker’s networking architectural framework called?

A

Container Networking Model (CNM)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What does docker EE stand for?

A

Docker Enterprise Edition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the Docker command for service creation?

A

docker service create

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the docker command for stopping a running container?

A

docker container stop CONTAINER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the network driver called that isolates containers, but provides further networking implementation?

A

none

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the default storage driver for the latest versions of Ubuntu and CentOS called?

A

overlay2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What restart policy indicates that a container should be automatically restarted if it exists, regardless of whether it succeeds or fails, and when the docker daemon starts?

A

always

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is the docker daemon flag for setting the storage driver?

A

–storage-driver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is the network driver called that uses the host’s network stack directly with no isolation?

A

host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What command is used for retrieving the ‘unlock-key’ from an unlocked swarm manager?

A

docker swarm unlock-key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

How can we detect vulnerabilites in our software with DTR?

A

Through the use of image vulnerability scanning, we can detect them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What command can be used for retrieving more information about an image?

A

docker image inspect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What would be the location of trusted certificates in Docker?

A

/etc/docker/certs.d/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What is the non-free version of Docker called?

A

Docker Enterprise Edition (EE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What is the free, open-source version of Docker called?

A

Docker Community Edition (CE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What ‘devicemapper’ mode is recommended for production use?

A

direct-lvm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What ‘docker run’ flag is used to set a soft limit on memory usage, and when the host runs out of memory?

A

–memory-reservation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What flag can be used to provide a Go template to ‘docker inspect’ for retrieving specific data?

A

–format

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

How do we change the default logging driver options?

A

We can set the “log-opts” value in /etc/docker/daemon.json.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What command can be leveraged to view how storage is being used by Docker?

A

docker system df

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

What restart policy indicates that a container must restart if it exits with a non-zero exit code?

A

on-failure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

What command can be used to update the number of replicas in a service?

A

docker service update --replicas REPLICAS SERVICE_NAME
or
docker service scale SERVICE_NAME=REPLICAS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

What is UCP?

A

The Universal Control Plane (UCP) is an enterprise-grade Docker and Kubernetes cluster with a web UI and contains additional features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

What is the default storage driver for CentOS 7 or earlier called?

A

devicemapper

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

What is the restart policy that indicates a container should be automatically restarted if it exits, regardless of whether it succeeds or fails, when the docker daemon starts, unless the container is explicitly stopped?

A

unless-stopped

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

What is the service publising mode that only listens on nodes where the services tasks are running?

A

host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

What is the command for creating or updating a stack?

A

docker stack deploy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

In UCP security, a subject who can do something, or rather a role that defines what they can do, and the collection of objects that they are allowed to act upon is called?

A

A grant defines what they can do and the collection of objects that they are allowed to act upon.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What flag is used to set the network to a container that it will be attached to?

A

–network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What command can be used to the rotate the ‘unlock-key’ in a swarm?

A

docker swarm unlock-key –rotate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

How can we change the default logging driver?

A

We can set the “log-driver” value in “etc/docker/daemon.json”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

What flag is used to set a custom DNS for a container?

A

–dns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

What is the storage model called that stores data in regular files on the host file system?

A

Filesystem storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

What volume driver stores data externally using SSH, so it is easily accessed from any node in a cluster?

A

vieux/sshfs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

What is the docker run flag for setting a hard upper limit on memory usage?

A

–memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

What is the docker service mode called that runs exactly one replica on each node?

A

global

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

How would we grant a user access to Docker?

A

We would add the user to the docker group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

What is the package that contains all the software and data needed to run a container?

A

Image

57
Q

What is the command for authenticating with a secure registry?

A

docker login

58
Q

What is the command for retrieving the current version of docker?

A

docker version

59
Q

What is a container image that is useful for network troubleshooting?

A

nicolaka/netshoot

60
Q

What netwrok driver uses virtual bridge interfaces for connecting containers on the same host?

A

Bridge

61
Q

What would be the number of managers required to maintain quorum?

A

More than half

62
Q

Where can we retrieve a repository URL for installing Docker EE?

A

Docker Hub

63
Q

What does MTLS stand for?

A

Mutually Authenticated Transport Layer Security

64
Q

What command lists images on the host?

A

docker image ls

65
Q

What docker CNM concept refers to a container’s network space in an isolated state?

A

Sandbox

66
Q

What network driver uses a routing mechanism to connect containers on different hosts?

A

overlay

67
Q

How can we prevent tags from being overwritten in DTR?

A

We can make the repository immutable

68
Q

What is the docker swarm node called, that controls the cluster?

A

A swarm manager

69
Q

What command retrieves container logs from all tasks tied to a service?

A

docker service logs SERVICE

70
Q

What command adds a label to a node?

A

docker node update –label-add LABEL NODE_NAME

71
Q

What important data does a backup of the DTR metadata not handle?

A

Images

72
Q

What is the cluster management solution packaged with Docker called?

A

Docker Swarm

73
Q

What is the dockerfile directive used to set environment variables called?

A

ENV

74
Q

What does the IPAM driver stand for?

A

IP Address Management Driver

75
Q

What is the central location for storing and distributing images called?

A

The registry is the central location

76
Q

How do we backup DTR images?

A

We backup the contents of the image volume?

77
Q

What is the docker command that is used to generate a ‘join’ command that can be run on a worker so that it can join the cluster?

A

docker swarm join-token worker

78
Q

How do we specify when a container should be automatically restarted with a ‘docker run’?

A

We use the –restart flag

79
Q

What tool is used to run a multi-container appplication on a single host?

A

Docker compose

80
Q

What is a storage model that stores data in an external, object-based store called?

A

Object storage

81
Q

How would we run a specific image tag with ‘docker run’?

A

docker run IMAGE:TAG

82
Q

What is the docker command used for container deletion?

A

docker container rm CONTAINER

83
Q

What is the default restart policy for Docker containers?

A

no

84
Q

What is the ‘docker run’ flag for publishing a port?

A

-p HOST_PORT:CONTAINER_PORT

85
Q

What is the docker command for starting a stopped container?

A

docker container start CONTAINER

86
Q

What is the name of the docker service mode that runs a specified number of replicas?

A

Replicated

87
Q

What does the ‘docker run -d’ command do?

A

It runs the container in the detached mode ( in the background)

88
Q

How do we enable the auto lock feature in a docker swarm?

A

We can use the docker swarm update --autolock=true command.

89
Q

What does DTR stand for?

A

Docker Trusted Registry

90
Q

What is the storage model called that uses special block devices to store data?

A

Block storage

91
Q

What is the name of the kernel feature that Docker uses to enforce resource usage rules?

A

cgroups

92
Q

What allows us to download a client certificate and configuration scripts from UCP easily?

A

A client bundle allows us to perform this

93
Q

In UCP security, what defines the specific actions that someone has permission to do as part of a grant?

A

A role defines specific actions

94
Q

How do we pass commands and arguments to a container with ‘docker run’?

A

docker run IMAGE COMMAND ARGS…

95
Q

What command is used for running a container?

A

docker run IMAGE

96
Q

What command is used for retrieving container logs?

A

docker logs CONTAINER

97
Q

In the docker CNM concept: multiple endpoints that can communicate with each other would be known as what?

A

A network

98
Q

What is the name of the Docker Build that uses multiple ‘FROM’ directives?

A

Multi-stage build

99
Q

What is the dockerfile directive for running a command and committing the result?

A

RUN

100
Q

What flags can override the logging driver configuration of a container?

A

–log-driver’ and ‘–log-opt’

101
Q

What are flags used for mounting volumes with ‘Docker run’?

A

-v
or
--mount

102
Q

What command can we use to unlock a locked Swarm manager?

A

docker swarm unlock

103
Q

What is the process of downgrading the Docker Engine?

A

“1. Stop Docker.

  1. Remove packages.
  2. Install an older package version.”
104
Q

What is the netwrok driver that connects containers to host interfaces but uses unique settings to provide isolation?

A

macvlan

105
Q

What is the name of the service publishing mode that listens on all nodes?

A

ingress’ mode

106
Q

What is the command for listing all intermediate images?

A

docker image ls -a

107
Q

What is the kernel feature called that limits what resources a process can see?

A

Namespaces

108
Q

What does UCP stand for?

A

Universal Control Plane

109
Q

What is the command for creating a Docker Network?

A

docker network create

110
Q

What docker command lets us initialise a swarm?

A

docker swarm init –advertise-addr

111
Q

What is the command for signing and pushing an image?

A

dokcer trust sign TAG

112
Q

What is a swarm node called that executes the clusters’ workloads?

A

A worker node

113
Q

What is the command for building an image from a Dockerfile?

A

docker build

114
Q

How would we access the Docker daemon logs?

A

We would use the sudo journalctl -u docker command.

115
Q

How do we inject a container into another container’s network sandbox for troubleshooting?

A

We would use the --network container: command.

116
Q

What kernel feature provides granular permission to container processes without the need for ‘root’ access?

A

Capabilities

117
Q

What would the process entail for upgrading the Docker Engine?

A

It would require installing a newer package version.

118
Q

What would be a configuration value that we can use to set a custom default ‘DNS’ in ‘daemon.json’?

A

“dns”

119
Q

What is it called when we have a collection of multiple services deployed to a swarm as a unit?

A

Stack

120
Q

What is Docker Trusted Registry (DTR)?

A

An enterprise-level private registry that consists of a web user interface (UI) and additional features

121
Q

What does ‘docker run –name NAME’ command do?

A

It sets the name for the container

122
Q

What command is used for deleting an image?

A

docker image rm

123
Q

What is a namespace that requires special, advanced configuration before docker can use it?

A

User

124
Q

What command is used for downloading an image from a registry?

A

docker pull

125
Q

How would we backup UCP and DTR metadata?

A

We would run the backup command with the UCP/DTR images.

126
Q

What is the default storage driver for Ubuntu and CentOS 8+?

A

overlay2

127
Q

What is the Docker config file key called for setting the storage driver?

A

storage-driver

128
Q

What is the type of Docker mount that mounts a specific directory on the host to a container?

A

Bind mount

129
Q

What is the pluggable system for managing container logs called?

A

Logging drivers

130
Q

What is the Dockerfile directive called for specifying a custom command when checking whether the container is healthy?

A

HEALTHCHECK

131
Q

How would we enable Docker Content Trust (DCT)?

A

We set the environment variable: DOCKER_CONTENT_TRUST=1.

132
Q

What is the Docker restart policy called that indicates whether the container should never be restarted automatically?

A

no

133
Q

What is the Dockerfile directive for setting the base image?

A

FROM

134
Q

How would we distribute 7 manager nodes across 3 availability zones?

A

3-2-2

135
Q

What is the command for automatically deleting unused images?

A

docker image prune

136
Q

What directory would we backup if we needed to backup Swarm data?

A

/var/lib/docker/swarm

137
Q

What is the Dockerfile directive for setting a default command for containers?

A

CMD

138
Q

What would we call a collection of replica containers running the same image in a swarm?

A

A service consists of a collection of replica containers running the same image in a swarm.

139
Q

What is the Docker command for listing any running containers?

A

docker ps