Immediately I warn you, I'm not a professional. I will give only a general idea, I can be mistaken in something.
The essence
Traditionally, you take a server (iron or virtual machine), deploy your website on it, install the necessary dependencies, configure.
With the docker, you take a clean image (image) of the operating system, do almost everything the same in it, pack it into a new image, send it to a special registry-registry.
Then, during installation, this image is downloaded from the registry and runs in a virtual machine.
Virtues
- Every time you install on a fresh image, you have server-phoenixes, not snowflakes (here you will see a link to Martin Fowler's blog later).
- The image is created once and used many times. Deployment of the finished image is very fast. You can quickly respond and scale the site (of course, it will need to be configured)
- Your testers are testing exactly the same thing , which then goes to production, and not something similar.
- Since the old versions are also stored in the registry, in case of a sudden backup you refuse easily (well, easier than usual)
disadvantages
- I will write later with a fresh mind. But they are, they have everything.
In general, all this concerns not only the docker. Be sure to search and read about 12-factor applications (12-factor applications). (I will add a link here too later)