The pain of local development
Before development, you first need to install various development tools and service support into your development environment. There may be dependency problems, environment variable problems, port conflicts, compiled library problems, and so on.
During development, you may need to depend on some other services. You’d better hope that there will be no problems. Maybe you have to rewrite to configure your environment, because all your dependent services are in your only workspace. .
If your partner’s operating system is not uniform, you may also encounter some inconsistencies in the parsing of different metacharacters.
Before going online, you may be able to develop and debug locally and run perfectly, but once deployed to the server, various problems will occur. Because most of the time, our development environment and production environment are not the same.
Maybe next time you need to use a new development environment to open a project. You will face the above problems again and again.
You have to look at it, you need to spend a lot of time building the environment.
Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container, which can then be distributed to any popular
Linux machine, and can also be virtualized. Containers are completely sandboxed and do not have any interface with each other. For us, I think it just needs to be understood as a portable application container
Docker Local Development Environment
For developers, all kinds of new technologies that are born every day need to be tried, but developers are unlikely to set up an environment for them and test them one by one. Time is very precious, and it is thanks to
Docker that it is possible to build an environment in one or a few commands, and the environment is as large as a specific version of the operating system and as small as a piece of software. Docker has a fool-proof way to obtain software, the
Docker background will automatically obtain the environment image and run the environment.
Unify development and production environments
For ordinary small companies, it is not so cost-effective to build a common development environment. Then you can use
Docker to unify the development environment, because it doesn’t matter if you are using
Ubuntu . If
Docker is also used in the production environment, you can even package a set of environments directly, and you can run them directly without worrying about the differences between the development and production environments.
The granularity of the virtual machine is
The post Using Docker to Efficiently Build a Local Development Environment (detailed tutorial) first appeared on Lenix Blog .
This article is reprinted from https://blog.p2hp.com/archives/9442
This site is for inclusion only, and the copyright belongs to the original author.