container-images
Portable container image CI scenario.
Installation
dagger install github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90Entrypoint
Return Type
ContainerImages !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| registryAuths | [ContainerImagesRegistryAuth ! ] | - | No description provided |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
func (m *MyModule) Example() *dagger.ContainerImages {
return dag.
ContainerImages()
}@function
def example() -> dagger.ContainerImages:
return (
dag.container_images()
)@func()
example(): ContainerImages {
return dag
.containerImages()
}Types
ContainerImagesRegistryAuth 🔗
Registry authentication configuration.
ContainerImages 🔗
Container image scenario entrypoint.
getBakeReleaseTag() 🔗
Return a Git release tag rendered from resolved Bake metadata.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the Bake file |
| bakePath | String ! | - | Path to the Bake file relative to source |
| componentPath | String ! | - | Repository component path used as the Git release tag prefix |
| bakeTarget | String | null | Optional Bake target to inspect; omit when the manifest contains exactly one target |
| variableOverrides | [String ! ] | null | Optional Bake variable overrides in KEY=VALUE form |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
get-bake-release-tag --bake-path string --component-path stringfunc (m *MyModule) Example(ctx context.Context, bakePath string, componentPath string) string {
return dag.
ContainerImages().
GetBakeReleaseTag(ctxbakePath, componentPath)
}@function
async def example(bake_path: str, component_path: str) -> str:
return await (
dag.container_images()
.get_bake_release_tag(bake_path, component_path)
)@func()
async example(bakePath: string, componentPath: string): Promise<string> {
return dag
.containerImages()
.getBakeReleaseTag(bakePath, componentPath)
}module() 🔗
Return the scenario name.
Return Type
String ! Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
modulefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
ContainerImages().
Module(ctx)
}@function
async def example() -> str:
return await (
dag.container_images()
.module()
)@func()
async example(): Promise<string> {
return dag
.containerImages()
.module()
}publishBakeTarget() 🔗
Build and publish the resolved image references for one Bake target.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the Bake file and image build context |
| bakePath | String ! | - | Path to the Bake file relative to source |
| bakeTarget | String | null | Optional Bake target to publish; omit when the manifest contains exactly one target |
| variableOverrides | [String ! ] | null | Optional Bake variable overrides in KEY=VALUE form |
| publishDryRun | Boolean ! | false | Validate publish inputs without pushing to a registry |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
publish-bake-target --bake-path string --publish-dry-run booleanfunc (m *MyModule) Example(ctx context.Context, bakePath string, publishDryRun bool) []string {
return dag.
ContainerImages().
PublishBakeTarget(ctxbakePath, publishDryRun)
}@function
async def example(bake_path: str, publish_dry_run: bool) -> List[str]:
return await (
dag.container_images()
.publish_bake_target(bake_path, publish_dry_run)
)@func()
async example(bakePath: string, publishDryRun: boolean): Promise<string[]> {
return dag
.containerImages()
.publishBakeTarget(bakePath, publishDryRun)
}publishImage() 🔗
Build and publish one explicit image context.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the image build context |
| contextPath | String ! | - | Build context path relative to source |
| imageRef | String ! | - | Destination OCI image reference |
| dockerfilePath | String ! | "Dockerfile" | Dockerfile path relative to context |
| target | String | null | Optional Docker build target |
| buildArgs | [String ! ] | null | Optional build arguments in KEY=VALUE form |
| platforms | [Scalar ! ] | null | Optional target platforms |
| publishDryRun | Boolean ! | false | Validate publish inputs without pushing to a registry |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
publish-image --context-path string --image-ref string --dockerfile-path string --publish-dry-run booleanfunc (m *MyModule) Example(ctx context.Context, contextPath string, imageRef string, dockerfilePath string, publishDryRun bool) string {
return dag.
ContainerImages().
PublishImage(ctxcontextPath, imageRef, dockerfilePath, publishDryRun)
}@function
async def example(context_path: str, image_ref: str, dockerfile_path: str, publish_dry_run: bool) -> str:
return await (
dag.container_images()
.publish_image(context_path, image_ref, dockerfile_path, publish_dry_run)
)@func()
async example(contextPath: string, imageRef: string, dockerfilePath: string, publishDryRun: boolean): Promise<string> {
return dag
.containerImages()
.publishImage(contextPath, imageRef, dockerfilePath, publishDryRun)
}publishImages() 🔗
Build and publish multiple explicit image contexts.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the image build contexts |
| publishSpecs | [String ! ] ! | - | Image publish specs in CONTEXT_PATH=IMAGE_REF form |
| dockerfilePath | String ! | "Dockerfile" | Dockerfile path relative to each context |
| target | String | null | Optional Docker build target |
| buildArgs | [String ! ] | null | Optional build arguments in KEY=VALUE form |
| platforms | [Scalar ! ] | null | Optional target platforms |
| publishDryRun | Boolean ! | false | Validate publish inputs without pushing to a registry |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
publish-images --publish-specs string1 --publish-specs string2 --dockerfile-path string --publish-dry-run booleanfunc (m *MyModule) Example(ctx context.Context, publishSpecs []string, dockerfilePath string, publishDryRun bool) []string {
return dag.
ContainerImages().
PublishImages(ctxpublishSpecs, dockerfilePath, publishDryRun)
}@function
async def example(publish_specs: List[str], dockerfile_path: str, publish_dry_run: bool) -> List[str]:
return await (
dag.container_images()
.publish_images(publish_specs, dockerfile_path, publish_dry_run)
)@func()
async example(publishSpecs: string[], dockerfilePath: string, publishDryRun: boolean): Promise<string[]> {
return dag
.containerImages()
.publishImages(publishSpecs, dockerfilePath, publishDryRun)
}registryAuthAddresses() 🔗
Return configured registry auth addresses.
Return Type
[String ! ] ! Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
registry-auth-addressesfunc (m *MyModule) Example(ctx context.Context) []string {
return dag.
ContainerImages().
RegistryAuthAddresses(ctx)
}@function
async def example() -> List[str]:
return await (
dag.container_images()
.registry_auth_addresses()
)@func()
async example(): Promise<string[]> {
return dag
.containerImages()
.registryAuthAddresses()
}verifyBakeTarget() 🔗
Build and optionally smoke-check one Bake target without publishing.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the Bake file and image build context |
| bakePath | String ! | - | Path to the Bake file relative to source |
| bakeTarget | String | null | Optional Bake target to verify; omit when the manifest contains exactly one target |
| variableOverrides | [String ! ] | null | Optional Bake variable overrides in KEY=VALUE form |
| smokeCommand | [String ! ] | null | Optional command to run in the built image |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
verify-bake-target --bake-path stringfunc (m *MyModule) Example(ctx context.Context, bakePath string) string {
return dag.
ContainerImages().
VerifyBakeTarget(ctxbakePath)
}@function
async def example(bake_path: str) -> str:
return await (
dag.container_images()
.verify_bake_target(bake_path)
)@func()
async example(bakePath: string): Promise<string> {
return dag
.containerImages()
.verifyBakeTarget(bakePath)
}verifyImage() 🔗
Build and optionally smoke-check one explicit image context.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the image build context |
| contextPath | String ! | - | Build context path relative to source |
| dockerfilePath | String ! | "Dockerfile" | Dockerfile path relative to context |
| target | String | null | Optional Docker build target |
| buildArgs | [String ! ] | null | Optional build arguments in KEY=VALUE form |
| platforms | [Scalar ! ] | null | Optional target platforms |
| smokeCommand | [String ! ] | null | Optional command to run in the built image |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
verify-image --context-path string --dockerfile-path stringfunc (m *MyModule) Example(ctx context.Context, contextPath string, dockerfilePath string) string {
return dag.
ContainerImages().
VerifyImage(ctxcontextPath, dockerfilePath)
}@function
async def example(context_path: str, dockerfile_path: str) -> str:
return await (
dag.container_images()
.verify_image(context_path, dockerfile_path)
)@func()
async example(contextPath: string, dockerfilePath: string): Promise<string> {
return dag
.containerImages()
.verifyImage(contextPath, dockerfilePath)
}verifyImages() 🔗
Build and optionally smoke-check multiple explicit image contexts.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the image build contexts |
| contextPaths | [String ! ] ! | - | Build context paths relative to source |
| dockerfilePath | String ! | "Dockerfile" | Dockerfile path relative to each context |
| target | String | null | Optional Docker build target |
| buildArgs | [String ! ] | null | Optional build arguments in KEY=VALUE form |
| platforms | [Scalar ! ] | null | Optional target platforms |
| smokeCommand | [String ! ] | null | Optional command to run in each built image |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
verify-images --context-paths string1 --context-paths string2 --dockerfile-path stringfunc (m *MyModule) Example(ctx context.Context, contextPaths []string, dockerfilePath string) []string {
return dag.
ContainerImages().
VerifyImages(ctxcontextPaths, dockerfilePath)
}@function
async def example(context_paths: List[str], dockerfile_path: str) -> List[str]:
return await (
dag.container_images()
.verify_images(context_paths, dockerfile_path)
)@func()
async example(contextPaths: string[], dockerfilePath: string): Promise<string[]> {
return dag
.containerImages()
.verifyImages(contextPaths, dockerfilePath)
}withRegistryAuth() 🔗
Configure registry authentication for later publication.
Return Type
ContainerImages !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| address | String ! | - | Registry address to authenticate against |
| username | String ! | - | Registry username |
| password | Secret ! | - | Registry password or token secret |
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
with-registry-auth --address string --username string --password env:MYSECRETfunc (m *MyModule) Example(address string, username string, password *dagger.Secret) *dagger.ContainerImages {
return dag.
ContainerImages().
WithRegistryAuth(address, username, password)
}@function
def example(address: str, username: str, password: dagger.Secret) -> dagger.ContainerImages:
return (
dag.container_images()
.with_registry_auth(address, username, password)
)@func()
example(address: string, username: string, password: Secret): ContainerImages {
return dag
.containerImages()
.withRegistryAuth(address, username, password)
}