crane
Crane is a tool for managing container images
Installation
dagger install github.com/opopops/daggerverse/crane@v1.0.0
Entrypoint
Return Type
Crane !
Arguments
Name | Type | Description |
---|---|---|
image | String ! | Crane image |
registryUsername | String | No description provided |
registryPassword | Secret | No description provided |
user | String | No description provided |
container | Container | No description provided |
Example
dagger -m github.com/opopops/daggerverse/crane@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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@c472c584d679da19cab74e8a89314d89aa5c988c 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() 🔗
Tag remote image without downloading it.
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@c472c584d679da19cab74e8a89314d89aa5c988c 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)
}
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@c472c584d679da19cab74e8a89314d89aa5c988c 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)
}
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@c472c584d679da19cab74e8a89314d89aa5c988c 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)
}
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@c472c584d679da19cab74e8a89314d89aa5c988c 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)
}