Skip to content

BaseContainerImage Class ​

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

This class is adapted from AWS CDK's BaseContainerImage class to support both string and object inputs.

Initializer ​

ts
import { BaseContainerImage } from '@cloudsnorkel/cdk-github-runners'

new BaseContainerImage(image: string, ecrRepository?: IRepository)
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.BaseContainerImage(
  image: str,
  ecr_repository: IRepository = None
)
java
import com.cloudsnorkel.cdk.github.runners.BaseContainerImage;

new BaseContainerImage(java.lang.String image);,new BaseContainerImage(java.lang.String image, IRepository ecrRepository);
csharp
using CloudSnorkel;

new BaseContainerImage(string Image, IRepository EcrRepository = null);
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.NewBaseContainerImage(image *string, ecrRepository IRepository) BaseContainerImage

Static Functions ​

fromDockerHub()from_docker_hub()fromDockerHub()FromDockerHub()FromDockerHub() ​

The DockerHub image to use as the base image in a container recipe.

ts
import { BaseContainerImage } from '@cloudsnorkel/cdk-github-runners'

BaseContainerImage.fromDockerHub(repository: string, tag: string)
  • repository: string

    The DockerHub repository where the base image resides in.

  • tag: string

    The tag of the base image in the DockerHub repository.

python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.BaseContainerImage.from_docker_hub(
  repository: str,
  tag: str
)
  • repository: str

    The DockerHub repository where the base image resides in.

  • tag: str

    The tag of the base image in the DockerHub repository.

java
import com.cloudsnorkel.cdk.github.runners.BaseContainerImage;

BaseContainerImage.fromDockerHub(java.lang.String repository, java.lang.String tag)
  • repository: java.lang.String

    The DockerHub repository where the base image resides in.

  • tag: java.lang.String

    The tag of the base image in the DockerHub repository.

csharp
using CloudSnorkel;

BaseContainerImage.FromDockerHub(string Repository, string Tag);
  • Repository: string

    The DockerHub repository where the base image resides in.

  • Tag: string

    The tag of the base image in the DockerHub repository.

go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.BaseContainerImage_FromDockerHub(repository *string, tag *string) BaseContainerImage
  • repository: *string

    The DockerHub repository where the base image resides in.

  • tag: *string

    The tag of the base image in the DockerHub repository.

fromEcr()from_ecr()fromEcr()FromEcr()FromEcr() ​

The ECR container image to use as the base image in a container recipe.

ts
import { BaseContainerImage } from '@cloudsnorkel/cdk-github-runners'

BaseContainerImage.fromEcr(repository: IRepository, tag: string)
  • repository: IRepository

    The ECR repository where the base image resides in.

  • tag: string

    The tag of the base image in the ECR repository.

python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.BaseContainerImage.from_ecr(
  repository: IRepository,
  tag: str
)
  • repository: IRepository

    The ECR repository where the base image resides in.

  • tag: str

    The tag of the base image in the ECR repository.

java
import com.cloudsnorkel.cdk.github.runners.BaseContainerImage;

BaseContainerImage.fromEcr(IRepository repository, java.lang.String tag)
  • repository: IRepository

    The ECR repository where the base image resides in.

  • tag: java.lang.String

    The tag of the base image in the ECR repository.

csharp
using CloudSnorkel;

BaseContainerImage.FromEcr(IRepository Repository, string Tag);
  • Repository: IRepository

    The ECR repository where the base image resides in.

  • Tag: string

    The tag of the base image in the ECR repository.

go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.BaseContainerImage_FromEcr(repository IRepository, tag *string) BaseContainerImage
  • repository: IRepository

    The ECR repository where the base image resides in.

  • tag: *string

    The tag of the base image in the ECR repository.

fromEcrPublic()from_ecr_public()fromEcrPublic()FromEcrPublic()FromEcrPublic() ​

The ECR public container image to use as the base image in a container recipe.

ts
import { BaseContainerImage } from '@cloudsnorkel/cdk-github-runners'

BaseContainerImage.fromEcrPublic(registryAlias: string, repositoryName: string, tag: string)
  • registryAlias: string

    The alias of the ECR public registry where the base image resides in.

  • repositoryName: string

    The name of the ECR public repository, where the base image resides in.

  • tag: string

    The tag of the base image in the ECR public repository.

python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.BaseContainerImage.from_ecr_public(
  registry_alias: str,
  repository_name: str,
  tag: str
)
  • registry_alias: str

    The alias of the ECR public registry where the base image resides in.

  • repository_name: str

    The name of the ECR public repository, where the base image resides in.

  • tag: str

    The tag of the base image in the ECR public repository.

java
import com.cloudsnorkel.cdk.github.runners.BaseContainerImage;

BaseContainerImage.fromEcrPublic(java.lang.String registryAlias, java.lang.String repositoryName, java.lang.String tag)
  • registryAlias: java.lang.String

    The alias of the ECR public registry where the base image resides in.

  • repositoryName: java.lang.String

    The name of the ECR public repository, where the base image resides in.

  • tag: java.lang.String

    The tag of the base image in the ECR public repository.

csharp
using CloudSnorkel;

BaseContainerImage.FromEcrPublic(string RegistryAlias, string RepositoryName, string Tag);
  • RegistryAlias: string

    The alias of the ECR public registry where the base image resides in.

  • RepositoryName: string

    The name of the ECR public repository, where the base image resides in.

  • Tag: string

    The tag of the base image in the ECR public repository.

go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.BaseContainerImage_FromEcrPublic(registryAlias *string, repositoryName *string, tag *string) BaseContainerImage
  • registryAlias: *string

    The alias of the ECR public registry where the base image resides in.

  • repositoryName: *string

    The name of the ECR public repository, where the base image resides in.

  • tag: *string

    The tag of the base image in the ECR public repository.

fromString()from_string()fromString()FromString()FromString() ​

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.

ts
import { BaseContainerImage } from '@cloudsnorkel/cdk-github-runners'

BaseContainerImage.fromString(baseContainerImageString: string)
  • baseContainerImageString: string

    The base image as a direct string value.

python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.BaseContainerImage.from_string(
  base_container_image_string: str
)
  • base_container_image_string: str

    The base image as a direct string value.

java
import com.cloudsnorkel.cdk.github.runners.BaseContainerImage;

BaseContainerImage.fromString(java.lang.String baseContainerImageString)
  • baseContainerImageString: java.lang.String

    The base image as a direct string value.

csharp
using CloudSnorkel;

BaseContainerImage.FromString(string BaseContainerImageString);
  • BaseContainerImageString: string

    The base image as a direct string value.

go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.BaseContainerImage_FromString(baseContainerImageString *string) BaseContainerImage
  • baseContainerImageString: *string

    The base image as a direct string value.

Properties ​

imageimageimageImageImage ​

image: string

image: str

image: java.lang.String

Image: string

Image: *string

The rendered base image to use.

ecrRepositoryecr_repositoryecrRepositoryEcrRepositoryEcrRepository ​

ecrRepository?: IRepository

ecr_repository?: IRepository

ecrRepository?: IRepository

EcrRepository?: IRepository

EcrRepository?: IRepository

The ECR repository if this image was created from an ECR repository.

This allows automatic permission granting for CodeBuild.

Released under the Apache-2.0 License.