How can Docker be utilized to speed up the build process in a CI/CD pipeline?
By replacing the need for unit tests in the development process
By caching frequently used dependencies within Docker images
By automatically scaling the number of build servers based on load
By directly deploying code changes to production without testing
How do you retrieve the IP address of a running Docker container using 'docker inspect'?
docker inspect <container_name> | find 'IP'
docker inspect <container_name> | grep IPAddress
docker inspect -f '{{.NetworkSettings.IPAddress}}' <container_name>
docker inspect <container_name> --format IP
What information does the 'docker inspect' command provide?
The status (running/stopped) of a container
Real-time resource usage of a running container
A list of all environment variables in a container
Low-level information about a container, image, or network
How does Docker contribute to improved security in CI/CD?
Docker automatically encrypts data at rest and in transit
Docker's containerization provides isolation, limiting the impact of vulnerabilities
Docker enforces strict access control policies on application code
Docker eliminates the need for security updates by isolating applications
How does Docker optimize build cache for the RUN instruction?
RUN
It caches the result of each individual command within a RUN instruction.
It caches the entire file system state after each RUN instruction.
It does not cache the results of RUN instructions.
It only caches the output of the RUN command if it has changed.
How can you view the logs of a specific container named 'webserver'?
docker inspect webserver | grep logs
docker logs -id webserver
docker show-logs webserver
docker logs webserver
How can you invalidate the Docker build cache for a specific instruction?
By modifying the instruction itself.
All of the above.
By deleting the corresponding image layer.
By using the --no-cache flag during the build process.
--no-cache
What is the primary purpose of Docker Swarm?
Building Docker images faster
Deploying and managing containerized applications at scale
Scanning Docker images for vulnerabilities
Storing and versioning Docker images
Which command is used to initialize a Docker Swarm?
docker swarm create
docker swarm up
docker swarm init
docker swarm start
What is the purpose of 'docker exec' command?
To push a Docker image to a registry
To execute a command inside a running container
To build a Docker image from a Dockerfile
To list all available Docker images