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

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.

主站蜘蛛池模板: 岳普湖县| 邹平县| 胶南市| 滨海县| 株洲县| 阜阳市| 苗栗县| 阜康市| 开平市| 荆州市| 灵丘县| 新和县| 枝江市| 临安市| 板桥市| 改则县| 辉县市| 林口县| 个旧市| 永顺县| 武汉市| 西藏| 中江县| 榆中县| 会昌县| 甘孜县| 清河县| 汕头市| 高碑店市| 乐清市| 郯城县| 施秉县| 沁源县| 巴林右旗| 台山市| 巴林右旗| 寻乌县| 綦江县| 连南| 新闻| 会理县|