Dagger
Search

crane

Crane is a tool for managing container images

Installation

dagger install github.com/opopops/daggerverse/crane@v1.4.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
dockerConfigFile nullDocker config file
containerContainer nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a 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@da1fc9b1eb454de426830a4c59eeb433c4c53e4a 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
platformString !""Specifies the platform
jobsInteger nullThe maximum number of concurrent copies
allTagsBoolean !falseCopy all tags from SRC to DST
noClobberBoolean !falseAvoid overwriting existing tags in DST
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string copy --source string --target string --platform string --all-tags boolean --no-clobber boolean
func (m *myModule) example(ctx context.Context, image string, version string, user string, source string, target string, platform string, allTags bool, noClobber bool) string  {
	return dag.
			Crane(image, version, user).
			Copy(ctx, source, target, platform, allTags, noClobber)
}
@function
async def example(image: str, version: str, user: str, source: str, target: str, platform: str, all_tags: bool, no_clobber: bool) -> str:
	return await (
		dag.crane(image, version, user)
		.copy(source, target, platform, all_tags, no_clobber)
	)
@func()
async example(image: string, version: string, user: string, source: string, target: string, platform: string, allTags: boolean, noClobber: boolean): Promise<string> {
	return dag
		.crane(image, version, user)
		.copy(source, target, platform, allTags, noClobber)
}

digest() 🔗

Tag remote image without downloading it.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-Image
platformString !""Specifies the platform
fullRefBoolean !falsePrint the full image reference by digest
tarballString !""Path to tarball containing the image
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string digest --image string --platform string --full-ref boolean --tarball string
func (m *myModule) example(ctx context.Context, image string, version string, user string, image1 string, platform string, fullRef bool, tarball string) string  {
	return dag.
			Crane(image, version, user).
			Digest(ctx, image1, platform, fullRef, tarball)
}
@function
async def example(image: str, version: str, user: str, image1: str, platform: str, full_ref: bool, tarball: str) -> str:
	return await (
		dag.crane(image, version, user)
		.digest(image1, platform, full_ref, tarball)
	)
@func()
async example(image: string, version: string, user: string, image1: string, platform: string, fullRef: boolean, tarball: string): Promise<string> {
	return dag
		.crane(image, version, user)
		.digest(image1, platform, fullRef, tarball)
}

manifest() 🔗

Get the manifest of an image

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-Image
platformString !""Specifies the platform
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string manifest --image string --platform string
func (m *myModule) example(ctx context.Context, image string, version string, user string, image1 string, platform string) string  {
	return dag.
			Crane(image, version, user).
			Manifest(ctx, image1, platform)
}
@function
async def example(image: str, version: str, user: str, image1: str, platform: str) -> str:
	return await (
		dag.crane(image, version, user)
		.manifest(image1, platform)
	)
@func()
async example(image: string, version: string, user: string, image1: string, platform: string): Promise<string> {
	return dag
		.crane(image, version, user)
		.manifest(image1, platform)
}

push() 🔗

Push image from OCI layout dir

Return Type
String !
Arguments
NameTypeDefault ValueDescription
pathDirectory !-OCI layout dir
imageString !-Image tag
indexBoolean !falsePush a collection of images as a single index
platformString !""Specifies the platform
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string push --path DIR_PATH --image string --index boolean --platform string
func (m *myModule) example(ctx context.Context, image string, version string, user string, path *dagger.Directory, image1 string, index bool, platform string) string  {
	return dag.
			Crane(image, version, user).
			Push(ctx, path, image1, index, platform)
}
@function
async def example(image: str, version: str, user: str, path: dagger.Directory, image1: str, index: bool, platform: str) -> str:
	return await (
		dag.crane(image, version, user)
		.push(path, image1, index, platform)
	)
@func()
async example(image: string, version: string, user: string, path: Directory, image1: string, index: boolean, platform: string): Promise<string> {
	return dag
		.crane(image, version, user)
		.push(path, image1, index, platform)
}

pushTarball() 🔗

Push image from tarball

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tarballFile !-Image tarball
imageString !-Image tag
platformString !""Specifies the platform
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string push-tarball --tarball file:path --image string --platform string
func (m *myModule) example(ctx context.Context, image string, version string, user string, tarball *dagger.File, image1 string, platform string) string  {
	return dag.
			Crane(image, version, user).
			PushTarball(ctx, tarball, image1, platform)
}
@function
async def example(image: str, version: str, user: str, tarball: dagger.File, image1: str, platform: str) -> str:
	return await (
		dag.crane(image, version, user)
		.push_tarball(tarball, image1, platform)
	)
@func()
async example(image: string, version: string, user: string, tarball: File, image1: string, platform: string): Promise<string> {
	return dag
		.crane(image, version, user)
		.pushTarball(tarball, image1, platform)
}

tag() 🔗

Tag remote image without downloading it.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-Image
tagString !-New tag
platformString !""Specifies the platform
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string tag --image string --tag string --platform string
func (m *myModule) example(ctx context.Context, image string, version string, user string, image1 string, tag string, platform string) string  {
	return dag.
			Crane(image, version, user).
			Tag(ctx, image1, tag, platform)
}
@function
async def example(image: str, version: str, user: str, image1: str, tag: str, platform: str) -> str:
	return await (
		dag.crane(image, version, user)
		.tag(image1, tag, platform)
	)
@func()
async example(image: string, version: string, user: string, image1: string, tag: string, platform: string): Promise<string> {
	return dag
		.crane(image, version, user)
		.tag(image1, tag, platform)
}

withCopy() 🔗

Copy images (For chaining).

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
sourceString !-Source image
targetString !-Target image
platformString !""Specifies the platform
jobsInteger nullNo description provided
allTagsBoolean !falseCopy all tags from SRC to DST
noClobberBoolean !falseAvoid overwriting existing tags in DST
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string with-copy --source string --target string --platform string --all-tags boolean --no-clobber boolean
func (m *myModule) example(image string, version string, user string, source string, target string, platform string, allTags bool, noClobber bool) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithCopy(source, target, platform, allTags, noClobber)
}
@function
def example(image: str, version: str, user: str, source: str, target: str, platform: str, all_tags: bool, no_clobber: bool) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_copy(source, target, platform, all_tags, no_clobber)
	)
@func()
example(image: string, version: string, user: string, source: string, target: string, platform: string, allTags: boolean, noClobber: boolean): Crane {
	return dag
		.crane(image, version, user)
		.withCopy(source, target, platform, 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 !falsePush a collection of images as a single index
platformString !""Specifies the platform
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string with-push --path DIR_PATH --image string --index boolean --platform string
func (m *myModule) example(image string, version string, user string, path *dagger.Directory, image1 string, index bool, platform string) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithPush(path, image1, index, platform)
}
@function
def example(image: str, version: str, user: str, path: dagger.Directory, image1: str, index: bool, platform: str) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_push(path, image1, index, platform)
	)
@func()
example(image: string, version: string, user: string, path: Directory, image1: string, index: boolean, platform: string): Crane {
	return dag
		.crane(image, version, user)
		.withPush(path, image1, index, platform)
}

withPushTarball() 🔗

Push image from tarball (For chaining)

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
tarballFile !-Image tarball
imageString !-Image tag
platformString !""Specifies the platform
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string with-push-tarball --tarball file:path --image string --platform string
func (m *myModule) example(image string, version string, user string, tarball *dagger.File, image1 string, platform string) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithPushTarball(tarball, image1, platform)
}
@function
def example(image: str, version: str, user: str, tarball: dagger.File, image1: str, platform: str) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_push_tarball(tarball, image1, platform)
	)
@func()
example(image: string, version: string, user: string, tarball: File, image1: string, platform: string): Crane {
	return dag
		.crane(image, version, user)
		.withPushTarball(tarball, image1, platform)
}

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@da1fc9b1eb454de426830a4c59eeb433c4c53e4a 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
platformString !""Specifies the platform
Example
dagger -m github.com/opopops/daggerverse/crane@da1fc9b1eb454de426830a4c59eeb433c4c53e4a call \
 --image string --version string --user string with-tag --image string --tag string --platform string
func (m *myModule) example(image string, version string, user string, image1 string, tag string, platform string) *dagger.Crane  {
	return dag.
			Crane(image, version, user).
			WithTag(image1, tag, platform)
}
@function
def example(image: str, version: str, user: str, image1: str, tag: str, platform: str) -> dagger.Crane:
	return (
		dag.crane(image, version, user)
		.with_tag(image1, tag, platform)
	)
@func()
example(image: string, version: string, user: string, image1: string, tag: string, platform: string): Crane {
	return dag
		.crane(image, version, user)
		.withTag(image1, tag, platform)
}