Dagger
Search

distrobox

primarily for bootstrapping container images

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

Installation

dagger install github.com/scottames/daggerverse/distrobox@v0.0.1

Entrypoint

Return Type
Distrobox
Example
func (m *myModule) example() *Distrobox  {
	return dag.
			Distrobox()
}
@function
def example() -> dag.Distrobox:
	return (
		dag.distrobox()
	)
@func()
example(): Distrobox {
	return dag
		.distrobox()
}

Types

Distrobox 🔗

containerWithDistroboxClonedToTmp() 🔗

ContainerWithDistroboxClonedToTmp 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!
destinationString "/tmp"desired path inside the container to clone the distrobox project
Example
func (m *myModule) example() *Container  {
	return dag.
			Distrobox().
			ContainerWithDistroboxClonedToTmp()
}
@function
def example() -> dagger.Container:
	return (
		dag.distrobox()
		.container_with_distrobox_cloned_to_tmp()
	)
@func()
example(): Container {
	return dag
		.distrobox()
		.containerWithDistroboxClonedToTmp()
}

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
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
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 "/tmp"desired path inside the container to clone the distrobox project
Example
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
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)
}