🌙 Dark Mode
Test Your Knowledge: Docker and Containers
1. What is the main purpose of a container?
To package an application and its dependencies
To replace virtual machines
To manage cloud infrastructure
2. Why might an application fail when moved from a Windows machine to an Ubuntu server?
Differences in operating systems and dependencies
Lack of internet connectivity
Insufficient hardware resources
3. What does Docker help developers achieve?
Consistency across development, testing, and production environments
Faster internet speeds
Better hardware performance
4. What is included in a container?
The application code, runtime, libraries, and dependencies
Only the application code
Only the operating system
5. What problem does Docker solve?
The "it works on my machine" problem
Slow internet speeds
High hardware costs
6. What is Docker primarily used for?
Managing and deploying containers
Managing virtual machines
Managing cloud storage
7. What is a key benefit of using containers?
Isolation and consistency across environments
Faster hardware performance
Reduced internet usage
8. What does Docker ensure when deploying applications?
The application runs the same way in all environments
The application uses less memory
The application runs faster
9. What is Docker Hub?
A cloud-based repository for Docker images
A tool for managing virtual machines
A programming language for containerization
10. What command is used to pull an image from Docker Hub?
`docker pull`
`docker run`
`docker build`
11. How can you inspect the details of a Docker image?
`docker inspect`
`docker history`
`docker ps`
12. What command is used to view the history of a Docker image?
`docker history`
`docker inspect`
`docker logs`
13. What does the `docker run` command do?
Creates and starts a container from an image
Pulls an image from Docker Hub
Inspects the details of a container
14. What option is used to run a container in detached mode?
`-d`
`-it`
`-a`
Submit Quiz