> **Experimental**
>
> `@aws-cdk/aws-imagebuilder-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# BaseContainerImage

Represents a base image that is used to start from in EC2 Image Builder image builds.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/base-image.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/base-image.ts#L77)

## Example

```ts
const parameterizedComponent = imagebuilder.Component.fromComponentName(
  this,
  'ParameterizedComponent',
  'my-parameterized-component'
);

const imageRecipe = new imagebuilder.ImageRecipe(this, 'ParameterizedImageRecipe', {
  baseImage: imagebuilder.BaseImage.fromSsmParameterName(
    '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
  ),
  components: [
    {
      component: parameterizedComponent,
      parameters: {
        environment: imagebuilder.ComponentParameterValue.fromString('production'),
        version: imagebuilder.ComponentParameterValue.fromString('1.0.0')
      }
    }
  ]
});
```

## Properties

- `image`: string — The rendered base image to use.

## Methods

- `fromDockerHub(repository: string, tag: string): BaseContainerImage // chainable` (static) — The DockerHub image to use as the base image in a container recipe.

  **Parameters**

  - `repository` — The DockerHub repository where the base image resides in.
  - `tag` — The tag of the base image in the DockerHub repository.

- `fromEcr(repository: IRepository, tag: string): BaseContainerImage // chainable` (static) — The ECR container image to use as the base image in a container recipe.

  **Parameters**

  - `repository` — The ECR repository where the base image resides in.
  - `tag` — The tag of the base image in the ECR repository.

- `fromEcrPublic(registryAlias: string, repositoryName: string, tag: string): BaseContainerImage // chainable` (static) — The ECR public container image to use as the base image in a container recipe.

  **Parameters**

  - `registryAlias` — The alias of the ECR public registry where the base image resides in.
  - `repositoryName` — The name of the ECR public repository, where the base image resides in.
  - `tag` — The tag of the base image in the ECR public repository.

- `fromImage(image: IImage): BaseContainerImage // chainable` (static) — The EC2 Image Builder image to use as a base image in a container recipe.

  **Parameters**

  - `image` — The EC2 Image Builder image to use as a base image.

- `fromString(baseContainerImageString: string): BaseContainerImage // chainable` (static) — The string value of the base image to use in a container recipe.

  This can be an EC2 Image Builder image ARN,
  an ECR or ECR public image, or a container URI sourced from a third-party container registry such as DockerHub.

  **Parameters**

  - `baseContainerImageString` — The base image as a direct string value.
