Which command completely removes a Docker container?
docker kill <container_id>
docker stop -r <container_id>
docker delete <container_id>
docker rm <container_id>
In Docker's default bridge network, how do containers get assigned IP addresses?
Dynamically from the bridge network's built-in DHCP server
Randomly generated at container startup
Statically from a configuration file
Dynamically from the Docker host's DHCP server
What is a potential drawback of using the 'host' network mode in Docker?
Increased complexity in configuring network settings for the container
Limited network performance due to sharing the host's network bandwidth
Increased network overhead due to network address translation (NAT)
Reduced security as the container can access all ports and resources on the host
How do Docker containers differ from virtual machines?
Containers are used only for development, while VMs are for production.
Containers require more resources than VMs.
Containers share the host kernel, while VMs have their own.
Containers cannot run on the cloud.
Which command will start a new container from an image?
docker create
docker start
docker run
docker exec
You want to list all Docker images that are currently present on your system. What command would you use?
docker ps -a
docker images
docker show images
docker list
Which of the following is NOT a benefit of using Docker?
Faster deployment times
Improved security through isolation
Increased application size
Increased resource utilization
Which command is used to create and start a Docker container?
docker build
How would you build or rebuild services without starting them in Docker Compose?
docker-compose build
docker-compose start --build
docker-compose create --build
docker-compose up --build
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.