Dagger
Search

container-images

Portable container image CI scenario.

Installation

dagger install github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90

Entrypoint

Return Type
ContainerImages !
Arguments
NameTypeDefault ValueDescription
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
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the Bake file
bakePathString !-Path to the Bake file relative to source
componentPathString !-Repository component path used as the Git release tag prefix
bakeTargetString nullOptional Bake target to inspect; omit when the manifest contains exactly one target
variableOverrides[String ! ] nullOptional 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 string
func (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 \
 module
func (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
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the Bake file and image build context
bakePathString !-Path to the Bake file relative to source
bakeTargetString nullOptional Bake target to publish; omit when the manifest contains exactly one target
variableOverrides[String ! ] nullOptional Bake variable overrides in KEY=VALUE form
publishDryRunBoolean !falseValidate 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 boolean
func (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
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the image build context
contextPathString !-Build context path relative to source
imageRefString !-Destination OCI image reference
dockerfilePathString !"Dockerfile"Dockerfile path relative to context
targetString nullOptional Docker build target
buildArgs[String ! ] nullOptional build arguments in KEY=VALUE form
platforms[Scalar ! ] nullOptional target platforms
publishDryRunBoolean !falseValidate 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 boolean
func (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
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the image build contexts
publishSpecs[String ! ] !-Image publish specs in CONTEXT_PATH=IMAGE_REF form
dockerfilePathString !"Dockerfile"Dockerfile path relative to each context
targetString nullOptional Docker build target
buildArgs[String ! ] nullOptional build arguments in KEY=VALUE form
platforms[Scalar ! ] nullOptional target platforms
publishDryRunBoolean !falseValidate 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 boolean
func (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-addresses
func (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
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the Bake file and image build context
bakePathString !-Path to the Bake file relative to source
bakeTargetString nullOptional Bake target to verify; omit when the manifest contains exactly one target
variableOverrides[String ! ] nullOptional Bake variable overrides in KEY=VALUE form
smokeCommand[String ! ] nullOptional command to run in the built image
Example
dagger -m github.com/riftonix/daggerverse/scenarios/container-images@de9bac862e41ed778457742a3fbb20cc11763d90 call \
 verify-bake-target --bake-path string
func (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
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the image build context
contextPathString !-Build context path relative to source
dockerfilePathString !"Dockerfile"Dockerfile path relative to context
targetString nullOptional Docker build target
buildArgs[String ! ] nullOptional build arguments in KEY=VALUE form
platforms[Scalar ! ] nullOptional target platforms
smokeCommand[String ! ] nullOptional 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 string
func (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
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the image build contexts
contextPaths[String ! ] !-Build context paths relative to source
dockerfilePathString !"Dockerfile"Dockerfile path relative to each context
targetString nullOptional Docker build target
buildArgs[String ! ] nullOptional build arguments in KEY=VALUE form
platforms[Scalar ! ] nullOptional target platforms
smokeCommand[String ! ] nullOptional 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 string
func (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
NameTypeDefault ValueDescription
addressString !-Registry address to authenticate against
usernameString !-Registry username
passwordSecret !-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:MYSECRET
func (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)
}