Dagger
Search

crane

Crane is a tool for managing container images

Installation

dagger install github.com/opopops/daggerverse/crane@v1.5.0

Entrypoint

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
imageString "cgr.dev/chainguard/wolfi-base:latest"wolfi-base image
versionString "latest"Crane version
userString "65532"Image user
Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d 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 module

container() 🔗

Returns container

Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 container
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Crane().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.crane()
		.container()
	)
@func()
example(): Container {
	return dag
		.crane()
		.container()
}

copy() 🔗

Copy images.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceString !-

Source image

targetString !-

Target image

platformScalar null

Specifies the platform

jobsInteger null

The maximum number of concurrent copies

allTagsBoolean false

Copy all tags from SRC to DST

noClobberBoolean false

Avoid overwriting existing tags in DST

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d 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)
}

digest() 🔗

Tag remote image without downloading it.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-

Image

platformScalar null

Specifies the platform

fullRefBoolean false

Print the full image reference by digest

tarballFile null

Tarball containing the image

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 digest --image string
func (m *MyModule) Example(ctx context.Context, image string) string  {
	return dag.
			Crane().
			Digest(ctx, image)
}
@function
async def example(image: str) -> str:
	return await (
		dag.crane()
		.digest(image)
	)
@func()
async example(image: string): Promise<string> {
	return dag
		.crane()
		.digest(image)
}

dockerConfig() 🔗

Returns the Docker config file

Return Type
File !
Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 docker-config
func (m *MyModule) Example() *dagger.File  {
	return dag.
			Crane().
			DockerConfig()
}
@function
def example() -> dagger.File:
	return (
		dag.crane()
		.docker_config()
	)
@func()
example(): File {
	return dag
		.crane()
		.dockerConfig()
}

manifest() 🔗

Returns the manifest file of an image

Return Type
File !
Arguments
NameTypeDefault ValueDescription
imageString !-

Image

platformScalar null

Specifies the platform

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 manifest --image string
func (m *MyModule) Example(image string) *dagger.File  {
	return dag.
			Crane().
			Manifest(image)
}
@function
def example(image: str) -> dagger.File:
	return (
		dag.crane()
		.manifest(image)
	)
@func()
example(image: string): File {
	return dag
		.crane()
		.manifest(image)
}

push() 🔗

Push image from OCI layout dir

Return Type
String !
Arguments
NameTypeDefault ValueDescription
pathDirectory !-

OCI layout dir

imageString !-

Image tag

indexBoolean false

Push a collection of images as a single index

platformScalar null

Specifies the platform

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 push --path DIR_PATH --image string
func (m *MyModule) Example(ctx context.Context, path *dagger.Directory, image string) string  {
	return dag.
			Crane().
			Push(ctx, path, image)
}
@function
async def example(path: dagger.Directory, image: str) -> str:
	return await (
		dag.crane()
		.push(path, image)
	)
@func()
async example(path: Directory, image: string): Promise<string> {
	return dag
		.crane()
		.push(path, image)
}

pushTarball() 🔗

Push image from tarball

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tarballFile !-

Image tarball

imageString !-

Image tag

indexBoolean false

Push a collection of images as a single index

platformScalar null

Specifies the platform

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 push-tarball --tarball file:path --image string
func (m *MyModule) Example(ctx context.Context, tarball *dagger.File, image string) string  {
	return dag.
			Crane().
			PushTarball(ctx, tarball, image)
}
@function
async def example(tarball: dagger.File, image: str) -> str:
	return await (
		dag.crane()
		.push_tarball(tarball, image)
	)
@func()
async example(tarball: File, image: string): Promise<string> {
	return dag
		.crane()
		.pushTarball(tarball, image)
}

tag() 🔗

Tag remote image without downloading it.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-

Image

tagString !-

New tag

platformScalar null

Specifies the platform

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 tag --image string --tag string
func (m *MyModule) Example(ctx context.Context, image string, tag string) string  {
	return dag.
			Crane().
			Tag(ctx, image, tag)
}
@function
async def example(image: str, tag: str) -> str:
	return await (
		dag.crane()
		.tag(image, tag)
	)
@func()
async example(image: string, tag: string): Promise<string> {
	return dag
		.crane()
		.tag(image, tag)
}

withCopy() 🔗

Copy images (For chaining).

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
sourceString !-

Source image

targetString !-

Target image

platformScalar null

Specifies the platform

jobsInteger nullNo description provided
allTagsBoolean false

Copy all tags from SRC to DST

noClobberBoolean false

Avoid overwriting existing tags in DST

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 with-copy --source string --target string
func (m *MyModule) Example(source string, target string) *dagger.Crane  {
	return dag.
			Crane().
			WithCopy(source, target)
}
@function
def example(source: str, target: str) -> dagger.Crane:
	return (
		dag.crane()
		.with_copy(source, target)
	)
@func()
example(source: string, target: string): Crane {
	return dag
		.crane()
		.withCopy(source, target)
}

withDockerConfig() 🔗

Set Docker config file (for chaining)

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
dockerConfigFile !-

Docker config file

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 with-docker-config --docker-config file:path
func (m *MyModule) Example(dockerConfig *dagger.File) *dagger.Crane  {
	return dag.
			Crane().
			WithDockerConfig(dockerConfig)
}
@function
def example(docker_config: dagger.File) -> dagger.Crane:
	return (
		dag.crane()
		.with_docker_config(docker_config)
	)
@func()
example(dockerConfig: File): Crane {
	return dag
		.crane()
		.withDockerConfig(dockerConfig)
}

withPush() 🔗

Push image from OCI layout dir (For chaining)

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
pathDirectory !-

OCI layout dir

imageString !-

Image tag

indexBoolean false

Push a collection of images as a single index

platformScalar null

Specifies the platform

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 with-push --path DIR_PATH --image string
func (m *MyModule) Example(path *dagger.Directory, image string) *dagger.Crane  {
	return dag.
			Crane().
			WithPush(path, image)
}
@function
def example(path: dagger.Directory, image: str) -> dagger.Crane:
	return (
		dag.crane()
		.with_push(path, image)
	)
@func()
example(path: Directory, image: string): Crane {
	return dag
		.crane()
		.withPush(path, image)
}

withPushTarball() 🔗

Push image from tarball (For chaining)

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
tarballFile !-

Image tarball

imageString !-

Image tag

platformScalar null

Specifies the platform

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 with-push-tarball --tarball file:path --image string
func (m *MyModule) Example(tarball *dagger.File, image string) *dagger.Crane  {
	return dag.
			Crane().
			WithPushTarball(tarball, image)
}
@function
def example(tarball: dagger.File, image: str) -> dagger.Crane:
	return (
		dag.crane()
		.with_push_tarball(tarball, image)
	)
@func()
example(tarball: File, image: string): Crane {
	return dag
		.crane()
		.withPushTarball(tarball, image)
}

withRegistryAuth() 🔗

Authenticate with registry

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
usernameString !-

Registry username

secretSecret !-

Registry password

addressString "docker.io"

Registry host

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 with-registry-auth --username string --secret env:MYSECRET
func (m *MyModule) Example(username string, secret *dagger.Secret) *dagger.Crane  {
	return dag.
			Crane().
			WithRegistryAuth(username, secret)
}
@function
def example(username: str, secret: dagger.Secret) -> dagger.Crane:
	return (
		dag.crane()
		.with_registry_auth(username, secret)
	)
@func()
example(username: string, secret: Secret): Crane {
	return dag
		.crane()
		.withRegistryAuth(username, secret)
}

withTag() 🔗

Tag remote image without downloading it (For chaining).

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
imageString !-

Image

tagString !-

New tag

platformScalar null

Specifies the platform

Example
dagger -m github.com/opopops/daggerverse/crane@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
 with-tag --image string --tag string
func (m *MyModule) Example(image string, tag string) *dagger.Crane  {
	return dag.
			Crane().
			WithTag(image, tag)
}
@function
def example(image: str, tag: str) -> dagger.Crane:
	return (
		dag.crane()
		.with_tag(image, tag)
	)
@func()
example(image: string, tag: string): Crane {
	return dag
		.crane()
		.withTag(image, tag)
}