FREE Docker Certified Associate Questions and Answers
Which of the aforementioned commands should be used to establish a MySQL 5.4 database container?
The docker create --name database mysql:5.4 command creates a Docker container with the name "database" based on the mysql:5.4
Which process's output will the docker attach command make available on the terminal as standard output?
The output of a process executed via the ENTRYPOINT or CMD instructions in a Docker container will be available on the terminal as standard output when using the docker attach command.
When you attach to a running container using docker attach, it connects your terminal to the container's standard input, output, and error streams (stdin, stdout, stderr). This allows you to interact with the container and see the output produced by processes running inside.
If the Dockerfile specifies an ENTRYPOINT or CMD instruction that launches a process, the output generated by that process will be sent to the container's stdout. When you use docker attach to connect to the container, you will see the process's output displayed on your terminal.
On your local machine, a five-node swarm cluster has been deployed. What will happen if the cluster's sole manage node fails?
In a Docker Swarm cluster, if the only manager node fails, the swarm services will continue to run, provided that there are still available worker nodes. The worker nodes in the cluster will maintain the running containers and continue to serve the services without interruption.
However, it's important to note that without an active manager node, you won't be able to perform management operations such as creating or updating services, scaling replicas, or deploying new stacks. These management tasks require communication with a manager node.
What command is used to backup Docker containers among the list below?
The docker export command is used to export the contents of a Docker container's filesystem as a tar archive. It allows you to create a snapshot of the container's filesystem at a specific point in time.
How can a running container on a Linux host be interpreted?
On a Linux host, a running container can be interpreted as a collection of isolated processes with their own filesystem, network stack, and resource constraints. Containers on Linux are implemented using kernel features such as namespaces and cgroups, which provide process and resource isolation.
What is the Docker container's default container format?
Libcontainer is a library developed by the Docker project (now part of the Open Container Initiative) that provides a native interface to manage containerization features in various operating systems. It is responsible for creating and managing containers, isolating their resources, and setting up namespaces, control groups, and other operating system-level constructs to provide secure and isolated environments for running applications.
Libcontainer acts as an abstraction layer between Docker and the underlying operating system, allowing Docker to work with different containerization technologies depending on the host system. It supports multiple container runtimes such as Docker's own runtime, runc, as well as other container runtimes compliant with the Open Container Initiative (OCI) runtime specifications.
Which of the following is NOT a Docker Swarm node type?
In Docker Swarm, the term "master" is not used to refer to a specific node type. Docker Swarm uses the concepts of "manager nodes" and "worker nodes" instead.
Manager nodes are responsible for managing the swarm and its resources. They handle tasks such as accepting service definitions, scheduling tasks, and maintaining cluster state. A Docker Swarm cluster can have one or more manager nodes, but typically it is recommended to have an odd number of manager nodes for better fault tolerance and consensus decision-making.