Which of the following statements is TRUE about Docker containers?
They have their own dedicated operating system.
They cannot interact with the host system.
They share the host operating system kernel.
They are slower than virtual machines.
What is the key difference between Docker and a virtual machine?
Docker provides a graphical user interface, while VMs do not
Docker containers share the host OS kernel, while VMs have their own kernel
Docker is used for hardware virtualization, while VMs are used for software virtualization
Docker is primarily used for development, while VMs are used for production
What is the primary function of the Docker Daemon (dockerd)?
Providing a user interface for Docker
Building Docker images
Pushing images to a registry
Managing Docker images and containers
Which Docker Compose command is used to start services in the background?
docker-compose up
docker-compose start
docker-compose run
docker-compose up -d
What is the purpose of Dockerfile in Docker?
To manage Docker networks
To run a Docker container
To define the steps for building a Docker image
To store container logs
Which command completely removes a Docker container?
docker delete <container_id>
docker kill <container_id>
docker stop -r <container_id>
docker rm <container_id>
You want a container to have NO network access at all. Which Docker networking mode should you use?
Isolate
Bridge
Host
None
What does the COPY instruction do in a Dockerfile?
COPY
Executes a command within the Docker image.
Exposes a port from the container to the host.
Sets the working directory for subsequent instructions.
Copies files or directories from the host machine to the image.
How would you build or rebuild services without starting them in Docker Compose?
docker-compose create --build
docker-compose build
docker-compose up --build
docker-compose start --build
Which file format does Docker Compose use for defining application services?
config.yaml
Dockerfile
docker-compose.yml
compose.json