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
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Source image reference (e.g., "harbor.example.com/test/redis:latest") |
target | String ! | - | Target image reference (e.g., "ghcr.io/test/redis") |
sourceRegistry | String | - | Source registry URL (extracted from source if empty) |
sourceUsername | String | - | Username for source registry |
sourcePassword | Secret | - | Password for source registry |
targetRegistry | String | - | Target registry URL (extracted from target if empty) |
targetUsername | String | - | Username for target registry |
targetPassword | Secret | - | Password for target registry |
insecure | Boolean | false | Allow insecure registry connections |
platform | String | "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)
}