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

A container repository used to distribute container images in EC2 Image Builder.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/distribution-configuration.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/distribution-configuration.ts#L400)

## 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')
      }
    }
  ]
});
```

## Initializer

```ts
new Repository()
```

## Properties

- `repositoryName`: string (required) — The name of the container repository where the output container image is stored.

- `service`: [RepositoryService](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.RepositoryService.html) (required) — The service in which the container repository is hosted.

## Methods

- `fromEcr(repository: IRepository): Repository // chainable` (static) — The ECR repository to use as the target container repository.

  **Parameters**

  - `repository` — The ECR repository to use.
