What is Docker?
Docker is a platform-as-a-service tool that uses operating system-level virtualization to deliver software in packages called containers.
What is Container in Docker?
A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, dependencies, runtime, system tools, system libraries and settings.
Difference between VM's and Docker?
Containers and virtual machines are both technologies that can be used to run software applications. However, they have different approaches.
Containers are segregated applications or services on a host and share the same operating system
Virtual machines are isolated instances of an operating system on a physical host and run applications or services
Containers have a smaller footprint than virtual machines. This is because containers share the host operating system's kernel, while virtual machines each have their own kernel. As a result, containers can start and stop faster and use fewer resources.
Virtual machines are isolated from each other, which can help prevent attacks from spreading between guests.
Containers and virtual machines can be used together. For example, a container can run an application, while a virtual machine provides the underlying infrastructure. This approach combines the best of both worlds: the portability and speed of containers with the security of virtual machines.
Here's a table summarizing the key differences between containers and virtual
| Feature | Container | Virtual Machines |
|---|---|---|
| Operating System | Shares the host operating system's kernel | Has its own kernel |
| Portability | More portable | Less portable |
| Speed | Faster start up and shut down | Slower start up and shut down |
| Resources Usage | Uses fewer resources | Use more resources |
| Use case | Good for portable and scalable applications | Good for isolated applications |