Dagger
Search

distrobox

primarily for bootstrapping container images

https://github.com/89luca89/distrobox

Installation

dagger install github.com/scottames/daggerverse/distrobox@8359122a7b90f2c8c6f3165570fdcbec6e923023

Entrypoint

Return Type
Distrobox
Example
dagger -m github.com/scottames/daggerverse/distrobox@8359122a7b90f2c8c6f3165570fdcbec6e923023 call \
func (m *myModule) example() *Distrobox  {
	return dag.
			Distrobox()
}
@function
def example() -> dag.Distrobox:
	return (
		dag.distrobox()
	)
@func()
example(): Distrobox {
	return dag
		.distrobox()
}

Types

Distrobox 🔗

containerWithDistroboxCloned() 🔗

ContainerWithDistroboxCloned returns a Container with the Distrobox project cloned inside

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
fromString "cgr.dev/chainguard/git:latest"container to use to clone the distrobox project note: `git` is expected to be the entrypoint!
pathString -desired path inside the container to clone the distrobox project
Example
dagger -m github.com/scottames/daggerverse/distrobox@8359122a7b90f2c8c6f3165570fdcbec6e923023 call \
 container-with-distrobox-cloned
func (m *myModule) example() *Container  {
	return dag.
			Distrobox().
			ContainerWithDistroboxCloned()
}
@function
def example() -> dagger.Container:
	return (
		dag.distrobox()
		.container_with_distrobox_cloned()
	)
@func()
example(): Container {
	return dag
		.distrobox()
		.containerWithDistroboxCloned()
}

containerWithFileFromUrl() 🔗

ContainerWithFileFromUrl will exec curl to grab url content and place it at the given (or default) path

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
fromString "cgr.dev/chainguard/curl:latest"container to use to execute curl note: `curl` is expected to be the entrypoint!
urlString !-url to grab the content from
destinationString "/tmp"path to place the file at
nameString ""name the file should be saved as
Example
dagger -m github.com/scottames/daggerverse/distrobox@8359122a7b90f2c8c6f3165570fdcbec6e923023 call \
 container-with-file-from-url --url string
func (m *myModule) example(url string) *Container  {
	return dag.
			Distrobox().
			ContainerWithFileFromUrl(url)
}
@function
def example(url: str) -> dagger.Container:
	return (
		dag.distrobox()
		.container_with_file_from_url(url)
	)
@func()
example(url: string): Container {
	return dag
		.distrobox()
		.containerWithFileFromUrl(url)
}

hostSpawnFile() 🔗

ContainerWithHostExec will grab the appropriate version of the host-spawn binary from GitHub releases as it associates with the downloaded distrobox release

Return Type
File !
Arguments
NameTypeDefault ValueDescription
fromString "cgr.dev/chainguard/curl:latest"container to use to execute curl to retrieve the host-spawn binary note: `curl` is expected to be the entrypoint!
archString "x86_64"cpu architecture
Example
dagger -m github.com/scottames/daggerverse/distrobox@8359122a7b90f2c8c6f3165570fdcbec6e923023 call \
 host-spawn-file
func (m *myModule) example() *File  {
	return dag.
			Distrobox().
			HostSpawnFile()
}
@function
def example() -> dagger.File:
	return (
		dag.distrobox()
		.host_spawn_file()
	)
@func()
example(): File {
	return dag
		.distrobox()
		.hostSpawnFile()
}

hostExecFile() 🔗

HostExecFile returns the distrobox-host-exec File

Return Type
File !
Arguments
NameTypeDefault ValueDescription
fromString "cgr.dev/chainguard/git:latest"container to use to clone the distrobox project note: `git` is expected to be the entrypoint!
pathString -desired path inside the container to clone the distrobox project
Example
dagger -m github.com/scottames/daggerverse/distrobox@8359122a7b90f2c8c6f3165570fdcbec6e923023 call \
 host-exec-file
func (m *myModule) example() *File  {
	return dag.
			Distrobox().
			HostExecFile()
}
@function
def example() -> dagger.File:
	return (
		dag.distrobox()
		.host_exec_file()
	)
@func()
example(): File {
	return dag
		.distrobox()
		.hostExecFile()
}

findStringSubmatchInFile() 🔗

FindStringSubmatchInFile returns the string matchings the given regex pattern in the provided File

Return Type
String !
Arguments
NameTypeDefault ValueDescription
fileFile !-file to match string in
regexString !-regex to match against
Example
dagger -m github.com/scottames/daggerverse/distrobox@8359122a7b90f2c8c6f3165570fdcbec6e923023 call \
 find-string-submatch-in-file --file file:path --regex string
func (m *myModule) example(ctx context.Context, file *File, regex string) string  {
	return dag.
			Distrobox().
			FindStringSubmatchInFile(ctx, file, regex)
}
@function
async def example(file: dagger.File, regex: str) -> str:
	return await (
		dag.distrobox()
		.find_string_submatch_in_file(file, regex)
	)
@func()
async example(file: File, regex: string): Promise<string> {
	return dag
		.distrobox()
		.findStringSubmatchInFile(file, regex)
}