Why use docker to make webserver
# Lemon 8 Howtoo # webserver # Web Site Writing Basics # docker
Docker is a tool that allows us to "pack" the software into a box called Container so that our applications run exactly the same everywhere, whether on your notebook, your friend's machine, or on a real server, without worrying that "I can run but you can't run" because of the problem of Windows, Mac or Library versions mismatch. 1. Docker's main idea: Container vs Virtual Machine In the old days, if we wanted to simulate the environment, we had to use a Virtual Machine (VM), which consumes very high machine resources because it has to run a whole new OS, but Docker instead uses resource sharing from the main OS, making it much lighter and faster. Virtual Machine (VM) Docker Container is slow to boot (in minutes), boot very fast (in seconds), use of resources, eat RAM and CPU, save a large resource (many GB), small (main MB) 2. Technical terms to know (unconfused) to talk to Dev people about. There are three words you will often hear: Docker Image: Like a "blueprint" or a CD installation that combines code, runtime, and settings. Docker Container: The image is actually "run" (if the Image is a blueprint, the Container house is the completed house). Docker Hub: It's like an App Store or GitHub for storing images for free, such as MySQL, Python, or Nginx3. Why does anyone use Docker? Consistency: Be sure that the environment is the same everywhere. Isolation: Each container is clearly separated. If one is broken, the other still works. Scalability: Extend the system very easily. Want to add 10 more Web Servers, just one command. CI / CD Friendly: Fits modern automation. In a nutshell: Docker is a "container for software" that makes the programmer's life easier because you don't have to sit around to install a repetitive environment.











































































































