D.maintaining cluster state
Manager nodes handle cluster management tasks:
maintaining cluster state scheduling services
serving swarm mode HTTP API endpoints Worker nodes
Worker nodes are also instances of Docker Engine whose sole purpose is to execute containers. Worker nodes don’t participate in the Raft distributed state, make scheduling decisions, or serve the swarm mode HTTP API.
Reference: https://docs.docker.com/engine/swarm/how-swarm-mode-works/nodes/#worker- nodes
You are building a Docker image with the following Dockerfile. How many layers will the resulting image have? FROM scratch
FROM scratch CMD /app/hello.sh
The image contains all the layers from the base image (only one in this case, since we’re building rom scratch), plus a new layer with the CMD instruction, and a read-write container layer.
What storage driver does Docker generally recommend that you use if it is available?
After you have read the storage driver overview, the next step is to choose the best storage driver for your workloads. In making this decision, there are three high-level factors to consider:
If multiple storage drivers are supported in your kernel, Docker has a prioritized list of which storage driver to use if no storage driver is explicitly configured, assuming that the prerequisites for that storage driver are met:
If aufs is available, default to it, because it is the oldest storage driver. However, it is not universally available.
In which Docker Swarm model does the swarm manager distribute a specific number of replica tasks among the nodes based upon the scale you set in the desired state?
A service is the definition of the tasks to execute on the worker nodes. It is the central structure of the swarm system and the primary root of user interaction with the swarm.
When you create a service, you specify which container image to use and which commands to execute inside running containers.
In the replicated services model, the swarm manager distributes a specific number of replica tasks among the nodes based upon the scale you set in the desired state.
For global services, the swarm runs one task for the service on every available node in the cluster. A task carries a Docker container and the commands to run inside the container. It is the atomic scheduling unit of swarm. Manager nodes assign tasks to worker nodes according to the number of replicas set in the service scale. Once a task is assigned to a node, it cannot move to another node. It can only run on the assigned node or fail.
On which local address does the Docker DNS server listen? A.127.0.0.1
Note: If you need access to a host’s localhost resolver, you must modify your DNS service on the host to listen on a non-localhost address that is reachable from within the container.
Note: The DNS server is always at 127.0.0.11.
What are the default memory limit policies for a Docker container?
A.Limited memory, limited kernel memory
B.Unlimited memory, limited kernel memory
C.Limited memory, unlimited kernel memory
D.Unlimited memory, unlimited kernel memory
Kernel memory limits are expressed in terms of the overall memory allocated to a container. Consider the following scenarios:
Unlimited memory, unlimited kernel memory: This is the default behavior.
Unlimited memory, limited kernel memory: This is appropriate when the amount of memory needed by all cgroups is greater than the amount of memory that actually exists on the host machine. You can configure the kernel memory to never go over what is available on the host machine, and containers which need more memory need to wait for it.