Dagger
Search

crane

Crane is a tool for managing container images

Installation

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

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
dockerConfigFile nullDocker config file
containerContainer nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string
func (m *MyModule) Example(image string, version string, user string) *dagger.Crane  {
	return dag.
			Crane(image, version, user)
}
@function
def example(image: str, version: str, user: str, ) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
	)
@func()
example(image: string, version: string, user: string, ): Crane {
	return dag
		.crane(image, version, user)
}

Types

Crane 🔗

Crane module

container() 🔗

Returns container

Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/crane@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string container
func (m *MyModule) Example(image string, version string, user string) *dagger.Container  {
	return dag.
			Crane(image, version, user).
			Container()
}
@function
def example(image: str, version: str, user: str, ) -> dagger.Container:
	return (
		dag.crane(image, version, user)
		.container()
	)
@func()
example(image: string, version: string, user: string, ): Container {
	return dag
		.crane(image, version, user)
		.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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string copy --source string --target string --all-tags boolean --no-clobber boolean
func (m *MyModule) Example(ctx context.Context, image string, version string, user string, source string, target string, allTags bool, noClobber bool) string  {
	return dag.
			Crane(image, version, user).
			Copy(ctx, source, target, allTags, noClobber)
}
@function
async def example(image: str, version: str, user: str, source: str, target: str, all_tags: bool, no_clobber: bool) -> str:
	return await (
		dag.crane(image, version, user)
		.copy(source, target, all_tags, no_clobber)
	)
@func()
async example(image: string, version: string, user: string, source: string, target: string, allTags: boolean, noClobber: boolean): Promise<string> {
	return dag
		.crane(image, version, user)
		.copy(source, target, allTags, noClobber)
}

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

tarballString !""

Path to tarball containing the image

Example
dagger -m github.com/opopops/daggerverse/crane@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string digest --image string --full-ref boolean --tarball string
func (m *MyModule) Example(ctx context.Context, image string, version string, user string, image1 string, fullRef bool, tarball string) string  {
	return dag.
			Crane(image, version, user).
			Digest(ctx, image1, fullRef, tarball)
}
@function
async def example(image: str, version: str, user: str, image1: str, full_ref: bool, tarball: str) -> str:
	return await (
		dag.crane(image, version, user)
		.digest(image1, full_ref, tarball)
	)
@func()
async example(image: string, version: string, user: string, image1: string, fullRef: boolean, tarball: string): Promise<string> {
	return dag
		.crane(image, version, user)
		.digest(image1, fullRef, tarball)
}

manifest() 🔗

Get the manifest of an image

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-

Image

platformScalar null

Specifies the platform

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

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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string push --path DIR_PATH --image string --index boolean
func (m *MyModule) Example(ctx context.Context, image string, version string, user string, path *dagger.Directory, image1 string, index bool) string  {
	return dag.
			Crane(image, version, user).
			Push(ctx, path, image1, index)
}
@function
async def example(image: str, version: str, user: str, path: dagger.Directory, image1: str, index: bool) -> str:
	return await (
		dag.crane(image, version, user)
		.push(path, image1, index)
	)
@func()
async example(image: string, version: string, user: string, path: Directory, image1: string, index: boolean): Promise<string> {
	return dag
		.crane(image, version, user)
		.push(path, image1, index)
}

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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string push-tarball --tarball file:path --image string --index boolean
func (m *MyModule) Example(ctx context.Context, image string, version string, user string, tarball *dagger.File, image1 string, index bool) string  {
	return dag.
			Crane(image, version, user).
			PushTarball(ctx, tarball, image1, index)
}
@function
async def example(image: str, version: str, user: str, tarball: dagger.File, image1: str, index: bool) -> str:
	return await (
		dag.crane(image, version, user)
		.push_tarball(tarball, image1, index)
	)
@func()
async example(image: string, version: string, user: string, tarball: File, image1: string, index: boolean): Promise<string> {
	return dag
		.crane(image, version, user)
		.pushTarball(tarball, image1, index)
}

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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string tag --image string --tag string
func (m *MyModule) Example(ctx context.Context, image string, version string, user string, image1 string, tag string) string  {
	return dag.
			Crane(image, version, user).
			Tag(ctx, image1, tag)
}
@function
async def example(image: str, version: str, user: str, image1: str, tag: str) -> str:
	return await (
		dag.crane(image, version, user)
		.tag(image1, tag)
	)
@func()
async example(image: string, version: string, user: string, image1: string, tag: string): Promise<string> {
	return dag
		.crane(image, version, user)
		.tag(image1, 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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string with-copy --source string --target string --all-tags boolean --no-clobber boolean
func (m *MyModule) Example(image string, version string, user string, source string, target string, allTags bool, noClobber bool) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithCopy(source, target, allTags, noClobber)
}
@function
def example(image: str, version: str, user: str, source: str, target: str, all_tags: bool, no_clobber: bool) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_copy(source, target, all_tags, no_clobber)
	)
@func()
example(image: string, version: string, user: string, source: string, target: string, allTags: boolean, noClobber: boolean): Crane {
	return dag
		.crane(image, version, user)
		.withCopy(source, target, allTags, noClobber)
}

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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string with-push --path DIR_PATH --image string --index boolean
func (m *MyModule) Example(image string, version string, user string, path *dagger.Directory, image1 string, index bool) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithPush(path, image1, index)
}
@function
def example(image: str, version: str, user: str, path: dagger.Directory, image1: str, index: bool) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_push(path, image1, index)
	)
@func()
example(image: string, version: string, user: string, path: Directory, image1: string, index: boolean): Crane {
	return dag
		.crane(image, version, user)
		.withPush(path, image1, index)
}

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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string with-push-tarball --tarball file:path --image string
func (m *MyModule) Example(image string, version string, user string, tarball *dagger.File, image1 string) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithPushTarball(tarball, image1)
}
@function
def example(image: str, version: str, user: str, tarball: dagger.File, image1: str) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_push_tarball(tarball, image1)
	)
@func()
example(image: string, version: string, user: string, tarball: File, image1: string): Crane {
	return dag
		.crane(image, version, user)
		.withPushTarball(tarball, image1)
}

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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string with-registry-auth --username string --secret env:MYSECRET --address string
func (m *MyModule) Example(image string, version string, user string, username string, secret *dagger.Secret, address string) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithRegistryAuth(username, secret, address)
}
@function
def example(image: str, version: str, user: str, username: str, secret: dagger.Secret, address: str) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_registry_auth(username, secret, address)
	)
@func()
example(image: string, version: string, user: string, username: string, secret: Secret, address: string): Crane {
	return dag
		.crane(image, version, user)
		.withRegistryAuth(username, secret, address)
}

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@04724e5f5a1c022bf14099d494dea580b5771434 call \
 --image string --version string --user string with-tag --image string --tag string
func (m *MyModule) Example(image string, version string, user string, image1 string, tag string) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithTag(image1, tag)
}
@function
def example(image: str, version: str, user: str, image1: str, tag: str) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_tag(image1, tag)
	)
@func()
example(image: string, version: string, user: string, image1: string, tag: string): Crane {
	return dag
		.crane(image, version, user)
		.withTag(image1, tag)
}