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

Summary

In this chapter, we learned how to use Docker commands to create and operate containers. We learned most of the commonly used Docker commands, such as build, run, exec, ps, images, tagand push.

We saw how to build a web service container, including the preparation of configuration files, how to structure a Dockerfile, and how to make our images as small as possible. We also covered how to use docker-compose to operate locally and, through a docker-compose.yaml file, connect different containers running in a cluster configuration. This included creating a database container that allows testing much closer to what the production deployment will be, using the same tools.

We saw how to use environment variables to configure our service and how to inject them through docker-compose configuration to allow different modes, such as testing. 

Finally, we analyzed how to use a registry to share our images, and how to tag them adequately and allow moving them out from local development, ready to be used in a deployment.

In the next chapter, we will see how to leverage the created containers and actions to run tests automatically and make automated tools do the heavy lifting for us to be sure our code is always high-quality!

主站蜘蛛池模板: 静乐县| 临清市| 志丹县| 保靖县| 大悟县| 漳州市| 武陟县| 宿松县| 靖边县| 巴东县| 石台县| 油尖旺区| 高雄市| 旌德县| 渝中区| 北票市| 枣庄市| 黄陵县| 东海县| 岑巩县| 昌图县| 临澧县| 石棉县| 博湖县| 铜山县| 德州市| 美姑县| 嘉义市| 荃湾区| 隆林| 禹城市| 如东县| 石景山区| 朝阳县| 呼伦贝尔市| 神农架林区| 南江县| 简阳市| 醴陵市| 嘉荫县| 西贡区|