Answer the question
In order to leave comments, you need to log in
Can you explain in a simple way about Docker and how to start using it?
Hello! Can you explain to me in a simple way how to start using Docker, how to deploy a "container", etc. Thanks in advance!
Answer the question
In order to leave comments, you need to log in
What is docker is easy to explain. This is application virtualization. To quickly deploy an application in its familiar environment on any suitable system.
How to start using it is difficult to explain, especially without knowing what problem you want to solve with it.
First, decide what docker is for. Do not shove it anywhere. There is a lot of information about docker, including videos and even in Russian.
imagine that you need a site on WordPress
, usually you raise a server (like Denver), start a local domain, upload WordPress there, install it (attached to the database), and then you start working with WordPress.
Docker is like you run one file, and inside the virtual machine with everything already configured starts. That is, you just launched the container, and everything is already there, you just start working with WordPress.
ZYZH if someone wants to correct about one process per container - no need. I just described in a simplified way, but at the same time quite a real situation. Orchestrating containers with each server is a little more tedious than stacked.
If you use virtualization, then you know that the overhead is quite high. The guest OS eats memory, percents and disks no less than the "normal" one. Since this is an ordinary full-fledged OS, then it is loaded in time, like any ordinary OS. In short, long. As a result, it turns out that the more applications we seat on separate virtual machines, the more overhead we get. Some people didn’t like it so much that they began to look for ways to dramatically save memory, percent and storage. Others didn’t like the fact that they had to wait a long time for the guest OS to launch in order for the desired application to start. I suspect that these sets strongly intersected). As a result, it was invented, in general terms, the following:
As a result, what is now called container virtualization appeared, whose representatives are lxc, lxd, docker, rancher and others. As is customary in open-source, all these products use each other to one degree or another (ideas and principles, code base ...), complement, are a fork or add-on / wrapper over a related product. So, initially the docker was to some extent an add-on over lxc (may my colleagues forgive me for flagrant blasphemy and inaccuracies - all in the name of simplification and clarity).
So, Docker is virtualization, but not full-fledged, but "simplified", although it would probably be more accurate to say "lightweight and accelerated", because there is no smell of simplicity there, except on very banal helloworlds, especially when debugging (debugging and docker sometimes create especially sophisticated anal-intellectual adventures). An important point is, after all, OS virtualization with its own shell and environment, but this virtualization is designed to run one or two applications with minimal overhead and ultra-fast (compared to a classic virtual machine) launch. The use of one core for all "container virtual machines" explains why it is not possible to run containers with windows, unix and mac on linux, and vice versa. Although with the advent of WSL on windows, there are chances of almost native linux containers running under windows...
Now for a quick start: https://docs.docker.com/docker-for-windows/#explor...
docker is about the same as the portable version of the program on windows only for all systems
Cyril , if you develop in a team, then docker significantly reduces the risks of the type
* different developers may have a different version of PHP
* a different version of MySQL
* the system environment is configured differently, which can introduce "interference"
* different hardware
Running in docker, you get single and unified system. In addition, containers are usually prepared by more experienced comrades (or rather, entire communities of experienced comrades), which saves you from "tuning" development tools. If the docker is also used in production, then this removes the lion's share of the deployment problems.
Yes, getting into docker requires some effort, but it pays off in the long run. The IT world is moving towards virtualization one way or another, and it's up to you to jump on this train or not)
Not a super guide, of course, but for a start it will do: https://habr.com/post/310460/
It is important to understand what is the difference between image and container, then realize why this is the same thing :)
And then it will be easier.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question