How do you specify the Docker image to be used for a service in 'docker-compose.yml'?
build:
container:
from:
image:
Which Dockerfile instruction is used to define the base image for a new Docker image?
COPY
FROM
RUN
WORKDIR
What is the primary purpose of Docker containers in software development?
To package and isolate applications with their dependencies.
To manage network infrastructure.
To compile code faster.
To create virtual machines.
Which component of Docker's architecture is responsible for building and storing Docker images?
Docker Client
Docker Registry
Docker Host
Docker Container
Which command will start a new container from an image?
docker exec
docker run
docker create
docker start
How do Docker containers differ from virtual machines?
Containers share the host kernel, while VMs have their own.
Containers require more resources than VMs.
Containers cannot run on the cloud.
Containers are used only for development, while VMs are for production.
In a 'docker-compose.yml' file, what is the keyword used to define a service?
image
app
service
container
Which instruction in a Dockerfile sets the working directory inside the image during the build process?
ENV
To gracefully stop a running container, which command is recommended?
docker kill
docker halt
docker stop
docker down
What command initiates the building of a Docker image from a Dockerfile?
docker make
docker build
docker compile