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

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.

主站蜘蛛池模板: 剑川县| 桃园市| 福海县| 新竹市| 临漳县| 冕宁县| 泰州市| 荃湾区| 佛山市| 富锦市| 海晏县| 安乡县| 叶城县| 靖宇县| 青海省| 商都县| 马公市| 阳原县| 始兴县| 广灵县| 武平县| 大足县| 北碚区| 巴南区| 增城市| 若尔盖县| 柯坪县| 乐清市| 北安市| 长乐市| 横峰县| 滦平县| 昌黎县| 玛沁县| 芦山县| 蓝山县| 固镇县| 芜湖市| 安国市| 崇明县| 社会|