How do you list all running Docker containers?
docker ps -a
docker run -it
docker ps
docker images
What does the COPY instruction do in a Dockerfile?
COPY
Exposes a port from the container to the host.
Sets the working directory for subsequent instructions.
Executes a command within the Docker image.
Copies files or directories from the host machine to the image.
How do you specify a command to be executed when a Docker container starts using a Dockerfile?
ENV
CMD
ENTRYPOINT
RUN
What does the Docker Engine comprise of?
Docker Daemon and Docker Registry
Docker Client and Docker Server
Docker Client, Docker Daemon, and Docker Registry
Docker Client, Docker Daemon, Docker Images
Which command is used to download a Docker image from a registry?
docker build
docker run
docker push
docker pull
What command stops services defined in 'docker-compose.yml' and removes containers, networks, and images created by 'up'?
docker-compose kill
docker-compose rm
docker-compose stop
docker-compose down
What is a Docker image essentially composed of?
A compiled binary executable
A virtual machine image
A collection of files and configuration needed to run an application
A snapshot of your computer's current state
What is a Docker image?
A repository for storing Docker containers
A running instance of a container
A template for creating Docker containers
A command-line tool for managing Docker containers
What is the primary benefit of using a user-defined bridge network over the default bridge network in Docker?
Simplified management by automatically connecting all containers to a single network
Reduced resource consumption by sharing network resources
Improved performance by using a faster networking protocol
Increased security by isolating containers on different networks
Which command lists all Docker images present on your system?
docker show images
docker image ls
docker list images