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

Chapter 3. Building Base and Layered Images

In this chapter, we will learn about building base and layered images for production-ready containers. As we saw, Docker containers provide us with ideal environments in which we can build, test, automate, and deploy. The reproductive nature of these exact environments affords a higher degree of efficacy and confidence that currently available script-based deployment systems cannot readily duplicate. The images a developer locally builds, tests, and debugs can then be pushed directly into staging and production environments as the test environment is nearly a mirror image under which the application code runs.

Images are the literal foundational component of containers, defining what flavor of Linux to deploy and what default tools to include and make available to the code running inside the container. Image building is, therefore, one of the most critical tasks in the application containerization life cycle; correctly building your images is critical for effective, repeatable, and secure functionality of containerized applications.

A container image consists of a set of runtime variables for your application container. Ideally, container images should be as minimal as possible, providing the required functionalities only, as this helps in efficient handling of the container image, significantly reducing the time to upload and download the image from the registry and having a minimal footprint on the host.

Our focus, intent, and direction is in building, debugging, and automating images for your Docker containers.

We will cover the following topics in this chapter:

  • Building container images
  • Building base images from scratch
  • Official base images from Docker registry
  • Building layered images from Dockerfiles
  • Debugging images through testing
  • Automated image building with testing
主站蜘蛛池模板: 平塘县| 西贡区| 石景山区| 淮滨县| 东阳市| 南通市| 东乡县| 渑池县| 庆元县| 万盛区| 罗江县| 吴川市| 全椒县| 榆林市| 炎陵县| 宜昌市| 南川市| 宜兰县| 柘荣县| 抚远县| 四平市| 绥棱县| 桃园市| 扬州市| 绥棱县| 麟游县| 沧州市| 洛宁县| 登封市| 红河县| 阿合奇县| 龙江县| 和平区| 南溪县| 康乐县| 库尔勒市| 琼海市| 广汉市| 铜山县| 武强县| 宜黄县|