Dagger
Search

crane

Crane is a tool for managing container images

Installation

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

Entrypoint

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
imageString !"cgr.dev/chainguard/crane:latest-dev"Crane image
registryUsernameString nullNo description provided
registryPasswordSecret nullNo description provided
userString "65532"No description provided
containerContainer nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string
func (m *myModule) example(image string) *Crane  {
	return dag.
			Crane(image)
}
@function
def example(image: str, ) -> dag.Crane:
	return (
		dag.crane(image)
	)
@func()
example(image: string, ): Crane {
	return dag
		.crane(image)
}

Types

Crane 🔗

Crane module

image() 🔗

Crane image

Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string image
func (m *myModule) example(ctx context.Context, image string) string  {
	return dag.
			Crane(image).
			Image(ctx)
}
@function
async def example(image: str, ) -> str:
	return await (
		dag.crane(image)
		.image()
	)
@func()
async example(image: string, ): Promise<string> {
	return dag
		.crane(image)
		.image()
}

registryUsername() 🔗

Return Type
String 
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string registry-username
func (m *myModule) example(ctx context.Context, image string) string  {
	return dag.
			Crane(image).
			RegistryUsername(ctx)
}
@function
async def example(image: str, ) -> str:
	return await (
		dag.crane(image)
		.registry_username()
	)
@func()
async example(image: string, ): Promise<string> {
	return dag
		.crane(image)
		.registryUsername()
}

registryPassword() 🔗

Return Type
Secret 
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string registry-password
func (m *myModule) example(image string) *Secret  {
	return dag.
			Crane(image).
			RegistryPassword()
}
@function
def example(image: str, ) -> dagger.Secret:
	return (
		dag.crane(image)
		.registry_password()
	)
@func()
example(image: string, ): Secret {
	return dag
		.crane(image)
		.registryPassword()
}

user() 🔗

Return Type
String 
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string user
func (m *myModule) example(ctx context.Context, image string) string  {
	return dag.
			Crane(image).
			User(ctx)
}
@function
async def example(image: str, ) -> str:
	return await (
		dag.crane(image)
		.user()
	)
@func()
async example(image: string, ): Promise<string> {
	return dag
		.crane(image)
		.user()
}

container() 🔗

Returns container

Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string container
func (m *myModule) example(image string) *Container  {
	return dag.
			Crane(image).
			Container()
}
@function
def example(image: str, ) -> dagger.Container:
	return (
		dag.crane(image)
		.container()
	)
@func()
example(image: string, ): Container {
	return dag
		.crane(image)
		.container()
}

withRegistryAuth() 🔗

Authenticate with registry

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
usernameString !-Registry username
secretSecret !-Registry password
addressString "docker.io"No description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string with-registry-auth --username string --secret env:MYSECRET
func (m *myModule) example(image string, username string, secret *Secret) *Crane  {
	return dag.
			Crane(image).
			WithRegistryAuth(username, secret)
}
@function
def example(image: str, username: str, secret: dagger.Secret) -> dag.Crane:
	return (
		dag.crane(image)
		.with_registry_auth(username, secret)
	)
@func()
example(image: string, username: string, secret: Secret): Crane {
	return dag
		.crane(image)
		.withRegistryAuth(username, secret)
}

manifest() 🔗

Get the manifest of an image

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

digest() 🔗

Tag remote image without downloading it.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-Image
platformString nullNo description provided
fullRefBoolean falseNo description provided
tarballString nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string digest --image string
func (m *myModule) example(ctx context.Context, image string, image1 string) string  {
	return dag.
			Crane(image).
			Digest(ctx, image1)
}
@function
async def example(image: str, image1: str) -> str:
	return await (
		dag.crane(image)
		.digest(image1)
	)
@func()
async example(image: string, image1: string): Promise<string> {
	return dag
		.crane(image)
		.digest(image1)
}

copy() 🔗

Copy images.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceString !-Source image
targetString !-Target image
platformString nullNo description provided
jobsInteger nullNo description provided
allTagsBoolean falseNo description provided
noClobberBoolean falseNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string copy --source string --target string
func (m *myModule) example(ctx context.Context, image string, source string, target string) string  {
	return dag.
			Crane(image).
			Copy(ctx, source, target)
}
@function
async def example(image: str, source: str, target: str) -> str:
	return await (
		dag.crane(image)
		.copy(source, target)
	)
@func()
async example(image: string, source: string, target: string): Promise<string> {
	return dag
		.crane(image)
		.copy(source, target)
}

withCopy() 🔗

Copy images (For chaining).

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
sourceString !-Source image
targetString !-Target image
platformString nullNo description provided
jobsInteger nullNo description provided
allTagsBoolean falseNo description provided
noClobberBoolean falseNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string with-copy --source string --target string
func (m *myModule) example(image string, source string, target string) *Crane  {
	return dag.
			Crane(image).
			WithCopy(source, target)
}
@function
def example(image: str, source: str, target: str) -> dag.Crane:
	return (
		dag.crane(image)
		.with_copy(source, target)
	)
@func()
example(image: string, source: string, target: string): Crane {
	return dag
		.crane(image)
		.withCopy(source, target)
}

tag() 🔗

Tag remote image without downloading it.

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

withTag() 🔗

Tag remote image without downloading it (For chaining).

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
imageString !-Image
tagString !-New tag
platformString nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string with-tag --image string --tag string
func (m *myModule) example(image string, image1 string, tag string) *Crane  {
	return dag.
			Crane(image).
			WithTag(image1, tag)
}
@function
def example(image: str, image1: str, tag: str) -> dag.Crane:
	return (
		dag.crane(image)
		.with_tag(image1, tag)
	)
@func()
example(image: string, image1: string, tag: string): Crane {
	return dag
		.crane(image)
		.withTag(image1, tag)
}

push() 🔗

Push image from OCI layout dir

Return Type
String !
Arguments
NameTypeDefault ValueDescription
pathDirectory !-OCI layout dir
imageString !-Image tag
indexBoolean nullNo description provided
platformString nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string push --path DIR_PATH --image string
func (m *myModule) example(ctx context.Context, image string, path *Directory, image1 string) string  {
	return dag.
			Crane(image).
			Push(ctx, path, image1)
}
@function
async def example(image: str, path: dagger.Directory, image1: str) -> str:
	return await (
		dag.crane(image)
		.push(path, image1)
	)
@func()
async example(image: string, path: Directory, image1: string): Promise<string> {
	return dag
		.crane(image)
		.push(path, image1)
}

withPush() 🔗

Push image from OCI layout dir (For chaining)

Return Type
Crane !
Arguments
NameTypeDefault ValueDescription
pathDirectory !-OCI layout dir
imageString !-Image tag
indexBoolean nullNo description provided
platformString nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/crane@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
 --image string with-push --path DIR_PATH --image string
func (m *myModule) example(image string, path *Directory, image1 string) *Crane  {
	return dag.
			Crane(image).
			WithPush(path, image1)
}
@function
def example(image: str, path: dagger.Directory, image1: str) -> dag.Crane:
	return (
		dag.crane(image)
		.with_push(path, image1)
	)
@func()
example(image: string, path: Directory, image1: string): Crane {
	return dag
		.crane(image)
		.withPush(path, image1)
}

pushTarball() 🔗

Push image from tarball

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

withPushTarball() 🔗

Push image from tarball (For chaining)

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