melange
Use WithGeneratedSignKey or WithProvidedSignKey before Build().Installation
dagger install github.com/hampusctl/daggerverse/melange@91eb239e11ba32ca0db20b73979c74e014d993dcEntrypoint
Return Type
Melange !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | container to use for Apko operations. If not provided, creates a new one from repository:tag |
| apkoFile | File | - | apkoFile is a custom Apko image file to import instead of using repository:tag |
| repository | String ! | "cgr.dev/chainguard/melange" | repository is the container registry and image name for the Melange tool |
| tag | String ! | "latest" | tag specifies the version of the Melange tool to use |
Example
dagger -m github.com/hampusctl/daggerverse/melange@91eb239e11ba32ca0db20b73979c74e014d993dc call \
--repository string --tag stringfunc (m *MyModule) Example(repository string, tag string) *dagger.Melange {
return dag.
Melange(repository, tag)
}@function
def example(repository: str, tag: str) -> dagger.Melange:
return (
dag.melange(repository, tag)
)@func()
example(repository: string, tag: string): Melange {
return dag
.melange(repository, tag)
}Types
Melange 🔗
container() 🔗
Return Type
Container ! Example
dagger -m github.com/hampusctl/daggerverse/melange@91eb239e11ba32ca0db20b73979c74e014d993dc call \
--repository string --tag string containerfunc (m *MyModule) Example(repository string, tag string) *dagger.Container {
return dag.
Melange(repository, tag).
Container()
}@function
def example(repository: str, tag: str) -> dagger.Container:
return (
dag.melange(repository, tag)
.container()
)@func()
example(repository: string, tag: string): Container {
return dag
.melange(repository, tag)
.container()
}withGeneratedSignKey() 🔗
WithGeneratedSignKey generates a new signing key for the Melange container.
Return Type
Melange !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| bits | Integer ! | "4096" | bits is the number of bits to use for the key |
Example
dagger -m github.com/hampusctl/daggerverse/melange@91eb239e11ba32ca0db20b73979c74e014d993dc call \
--repository string --tag string with-generated-sign-key --bits integerfunc (m *MyModule) Example(repository string, tag string, bits int) *dagger.Melange {
return dag.
Melange(repository, tag).
WithGeneratedSignKey(bits)
}@function
def example(repository: str, tag: str, bits: int) -> dagger.Melange:
return (
dag.melange(repository, tag)
.with_generated_sign_key(bits)
)@func()
example(repository: string, tag: string, bits: number): Melange {
return dag
.melange(repository, tag)
.withGeneratedSignKey(bits)
}withProvidedSignKey() 🔗
WithProvidedSignKey sets the signing key for the Melange container.
Return Type
Melange !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| privateKey | Secret ! | - | privateKey is the private key to use for signing |
| publicKey | File ! | - | publicKey is the public key file to use for signing |
Example
dagger -m github.com/hampusctl/daggerverse/melange@91eb239e11ba32ca0db20b73979c74e014d993dc call \
--repository string --tag string with-provided-sign-key --private-key env:MYSECRET --public-key file:pathfunc (m *MyModule) Example(repository string, tag string, privateKey *dagger.Secret, publicKey *dagger.File) *dagger.Melange {
return dag.
Melange(repository, tag).
WithProvidedSignKey(privateKey, publicKey)
}@function
def example(repository: str, tag: str, private_key: dagger.Secret, public_key: dagger.File) -> dagger.Melange:
return (
dag.melange(repository, tag)
.with_provided_sign_key(private_key, public_key)
)@func()
example(repository: string, tag: string, privateKey: Secret, publicKey: File): Melange {
return dag
.melange(repository, tag)
.withProvidedSignKey(privateKey, publicKey)
}build() 🔗
Build builds APK packages from a Melange config. Call WithGeneratedSignKey or WithProvidedSignKey first.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| config | File ! | - | config is the Melange configuration file to use |
| extraArgs | [String ! ] | - | extraArgs are additional command-line arguments passed to 'melange' |
Example
dagger -m github.com/hampusctl/daggerverse/melange@91eb239e11ba32ca0db20b73979c74e014d993dc call \
--repository string --tag string build --config file:pathfunc (m *MyModule) Example(repository string, tag string, config *dagger.File) *dagger.Directory {
return dag.
Melange(repository, tag).
Build(config)
}@function
def example(repository: str, tag: str, config: dagger.File) -> dagger.Directory:
return (
dag.melange(repository, tag)
.build(config)
)@func()
example(repository: string, tag: string, config: File): Directory {
return dag
.melange(repository, tag)
.build(config)
}