In Docker's default bridge network, how do containers get assigned IP addresses?
Statically from a configuration file
Randomly generated at container startup
Dynamically from the Docker host's DHCP server
Dynamically from the bridge network's built-in DHCP server
Which of the following statements is TRUE about Docker containers?
They are slower than virtual machines.
They cannot interact with the host system.
They have their own dedicated operating system.
They share the host operating system kernel.
What is the primary purpose of Docker containers in software development?
To create virtual machines.
To manage network infrastructure.
To compile code faster.
To package and isolate applications with their dependencies.
What is the command to gracefully stop a running Docker container?
docker stop <container_id>
docker kill <container_id>
docker halt <container_id>
docker down <container_id>
What does the Docker Engine comprise of?
Docker Daemon and Docker Registry
Docker Client and Docker Server
Docker Client, Docker Daemon, Docker Images
Docker Client, Docker Daemon, and Docker Registry
What is the purpose of Dockerfile in Docker?
To define the steps for building a Docker image
To store container logs
To manage Docker networks
To run a Docker container
If you launch a container with '--network none' and later need to give it network access, what should you do?
Use the 'docker network connect' command to attach the container to an existing network
You cannot change the network mode once a container is created, you must recreate it
Restart the container with the desired network mode specified
Modify the container's configuration files to add network settings
How do you list all running Docker containers?
docker ps
docker ps -a
docker images
docker run -it
What does the COPY instruction do in a Dockerfile?
COPY
Executes a command within the Docker image.
Sets the working directory for subsequent instructions.
Copies files or directories from the host machine to the image.
Exposes a port from the container to the host.
Which Docker Compose command is used to start services in the background?
docker-compose up -d
docker-compose start
docker-compose run
docker-compose up