Why are Docker Images so much lighter than traditional installations?

0
11
Asked By CuriousCoder99 On

I'm curious about why Docker images are generally much lighter than the typical local installations of software like MySQL. For instance, if we look at the MySQL Docker image, it seems different from installing MySQL on Windows 10. Both are using Windows OS resources and making Windows API calls, so why does the Docker image take up less space? What makes the regular installation bulkier with more files?

3 Answers

Answered By WindowsWhiz On

It's worth mentioning that there isn't a specific 'Docker for Windows' since it runs on a Linux VM. This means you’re mainly dealing with Linux containers. While there are Windows containers, they’re typically not as common or lightweight as Linux-based ones. The design of Docker is fundamentally tailored for Linux, which contributes to the efficiency and smaller size of its images.

Answered By TechSavvy123 On

Docker images are primarily built on Linux, which is inherently smaller and more efficient compared to Windows-based installations. When you look at a traditional MySQL installation on Windows, it includes a lot of additional components like GUI software and various DLLs that bulk it up. In comparison, the Docker image focuses on just the necessary components for MySQL, cutting out everything extra, which is why it ends up being much lighter. It's really more of a matter of comparing Linux installations rather than Windows to Docker directly.

Answered By SpaceSaver44 On

Docker container images are compact because they only include what's necessary to run the application. Unlike virtual machines, they don't carry a full operating system. If you're running Linux containers on Windows, it does add some overhead for the virtual Linux layer, but overall, the containers are leaner since they utilize shared resources from the host OS.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.