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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | "cgr.dev/chainguard/wolfi-base:latest" | wolfi-base image |
version | String ! | "latest" | Crane version |
user | String ! | "65532" | Image user |
dockerConfig | File | null | Docker config file |
container | Container | null | No 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
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Source image |
target | String ! | - | Target image |
platform | String ! | "" | Specifies the platform |
jobs | Integer | null | The maximum number of concurrent copies |
allTags | Boolean ! | false | Copy all tags from SRC to DST |
noClobber | Boolean ! | false | Avoid 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
platform | String ! | "" | Specifies the platform |
fullRef | Boolean ! | false | Print the full image reference by digest |
tarball | String ! | "" | 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
platform | String ! | "" | 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
Name | Type | Default Value | Description |
---|---|---|---|
path | Directory ! | - | OCI layout dir |
image | String ! | - | Image tag |
index | Boolean ! | false | Push a collection of images as a single index |
platform | String ! | "" | 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
Name | Type | Default Value | Description |
---|---|---|---|
tarball | File ! | - | Image tarball |
image | String ! | - | Image tag |
platform | String ! | "" | 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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
tag | String ! | - | New tag |
platform | String ! | "" | 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
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Source image |
target | String ! | - | Target image |
platform | String ! | "" | Specifies the platform |
jobs | Integer | null | No description provided |
allTags | Boolean ! | false | Copy all tags from SRC to DST |
noClobber | Boolean ! | false | Avoid 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
Name | Type | Default Value | Description |
---|---|---|---|
path | Directory ! | - | OCI layout dir |
image | String ! | - | Image tag |
index | Boolean ! | false | Push a collection of images as a single index |
platform | String ! | "" | 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
Name | Type | Default Value | Description |
---|---|---|---|
tarball | File ! | - | Image tarball |
image | String ! | - | Image tag |
platform | String ! | "" | 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
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | Registry username |
secret | Secret ! | - | Registry password |
address | String ! | "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
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image |
tag | String ! | - | New tag |
platform | String ! | "" | 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)
}