How do you stop a running Docker container named 'mycontainer'?
docker halt mycontainer
docker stop mycontainer
docker kill mycontainer
docker down mycontainer
What is the primary advantage of using multi-stage builds in Docker?
To enable parallel execution of build steps.
To reduce the size of the final Docker image.
To improve network performance during the build process.
To simplify the process of building complex applications.
What is the default networking mode in Docker Compose when no explicit network configuration is provided?
None
Host
Bridge
Overlay
What is a key advantage of using Docker with Jenkins for deployments?
Docker eliminates the need for orchestration tools like Kubernetes
Docker automatically scales applications based on real-time traffic
Docker handles database migrations as part of the deployment process
Docker enables immutable deployments, ensuring consistent application versions across environments
What is the role of authentication tokens in the context of a Docker Registry?
They provide temporary access credentials for interacting with the registry.
They are used to digitally sign images to ensure their integrity.
They are used to encrypt images stored in the registry.
They define the network routes for communication between the registry and clients.
What is the purpose of volume drivers in Docker?
To manage the lifecycle of bind mounts.
To enable the use of remote storage or cloud-based solutions for volumes.
To restrict container access to specific volumes.
To improve the performance of volume operations.
How can you create a custom network with specific configurations (e.g., IP range, driver) in Docker Compose?
By defining the network within the services section of the docker-compose.yml file
services
docker-compose.yml
By using the docker network create command separately and referencing the network in the docker-compose.yml file
docker network create
Docker Compose does not allow custom network configurations
By specifying the network configurations within the networks section of the docker-compose.yml file
networks
What is a key benefit of using a private Docker Registry in a continuous integration/continuous deployment (CI/CD) pipeline?
It allows for easier public image discovery.
It enables faster and more controlled image distribution within the pipeline.
It eliminates the need for image version control.
It simplifies the process of building images from source code.
What information does the 'docker inspect' command provide?
The status (running/stopped) of a container
Low-level information about a container, image, or network
Real-time resource usage of a running container
A list of all environment variables in a container
Which data persistence approach provides the highest level of isolation between the host system and container data?
Bind mounts.
Directly writing data to the container's filesystem.
Using a shared network drive.
Docker volumes.