What is the purpose of the 'docker push' command in the context of a Docker Registry?
Build a Docker image from a Dockerfile
Download an image from a registry
Upload an image to a registry
Run a Docker container from an image
How do you stop a running Docker container named 'mycontainer'?
docker kill mycontainer
docker down mycontainer
docker halt mycontainer
docker stop mycontainer
You want to execute 'ls -l' inside a container named 'app-server' and allocate a pseudo-TTY. Which command is correct?
docker exec -it app-server ls -l
docker run -it app-server ls -l
docker exec -d app-server ls -l
docker exec app-server -it ls -l
When choosing a data persistence strategy in Docker, which factor should be considered carefully?
The color scheme of the Docker logo.
The version of Docker being used.
The sensitivity and importance of the data being stored.
The number of containers running on the host.
What role does a manager node play in a Docker Swarm cluster?
Executes the actual application tasks within containers
Provides networking and load balancing for the cluster
Stores and distributes Docker images to worker nodes
Manages cluster state, schedules tasks, and ensures service availability
What is the purpose of the ONBUILD instruction in a Dockerfile?
ONBUILD
To define commands that will be executed when a new image is built FROM the current image.
To specify environment variables that will be available at build time.
To define commands that will be executed when the container starts.
To specify the base image for the Dockerfile.
How can you invalidate the Docker build cache for a specific instruction?
By modifying the instruction itself.
By using the --no-cache flag during the build process.
--no-cache
By deleting the corresponding image layer.
All of the above.
What is the purpose of volume drivers in Docker?
To enable the use of remote storage or cloud-based solutions for volumes.
To restrict container access to specific volumes.
To manage the lifecycle of bind mounts.
To improve the performance of volume operations.
How can Docker be utilized to speed up the build process in a CI/CD pipeline?
By caching frequently used dependencies within Docker images
By automatically scaling the number of build servers based on load
By replacing the need for unit tests in the development process
By directly deploying code changes to production without testing
Which of the following is a key characteristic of bind mounts in Docker?
They directly link a directory on the host machine to a container's filesystem.
They are the preferred method for managing sensitive data within Docker containers.
They are stored within the Docker's internal storage system.
They provide a way to share data between containers.