General Docker III
1.
What is the purpose of Docker Compose?
To manage Docker volumes
To create standalone Docker containers
To define and run multi-container Docker applications
To monitor Docker networks
2.
What is the purpose of the Dockerfile instruction USER?
To specify the base image
To define the working directory
To set the user that the image should run as
To configure the container's environment
3.
How do you remove a Docker image from the local machine?
docker destroy image
docker image rm
docker remove image
docker delete image
4.
How do you remove all Docker images from the local machine?
docker image prune -a
docker rmi -f $(docker images -q)
docker clean images
docker purge -a
5.
What is the default storage driver used by Docker on Linux?
overlay2
aufs
btrfs
zfs
6.
How can you build a Docker image from a Dockerfile in a specific directory?
docker start -t image_name ./path/to/Dockerfile
docker create -t image_name ./path/to/Dockerfile
docker build -t image_name ./path/to/Dockerfile
docker run -t image_name ./path/to/Dockerfile
7.
What is the main advantage of using Docker containers for microservices architecture?
Centralized management
High performance
Direct hardware access
Isolation and portability
8.
How can you run a command inside a running Docker container?
docker exec
docker run cmd
docker attach
docker command
9.
What is the purpose of the Dockerfile instruction ARG?
To configure the container's entry point
To set environment variables
To specify the base image
To define build-time variables
10.
What is the primary function of the Docker Swarm manager node?
To act as a worker node
To run application containers
To store and manage Docker images
To control the overall state of the swarm
11.
What is the purpose of the Dockerfile instruction VOLUME?
To create a Docker volume
To manage Docker volumes
To specify the working directory
To expose ports for inter-container communication
12.
How can you configure the maximum number of concurrent connections for the Docker daemon?
Edit the /etc/docker/daemon.json file
docker configure daemon --max-concurrent-connections
docker daemon --max-concurrent-connections
docker set daemon --max-concurrent-connections
13.
What is the purpose of the 'docker plugin disable' command?
To disable a Docker plugin
To configure Docker build settings
To create a Docker swarm
To manage Docker secrets
14.
How do you remove all Docker containers, including stopped ones?
docker purge
docker clean
docker rm $(docker ps -a -q)
docker remove all
15.
How do you override the default entry point of a Docker image when running a container?
docker set-entrypoint
docker run --entrypoint
docker modify-entrypoint
docker override-entrypoint
16.
How can you inspect the configuration of a Docker network?
docker config network
docker inspect network
docker show network
docker network inspect
17.
How can you see the detailed configuration of a running Docker container?
docker inspect
docker show
docker config
docker details
18.
How do you copy files from a Docker container to the host machine?
docker copy
docker export
docker cp
docker download
19.
How can you view the environment variables of a running Docker container?
docker inspect
docker show env
docker env
docker environment
20.
How do you run a Docker container with a read-only file system?
docker run --read-only
docker run -rfs
docker create --read-only
docker set-readonly