Dagger
Search

crane

No long description provided.

Installation

dagger install github.com/stuttgart-things/dagger/crane@v0.7.1

Entrypoint

Return Type
Crane
Example
dagger -m github.com/stuttgart-things/dagger/crane@687af29660aa25075f89c4f5763f0d37b52b00b6 call \
func (m *myModule) example() *dagger.Crane  {
	return dag.
			Crane()
}
@function
def example() -> dagger.Crane:
	return (
		dag.crane()
	)
@func()
example(): Crane {
	return dag
		.crane()
}

Types

Crane 🔗

Crane installs Crane CLI on a Wolfi base image at runtime @module

baseImage() 🔗

Base Wolfi image to use

Return Type
String !
Example
dagger -m github.com/stuttgart-things/dagger/crane@687af29660aa25075f89c4f5763f0d37b52b00b6 call \
 base-image
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Crane().
			BaseImage(ctx)
}
@function
async def example() -> str:
	return await (
		dag.crane()
		.base_image()
	)
@func()
async example(): Promise<string> {
	return dag
		.crane()
		.baseImage()
}

version() 🔗

Crane version to install (e.g., “latest” or specific version)

Return Type
String !
Example
dagger -m github.com/stuttgart-things/dagger/crane@687af29660aa25075f89c4f5763f0d37b52b00b6 call \
 version
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Crane().
			Version(ctx)
}
@function
async def example() -> str:
	return await (
		dag.crane()
		.version()
	)
@func()
async example(): Promise<string> {
	return dag
		.crane()
		.version()
}

copy() 🔗

Copy copies an image between registries with authentication This is the primary function that will be called from the CLI +call

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceString !-Source image reference (e.g., "harbor.example.com/test/redis:latest")
targetString !-Target image reference (e.g., "ghcr.io/test/redis")
sourceRegistryString -Source registry URL (extracted from source if empty)
sourceUsernameString -Username for source registry
sourcePasswordSecret -Password for source registry
targetRegistryString -Target registry URL (extracted from target if empty)
targetUsernameString -Username for target registry
targetPasswordSecret -Password for target registry
insecureBoolean falseAllow insecure registry connections
platformString "linux/amd64"Image platform
Example
dagger -m github.com/stuttgart-things/dagger/crane@687af29660aa25075f89c4f5763f0d37b52b00b6 call \
 copy --source string --target string
func (m *myModule) example(ctx context.Context, source string, target string) string  {
	return dag.
			Crane().
			Copy(ctx, source, target)
}
@function
async def example(source: str, target: str) -> str:
	return await (
		dag.crane()
		.copy(source, target)
	)
@func()
async example(source: string, target: string): Promise<string> {
	return dag
		.crane()
		.copy(source, target)
}