Skip to content

StaticRunnerImage Class ​

Helper class with methods to use static images that are built outside the context of this project.

Initializer ​

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

new StaticRunnerImage()
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.StaticRunnerImage()
java
import com.cloudsnorkel.cdk.github.runners.StaticRunnerImage;

new StaticRunnerImage();
csharp
using CloudSnorkel;

new StaticRunnerImage();
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.NewStaticRunnerImage() StaticRunnerImage

Static Functions ​

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

Create a builder from an existing Docker Hub image.

The image must already have GitHub Actions runner installed. You are responsible to update it and remove it when done.

We create a CodeBuild image builder behind the scenes to copy the image over to ECR. This helps avoid Docker Hub rate limits and prevent failures.

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

StaticRunnerImage.fromDockerHub(scope: Construct, id: string, image: string, architecture?: Architecture, os?: Os)
  • scope: Construct

  • id: string

  • image: string

    Docker Hub image with optional tag.

  • architecture?: Architecture

    image architecture.

  • os?: Os

    image OS.

python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.StaticRunnerImage.from_docker_hub(
  scope: Construct,
  id: str,
  image: str,
  architecture: Architecture = None,
  os: Os = None
)
  • scope: Construct

  • id: str

  • image: str

    Docker Hub image with optional tag.

  • architecture?: Architecture

    image architecture.

  • os?: Os

    image OS.

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

StaticRunnerImage.fromDockerHub(Construct scope, java.lang.String id, java.lang.String image),StaticRunnerImage.fromDockerHub(Construct scope, java.lang.String id, java.lang.String image, Architecture architecture),StaticRunnerImage.fromDockerHub(Construct scope, java.lang.String id, java.lang.String image, Architecture architecture, Os os)
  • scope: Construct

  • id: java.lang.String

  • image: java.lang.String

    Docker Hub image with optional tag.

  • architecture?: Architecture

    image architecture.

  • os?: Os

    image OS.

csharp
using CloudSnorkel;

StaticRunnerImage.FromDockerHub(Construct Scope, string Id, string Image, Architecture Architecture = null, Os Os = null);
  • Scope: Construct

  • Id: string

  • Image: string

    Docker Hub image with optional tag.

  • Architecture?: Architecture

    image architecture.

  • Os?: Os

    image OS.

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

cloudsnorkelcdkgithubrunners.StaticRunnerImage_FromDockerHub(scope Construct, id *string, image *string, architecture Architecture, os Os) IRunnerImageBuilder
  • scope: Construct

  • id: *string

  • image: *string

    Docker Hub image with optional tag.

  • architecture?: Architecture

    image architecture.

  • os?: Os

    image OS.

fromEcrRepository()from_ecr_repository()fromEcrRepository()FromEcrRepository()FromEcrRepository() ​

Create a builder (that doesn't actually build anything) from an existing image in an existing repository.

The image must already have GitHub Actions runner installed. You are responsible to update it and remove it when done.

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

StaticRunnerImage.fromEcrRepository(repository: IRepository, tag?: string, architecture?: Architecture, os?: Os)
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.StaticRunnerImage.from_ecr_repository(
  repository: IRepository,
  tag: str = None,
  architecture: Architecture = None,
  os: Os = None
)
java
import com.cloudsnorkel.cdk.github.runners.StaticRunnerImage;

StaticRunnerImage.fromEcrRepository(IRepository repository),StaticRunnerImage.fromEcrRepository(IRepository repository, java.lang.String tag),StaticRunnerImage.fromEcrRepository(IRepository repository, java.lang.String tag, Architecture architecture),StaticRunnerImage.fromEcrRepository(IRepository repository, java.lang.String tag, Architecture architecture, Os os)
  • repository: IRepository

    ECR repository.

  • tag?: java.lang.String

    image tag.

  • architecture?: Architecture

    image architecture.

  • os?: Os

    image OS.

csharp
using CloudSnorkel;

StaticRunnerImage.FromEcrRepository(IRepository Repository, string Tag = null, Architecture Architecture = null, Os Os = null);
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.StaticRunnerImage_FromEcrRepository(repository IRepository, tag *string, architecture Architecture, os Os) IRunnerImageBuilder

Released under the Apache-2.0 License.