官术网_书友最值得收藏!

Using Docker for local development

As we've discussed, microservices solve a particular set of problems but introduce some new challenges of their own. One challenge that engineers on your team will probably run into is doing local development. With a monolith, there are fewer moving parts that have to be managed—usually, you can get away with just running a database and an application server on your workstation to get work done. As you start to create new microservices, however, the situation gets more complicated. 

Containers are a great way to manage this complexity. Docker is a popular, open source software containerization platform. Docker allows you to specify how to run your application as a container—a lightweight standardized unit for deployment. There are plenty of books and online documentation about Docker, so we won't go into too much detail here, just know that a container encapsulates all of the information needed to run your application. As mentioned, a monolith application will often require an application server and a database server at a minimum—these will each run in their own container.

Docker Compose is a tool for running multicontainer applications. Compose allows you to define your applications containers in a YAML configuration file. Using the information in this file, you can then build and run your application. Compose will manage all of the various services defined in the configuration file in separate containers, allowing you to run a complex system on your workstation for local development.

主站蜘蛛池模板: 阆中市| 武邑县| 盐亭县| 尉氏县| 墨玉县| 滨州市| 万源市| 中宁县| 曲沃县| 乐山市| 青铜峡市| 武川县| 汽车| 通辽市| 玉林市| 巩义市| 天门市| 平江县| 崇州市| 锡林浩特市| 平凉市| 河西区| 治多县| 亚东县| 延川县| 陆河县| 石台县| 鄂托克旗| 辽中县| 罗源县| 静乐县| 且末县| 贵州省| 黄石市| 托克托县| 旬阳县| 庆云县| 南涧| 定结县| 贵港市| 大同市|