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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | "cgr.dev/chainguard/crane:latest-dev" | Crane image |
registryUsername | String | null | No description provided |
registryPassword | Secret | null | No description provided |
user | String | "65532" | No description provided |
container | Container | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | Registry username |
secret | Secret ! | - | Registry password |
address | String | "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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
platform | String | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
platform | String | null | No description provided |
fullRef | Boolean | false | No description provided |
tarball | String | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Source image |
target | String ! | - | Target image |
platform | String | null | No description provided |
jobs | Integer | null | No description provided |
allTags | Boolean | false | No description provided |
noClobber | Boolean | false | No 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
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Source image |
target | String ! | - | Target image |
platform | String | null | No description provided |
jobs | Integer | null | No description provided |
allTags | Boolean | false | No description provided |
noClobber | Boolean | false | No 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
tag | String ! | - | New tag |
platform | String | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
tag | String ! | - | New tag |
platform | String | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
path | Directory ! | - | OCI layout dir |
image | String ! | - | Image tag |
index | Boolean | null | No description provided |
platform | String | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
path | Directory ! | - | OCI layout dir |
image | String ! | - | Image tag |
index | Boolean | null | No description provided |
platform | String | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
tarball | File ! | - | Image tarball |
image | String ! | - | Image tag |
platform | String | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
tarball | File ! | - | Image tarball |
image | String ! | - | Image tag |
platform | String | null | No 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)
}