Image components store common commands that you use to build an image. Common commands include application commands, configuration commands, and test commands. When you create an image template, you can select one or more image components in the Elastic Compute Service (ECS) console to define the image template. This topic describes how to create an image component in the ECS console.

Background information

  • Before you start the procedure, take note of the following items:
    • Only custom image components can be created.
    • Image components can be used to create only Linux images.
    • You must set the ComponentType parameter to Build to configure the image component as an image building component.
    • Each command used to build an image component cannot exceed 16 KB in size. A maximum of 127 commands can be configured to build an image component.
  • Commands supported by Image Builder
  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Deployment & Elasticity > Auto Provisioning.
  3. In the top navigation bar, select a region.
  4. On the Image Builder Management page, click the Image Components tab.
    The first time that you use Image Builder, the Image Builder welcome page appears. Click Image Builder Management to go to the Image Builder Management page.
  5. Click Create Image Component.
    Configure the parameters to build an image component.
    Note You can import a component template by using Dockerfile and preview the template after commands are configured.
    • 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. For more information, see Overview.
    • In the Image Template section, configure Command and Content.
      Note You can select Existing Component for Command and the ID of an existing component for Content.
  6. Click Create.
    After the image component is created, you can view the component on the Image Components tab. You can use image components to create image templates. For more information, see Create an image template.