Containerization for local development?

Hi all, we develop the online store. Working on the classical scheme, have dev and production, are all developing locally.

The problem is the following: the project is quite large, there are always new developers, and everybody needs to explain that it is necessary to put yourself OpenServer, choose the desired configuration, a bunch of settings, etc.

Of course I wrote the instructions, but I understand that can not continue, because each new developer, spends couple of days to customize the environment.

We like to work on OpenServer because the file structure of the project is available directly from us on our work computer, and any IDE can easily open the project.

I started reading about docker, see, that's what we need.

But there is a lot of questions that cannot find answers:

Understand that docker can also safely use locally on windows ? As you locally deploying Docker ?

When deploying a project using docker creates a kind of virtualization. How then to work with the project through the IDE ? If all the surroundings of the project on linux, and we are working on windows, how do people work through the IDE in such cases ?
April 3rd 20 at 18:40
6 answers
April 3rd 20 at 18:42
Understand that docker can also safely use locally on windows ? As you locally deploying Docker ?

it is possible, but like on Windows and Mac, very the brakes you have to use docker-sync.io

When deploying a project using docker creates a kind of virtualization. How then to work with the project through the IDE ? If all the surroundings of the project on linux, and we are working on windows, how do people work through the IDE in such cases ?

Rather not just "linux", and linux is different, ie the database at home, web server, etc.

Need to smoke the dock, under mount, if crazii, all files are on the host system (where the IDE of course), and the project folder is mounted in the right containers where the web server, database, etc. already know what to do with these files
April 3rd 20 at 18:44
Understand that docker can also safely use locally on windows ?

Yes. But eat there. In the environment of Unix systems working with Docker much easier.

As you locally deploying Docker ?

using docker-compose:
docker-compose up-d

When deploying a project using docker creates a kind of virtualization. How then to work with the project through the IDE ?

Yes, all the same, your project folder will mapitse into the container, and you quietly open in the IDE.
Only with tweaking the project in the IDE can cause problems.
@mykmykpetwith permitame for example, it may be an ambush, making the run of containers, for example, with postgres will have some of the nuances.
Proof - antone.Wintheiser27 commented on April 3rd 20 at 18:47
April 3rd 20 at 18:46
Understand that docker can also safely use locally on windows ?
- right
As you locally deploying Docker ?
- https://docs.docker.com/docker-for-windows/install/
How then to work with the project through the IDE ?
- if we are talking about php in PhpStorm integration is implemented and described perfectly
If all the surroundings of the project on linux, and we are working on windows, how do people work through the IDE in such cases ?
- so you will raise your linux environment in a docker container
April 3rd 20 at 18:48
can not continue, because each new developer, spends couple of days to customize the environment.

They also suddenly! to see the code should work.
And you want it first problem solved after an hour of work?

And if change frequently so developers and none of them is without user to start a project, then the problem is not in the time project settings. You have some kind of Juno-pipe and probably the project that make it something non-trivial.

need to explain that you have to put yourself OpenServer, choose the desired configuration, a bunch of settings, etc.

you need to make a project so that it can be run in principle without problems.
Not run from configs defined on a specific software.
Not to mention those who sit on Linux or Makosi. You take the job?)

I'm on the LAN using its set of software for all projects and all developers work like they used to.

And Docker in General by development, they hold only database on the LAN.
During normal development of uncomfortable + perpetual shoals at the speed of disk in Docker on Mac/Windows or something.
In General, wildest uncomfortable.
April 3rd 20 at 18:50
Understand that docker can also safely use locally on windows?
Right.

As you locally deploying Docker ?
Under Mac or Windows to download Docker Desktop.
To deploy the project, as well as wrapped ) most Likely to clone the turnip file docker-compose.yml of your project and docker-compose up And then go inside containers, or run additional time – with all sorts of git clone, composer install, npm i, mysql -p${MYSQL_ROOT_PASSWORD} < database_init.sql , etc.

When deploying a project using docker creates a kind of virtualization.
Not really. Docker is not virtualization and containerization. There's no virtual machine, unlike, for example, VirtualBox. At the household level, there are some isolated virtual box-containers, of which sticking out maybe port. And each other these boxes are see computers on the local network.

How then to work with the project through the IDE ? If all the surroundings of the project on linux, and we are working on windows, how do people work through the IDE in such cases ?
Alternatively, to work with remote Linux server. To connect to it via SSH, same VS Code able through the expansion of Remote-SSH.

Files to copy from the computer to the containers (or Vice versa) via
docker cp ./local.containerName file://var/www/remote.file


For a "luxury" local-ordinary work with files directly on the computer with any IDE which prefers any of the developers will have to pay zakruchivanie configs that are different from production. And then, perhaps, you miss the whole thrill of tokenization-for-development.

Overall I would not recommend Docker for local development, although the use in some projects.
April 3rd 20 at 18:52
If to launch the project, to start developing, you need something more than:
a) npm run dev for projects on js
b) php -S 0.0.0.0:8080 -t "%cd%" for projects on PHP
C) start command database
g) work regardless of operating system
then, with project something wrong and need to fix it. There is a generally accepted standardized things, and we must stick to them. Otherwise you will sit what is it with OpenServer and the like, and then to explain to everyone what and where to poke the mouse that wound up and the project has earned.

Yes, and the installation of specific software, exclusive to one project, so-so idea, I would have sent.

Find more questions by tags Docker