What better to have a local development?

I use open server for development of sites on php. But I learned that it's kind of old school now and almost all the bad taste, is it?

I am far from vagrant or Docker, but it seems they are used for development? It turns on every project you'll have your own virtual machine, not troublesome if compared with local development?

Which of these tools should I use? I guess Docker is an alternative to vagrant? Sorry for the childish questions, but I really want to go to "serious" or "modern" design, but I don't know where to start?
July 8th 19 at 15:43
6 answers
July 8th 19 at 15:45

Vagrant — system configuration management of a specific machine.
Docker run isolated processes on the machine.

This is not a virtual machine, and run isolated processes. Ie, running process thinks that he is the only one, and nothing around there. It works at the kernel level of Linux. Without using virtual machines.

In the terminology of Docker Images and Containers there.
Image — the image pattern based on which the Container runs.
Image is based on any underlying OS image.

Container service launched and built on the basis of the Image.

Thus, you can build multiple images, for example, the image for Nginx image to PHP image MySQL. In addition, you can build some way for each desired version of PHP, MySQL, etc.

Each of these images will have in my database any OS. I.e., the isolation environment running on Docker.
On the basis of images you can run Containers, i.e., directly to build a working environment. Each launched container thinks that it is running one, in the form of inheritable asset. But really, it's just a separate process running on the Linux kernel, without virtualization. Ie, you don't have the overhead of a virtual machine. The isolation of containers is performed at the kernel level.

With all this, your base system remains clean from the packages to install, free from confusion with libraries, versions, etc.

Both tools are good. But everyone has their own purpose.

Vagrant is a great tool for the configuration of remote machines from scratch, VDS/VPS, etc.
Docker is a great tool for rapid deployment/reconfiguration of the working environment, with virtually no changes to the system on which it is installed.
Thanks for the detailed response, and the beginner what would you recommend? Where to start? - Jalon commented on July 8th 19 at 15:48
Purely my IMHO.
— If you work alone on a project, and you do not need to contain a zoo of versions of various libraries, you are enough any new path, possibly with the configuration from Vagrant (well, it's optional). Share the project folder from working machine to dev, and comfortable work.
— If you have two or more, then it makes sense to look towards Docker. Spend 1-2 days for debriefing and nuances, but then save a lot of time.

But, in any case, I think that to look at is Docker. Even if you're not going to work with him. It is not difficult, and a very nice product. There are of course nuances, but not much for ordinary tasks. Good documentation, written in simple language. - rowena.Bartoletti commented on July 8th 19 at 15:51
Wanted to ask, and how performance is affected? After all, do I understand correctly that in this case, one project = one dev? You need this minimum SSD, for example, comfortable working with vagrant?
And maybe you know some tutorials in addition to documentation? Asking just in case, maybe you know. - Jalon commented on July 8th 19 at 15:54
This is not a virtual machine, and run isolated processes. Ie, running process thinks that he is the only one, and nothing around there. It works at the kernel level of Linux. Without using virtual machines

Linux, FreeBSD - it is.
Under Windows, MacOSX - use virtual machine. It is triggered by Docker automatically, you sort it and start manually myself. But nevertheless - the virtual machine is present. - Rachel_Considine commented on July 8th 19 at 15:57
unfapable, raising new path, of course, carries overhead. But you can make it modest. The service itself new path also carries overhead. But if you have a working machine, not quite weak, it will not affect the comfort of the development. - rowena.Bartoletti commented on July 8th 19 at 16:00
: not exactly. Docker itself does not start any virtual machines. Neither on Windows nor on MacOS.
Doker-client runs directly in the OS.
but the Docker daemon can work _only_ with the Linux kernel. So, to work under Win/MacOS Sam Docker daemon runs in a lightweight virtual machine created by VirtualBox. - rowena.Bartoletti commented on July 8th 19 at 16:03
July 8th 19 at 15:47
What better to have a local development?

On what to you more conveniently.
July 8th 19 at 15:49
Guys, why are you so fashionable? If you do not know why you need it, why use it? When you realize that it is you exactly need, it will speed up/simplify the design, then use it. And use for the sake of just to use and learn - this is clearly a bad way.
How to say...
On the one hand to use something because it is fashionable, and not knowing what it is, it's kind of silly.
On the other hand everything evolves and you need to constantly keep track of new tools and features and try to understand how they can help.

Actually the author of the question and asks what is it, is it, and what might help. - Jalon commented on July 8th 19 at 15:52
: to try to understand how they can help - for this is the Internet, use all of the new trends is optional. The problem of the author and the majority of programmers in a clear connection between "but I really want to go to "serious" or "modern" development". Modernity != the seriousness. - rowena.Bartoletti commented on July 8th 19 at 15:55
: Well, the toaster part of the Internet, it is appropriate to ask such a question here.
On ofsajtah, and guidelines more emphasis on how to apply, and how to cook, but what is it and why is it necessary, person not to understand the topic is quite difficult.
A lot of it really nafig is not necessary. And who then suffers the old fashioned way and did not know that there are convenient tools. - Jalon commented on July 8th 19 at 15:58
July 8th 19 at 15:51
Well look - that you need?
You need a server on which you will run the code and to work it needs on your computer.
Developing you as I understand it under Windows?
Previously, for this purpose run the web server under windows. It added a whole layer of issues - had to run and debug code in a system that is radically different from the combat server, unnecessary movements during the work, and a bunch of problems when migrating to a production server.
Now with the development of virtualization, it is much easier and more convenient for these purposes to start a virtual machine with Linux, and so on it a web server.

So all you need is a virtual machine with Linux and a web server.
And that's all.
It turns out you don't need a Docker or Vagrant.
However, there is a small but-
The project you will not be alone, and each project the customer will work in a different environment.
But to work best in that environment, as the customer, to avoid problems with the transfer on the fighting server.
So good you either have to create for each project a separate virtual reality and then in some way can help Vagrant, or you can configure one virtual server environment using Docker.

In General you need a virtual machine with the web server, and for convenience, you can use Docker.
July 8th 19 at 15:53
The use of Dockers Vagrants or just virtual machines only if you want to completely recreate the server environment.
Makes sense once all the settings to the server then just transfer.

But if you complete identity of the development environment and the execution environment is not necessary, it is perfectly possible to debug without it.
July 8th 19 at 15:55
Well, in VirtualBox to configure vps and shared hosting for development, why reinvent...!?
And keep a dozen different images with different combinations of PHP/MYSQL/ different versions? - Jalon commented on July 8th 19 at 15:58
: and often there is a need for a dozen versions? In the same OpenServer configuration changes per minute - rowena.Bartoletti commented on July 8th 19 at 16:01
: phpbrew and like there, the toaster was the question of simultaneous work of several php at the same time - Jalon commented on July 8th 19 at 16:04
In fact, you now the principle of the vagrant and described) However, he, in addition to a system image for VirtualBox, there is a config file, which is convenient to push the ports at the level of "made changes-launched" and not "poking around in Virtual Box and understand where this setting" - Rachel_Considine commented on July 8th 19 at 16:07

Find more questions by tags VagrantDocker