All Products
Search
Document Center

Elastic Compute Service:What is Image Builder

Last Updated:Apr 01, 2024

Image Builder is a one-stop image management service that can be used to customize, build, maintain, verify, share, and distribute images. Its features are implemented mainly based on image templates. You can use image templates for the customization, distribution, and sharing of images, and update or rollback the applications in the images. This topic describes the scenarios, benefits, and usage methods of Image Builder.

Scenarios

Scenario

Description

Create images

You can use image templates to create images based on public images and existing custom images.

Maintain server applications

You can use image templates to update applications running on your Elastic Compute Service (ECS) instance. Specifically, you configure the image information of the original instance in the image template, and run template building commands to update the applications in your instance.

You can treat the image templates created when you update applications as application versions, so that you can easily update or roll back the application through the image templates.

Manage images

To create or iterate an image in multiple regions or Alibaba Cloud accounts, you can specify the target regions or Alibaba Cloud accounts when you create image templates. The system will create the images in your specified regions or share the images to the specified accounts.

For more information about the applicable scenarios of Image Builder, see Best practice for Image Builder.

Benefits

  • Efficient

    • To facilitate the process of creating images, Image Builder is compatible with some Dockerfile commands. If you are familiar with Dockerfile commands, you can use the edit commands of Dockerfile and then import the Dockerfile template in the ECS console.

    • Image Builder is an all-in-one service that can reduce the amount of time required to manually create ECS instances, perform O&M on ECS instances, and create, update, duplicate, or share images.

  • Reliable

    When running a building task, the system automatically checks the validity of the parameters in the image template. For example, the system checks whether the intermediary instance has enough resource quota and whether the template building command has been properly executed.

Billing method

You are not charged for Image Builder. However, when you create images using image templates, the system automatically creates a temporary ECS instance for creating the images. You are charged for the ECS instance on a pay-as-you-go basis. For more information, see Pay-as-you-go.

Note

You can use the default configurations of the intermediate ECS instance. For example, an instance type that has a minimum number of vCPUs and a minimum size of memory is selected for the instance by default. You can also modify the configurations of the instance based on your business requirements.

Use Image Builder

The following figure shows the process of using Image Builder:

image
  1. (Optional) Create image components.

    An image component contains one or more template building commands. You can reuse image components to facilitate the creation of image templates. Image Builder allows you to use image template commands to create images in a standard and transparent manner. Image template commands are compatible with some Dockerfile commands.

    The following types of image components are supported:

    • System component: contains pre-installed software or features that come with the operating system. These components are usually part of the operating system, such as system libraries, command line tools, and systems services.

    • Custom component: contains custom content such as custom software packages and applications to meet specific business requirements. These components are not integral parts of an operating system. They are determined by the users. We recommend that you use system components to create image templates for better stability and reliability.

    For more information, see Commands supported by Image Builder and (Optional) Create an image component.

  2. Create an image template.

    Image template is a key feature of Image Builder. When you create an image template, you can specify a source image, image components, or image template commands to define image data. You can also specify regions in which to generate the image or specify Alibaba Cloud accounts to which to share the image. Fore more information, see Create an image template and run an image building task.

  3. Execute an image creation task.

    When you create an image template, if you do not instruct the system to immediately execute a building task, you need to manually execute it to build images. When you execute the image template, an image creation task is generated. When running the task, the system automatically checks the validity of the parameters in the image template. For more information, see the "Run an image building task" section of the Create an image template and run an image building task topic.

  4. View the created custom image.

    You can use the created custom image to create ECS instances or replace the operating systems of ECS instances.