All Products
Search
Document Center

Elastic Compute Service:(Optional) Create an image component

Last Updated:May 15, 2026

Create a custom image component with specific commands when system components do not meet your requirements.

Note

Use system components whenever possible to ensure stability and reliability.

Prerequisites

If you use a RAM user, grant it permission to manage the service-linked role AliyunServiceRoleForECSImageBuilder. See Manage the service-linked role for Image Builder.

Limitations

Note the following limitations:

  • You can only create and modify custom components, not system components.

  • Each command cannot exceed 16 KB. A component supports up to 127 commands. See Image Builder commands.

Procedure

  1. Go to ECS Console - Image Builder.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. On the Image Builder page, click Image Components.

    Note

    If you access Image Builder for the first time, click Try Now.

  4. On the Custom Components tab, click Create Component.

  5. Configure the parameters and click OK.

    The following table describes the parameters.

    Parameter

    Description

    Name

    The component name.

    Component Type

    Valid values: Build and Test.

    • Build: customizes image content. Used only in build templates.

    • Test: validates the built image. Used only in test templates.

    System Type

    Valid values: Linux and Windows.

    Release Type

    The component version number. The name and version together identify a specific component version.

    Configure Component Content

    The component instructions. YAML is supported for Linux and Windows. Dockerfile is supported for Linux only.

    • YAML format

      • Enter instructions directly in YAML format.

      • You can also select a predefined system template, such as PHP, MySQL, or Nginx. The system installs the latest stable version by default. To specify a version, modify the install command. For example, change sudo yum -y install nginx to sudo yum -y install nginx-<version>.

      image

    • Dockerfile format

      On the Visual View tab, click Add Command to add instructions individually. On the Script View tab, enter content directly.

      image

    See Image Builder commands for the full list of supported instructions and syntax.

    Advanced Settings

    (Optional) Add a description and tags.

References