R
R
Roman2019-09-23 13:59:05
Docker
Roman, 2019-09-23 13:59:05

Where can I get a detailed step-by-step tutorial on solving a real-life problem with Docker?

I'm trying to master Docker - I ran into a misunderstanding of why it is needed at all.
I understand that if so many people use it, then for some reason it is still needed. But I want a real life example.
Some common case that is easier to solve with Docker than without Docker.
And so that even a child can understand :) I’ll
explain the context: I do web development mainly on Windows 7. In especially “hard” cases, when Windows doesn’t work at all, I do something remotely, on a VPS under Ubuntu Server, well, or locally in Virtualbox.
As far as I understood from the tutorials, Docker can help me with this, but I have not yet figured out exactly how.
If there is a link to a good step-by-step tutorial that can help - I will be grateful.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
D
developer007, 2019-09-23
@developer007

There is a postgres + php + redis project , I
generate a docker compose file using this service https://phpdocker.io/generator (I'm too lazy to think myself).
then I push the docker file to the project repository. (more precisely already the folder will be).
Give a colleague access to the repository. It clones and runs the docker-compose up command
and that's it. It launches the necessary containers. The application starts working immediately.
A colleague will not cackle that he now has mysql on his computer, and he does not want to install postgres because it is a chore.
or redis has a different version, and so on.
You can also launch your project in easy at any workplace.
In general, a cool thing in development.
About the use on the sale - xs
The people operate a bunch of servers without dockers and norms.

T
ThunderCat, 2019-09-23
@ThunderCat

Real example - for days I was asked to make changes in the project, the stack is not typical for me, nginx/postgres/puff7.2. Despite the fact that I had to do it on my home machine, win10. So I have Apache/muscle/puff 7.1 configured.
I put the containers on nginx/postgres/puff 7.2., crushed the local apache so that it would not interfere on port 80 and that's it, I can work with a completely different stack, and all this is "inside" on linux, with all possible apt-get installs and so on. Finished - turned off - forgot. Or reconfigured containers. Nothing has changed in the system at all.

S
skrimafonolog, 2019-09-23
@skrimafonolog

I understand that if so many people use it, then for some reason it is still needed. But I want a real life example.

Fashion.
Many do not understand and use.
To isolate the environment - so that you can set it up with a certain environment once and then run it on any OS so that other programs do not interfere.
There is such a problem - software No. 1 requires library A version higher than 1.3.4
. At the same time, software No. 2 requires library A version lower than 1.2.9.
Docker allows you to sort things out.
In large projects, these things happen all the time.
If you don't have this problem, then you don't need Docker.
Extra software creates unnecessary problems (say, cleaning up unused layers in Docker is a separate problem).
However, there are still good things about Docker - the ease of getting an identical environment on a completely different operating system, for example, for development. Then you need to stick it into docker-compose right away. Attention docker-compose is for development only, this system is not recommended for production.

S
Saboteur, 2019-09-23
@saboteur_kiev

Everything is simple.
In order to run multiple instances of the application with the same settings (the same path, the same libs) - the container is much cheaper and faster in terms of resources than individual virtual machines.
In the case when it's not 1-10, but 100-1000, the speed and cost are NOTICEABLE for business. Therefore, it is in high demand.
But before the advent of docker, even after setting it up, it was extremely inconvenient for ordinary users to use it.
And when docker + dockerhub appeared, and then also kubernetes-openshift, it took off well in the enterprise, and is actively in demand.
There are a lot of abuses too. But the main point is cheapness in terms of resources.

S
Sanes, 2019-09-23
@Sanes

Some common case that is easier to solve with Docker than without Docker.

Run the environment to somehow work. Usually used by programmers who do not understand anything in administration.

D
Dmitry, 2019-09-23
@q2digger

Need a real life challenge? Well, for example.
My developers need Jira for various tests. Jira they may need different versions. They may need it for an hour or, for example, for a week. Sometimes they need two jirs, one with mysql and one with postgres. Or something like that.
With the docker, I roll out the jira of the required version with the required base, in 2-3 minutes. The whole wrapper is standardized, all settings are the same.
Yes, of course, I prepared the containers in advance, but in fact, everything has been assembled there for a couple of years on GitLab by scripts, automatically, and I almost don’t spend time on this.

V
Vladimir Dementiev, 2019-09-23
@SayMAN83

As I understand it, docker is a lightweight version of virtualbox. The essence is the same, but takes up less disk space. Very handy for development. For use on the sale, kmk, so-so idea.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question