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

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.

主站蜘蛛池模板: 板桥市| 大悟县| 普陀区| 容城县| 甘孜| 福建省| 松原市| 天镇县| 弥渡县| 肇庆市| 洪泽县| 玉龙| 驻马店市| 綦江县| 南安市| 吴桥县| 监利县| 大渡口区| 五河县| 新宾| 黄平县| 慈溪市| 鲁甸县| 昌都县| 汽车| 孟连| 洪洞县| 安义县| 东乌珠穆沁旗| 五峰| 贡觉县| 托里县| 霸州市| 安康市| 青河县| 麻江县| 宁明县| 余庆县| 屏山县| 泾川县| 思茅市|