Dagger
Search

melange

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/opopops/daggerverse/melange@e42ed524804a0735c029bd17b8e02969ba2da2ae

Entrypoint

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

Types

Melange 🔗

image() 🔗

Melange image

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

registryUsername() 🔗

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

registryPassword() 🔗

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

user() 🔗

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

build() 🔗

Build a package from a YAML configuration file

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
configFile !-Config file
sourceDirDirectory nullNo description provided
signingKeyFile nullNo description provided
archString nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/melange@e42ed524804a0735c029bd17b8e02969ba2da2ae call \
 --image string build --config file:path
func (m *myModule) example(image string, config *File) *Directory  {
	return dag.
			Melange(image).
			Build(config)
}
@function
def example(image: str, config: dagger.File) -> dagger.Directory:
	return (
		dag.melange(image)
		.build(config)
	)
@func()
example(image: string, config: File): Directory {
	return dag
		.melange(image)
		.build(config)
}

container() 🔗

Returns container

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

keygen() 🔗

Generate a key for package signing

Return Type
[File ! ] !
Arguments
NameTypeDefault ValueDescription
keySizeInteger !4096the size of the prime to calculate
Example
dagger -m github.com/opopops/daggerverse/melange@e42ed524804a0735c029bd17b8e02969ba2da2ae call \
 --image string keygen --key-size integer
func (m *myModule) example(image string, keySize int) []*File  {
	return dag.
			Melange(image).
			Keygen(keySize)
}
@function
def example(image: str, key_size: int) -> List[dagger.File]:
	return (
		dag.melange(image)
		.keygen(key_size)
	)
@func()
example(image: string, keySize: number): File[] {
	return dag
		.melange(image)
		.keygen(keySize)
}

withBuild() 🔗

Build a package from a YAML configuration file (for chaining)

Return Type
Melange !
Arguments
NameTypeDefault ValueDescription
configFile !-Config file
signingKeyFile nullNo description provided
archString nullNo description provided
Example
dagger -m github.com/opopops/daggerverse/melange@e42ed524804a0735c029bd17b8e02969ba2da2ae call \
 --image string with-build --config file:path
func (m *myModule) example(image string, config *File) *Melange  {
	return dag.
			Melange(image).
			WithBuild(config)
}
@function
def example(image: str, config: dagger.File) -> dag.Melange:
	return (
		dag.melange(image)
		.with_build(config)
	)
@func()
example(image: string, config: File): Melange {
	return dag
		.melange(image)
		.withBuild(config)
}

withKeygen() 🔗

Generate a key for package signing for chaining

Return Type
Melange !
Arguments
NameTypeDefault ValueDescription
keySizeInteger !4096the size of the prime to calculate
Example
dagger -m github.com/opopops/daggerverse/melange@e42ed524804a0735c029bd17b8e02969ba2da2ae call \
 --image string with-keygen --key-size integer
func (m *myModule) example(image string, keySize int) *Melange  {
	return dag.
			Melange(image).
			WithKeygen(keySize)
}
@function
def example(image: str, key_size: int) -> dag.Melange:
	return (
		dag.melange(image)
		.with_keygen(key_size)
	)
@func()
example(image: string, keySize: number): Melange {
	return dag
		.melange(image)
		.withKeygen(keySize)
}