All Products
Search
Document Center

Elastic Compute Service:(Optional) Create an image component

Last Updated:Jan 23, 2024

Image components store the application commands, configuration commands, and test commands that are used to build images. When you create an image template, you can group one or more image components together to define the template. You can use system components that are owned and managed by Alibaba Cloud, or create custom components based on your business requirements in specific scenarios. This topic describes how to create an image component in the Elastic Compute Service (ECS) console.

Considerations

Before you create an image component, take note of the following items:

  • You cannot modify system components. You can create or delete only custom components.

  • You can create only image components that are compatible with Linux operating systems.

  • When you create an image component, you must set Component Type to Build.

  • Each command used to create an image component cannot exceed 16 KB in size. A maximum of 127 commands can be configured to create an image component.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Deployment & Elasticity > icon1 > Image Builder.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the Image Builder page, click the Image Components tab.

    The first time you use Image Builder, the Image Builder welcome page appears. Click OK to go to the Image Builder page.

  5. Click the Custom Components and then click Create Image Component.

    Configure parameters to create an image component.

    • Configure Name and Description to specify a name and description for the image component.

    • Set System Type to Linux.

    • Set Component Type to Build.

    • Configure Tag to add tags to the image component. For more information, see Overview of tags.

    • In the Template Content section, click Add Command and then configure Command and Content to specify image template content.

      For the commands that can be specified in the Template Content section, see Commands supported by Image Builder.

    Important

    You can click Import Template through Dockerfile to import image template content from a Dockerfile. In the dialog box that appears, paste template contents from a Dockerfile and click OK. If you use the image component to create an image template, the image template content from the image component overwrites the Source Image Type, Image, and Template Content values that you specify. Exercise caution when you import image template content from a Dockerfile for the image component.

  6. Click Confirm.

    After the image component is created, you can view the component on the Image Components tab. You can use the image component to create an image template. For more information, see Create an image template.