distrobox
primarily for bootstrapping container imageshttps://github.com/89luca89/distrobox
Installation
dagger install github.com/scottames/daggerverse/distrobox@v0.0.6Entrypoint
Return Type
Distrobox Example
dagger -m github.com/scottames/daggerverse/distrobox@0d7b7de707fe14a147f43e3528b2d941dd5547e0 call \
func (m *MyModule) Example() *dagger.Distrobox {
return dag.
Distrobox()
}@function
def example() -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| from | String | "cgr.dev/chainguard/git:latest" | container to use to clone the distrobox project note: `git` is expected to be the entrypoint! |
| path | String | - | desired path inside the container to clone the distrobox project |
Example
dagger -m github.com/scottames/daggerverse/distrobox@0d7b7de707fe14a147f43e3528b2d941dd5547e0 call \
container-with-distrobox-clonedfunc (m *MyModule) Example() *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| from | String | "cgr.dev/chainguard/curl:latest" | container to use to execute curl note: `curl` is expected to be the entrypoint! |
| url | String ! | - | url to grab the content from |
| destination | String | "/tmp" | path to place the file at |
| name | String | "" | name the file should be saved as |
Example
dagger -m github.com/scottames/daggerverse/distrobox@0d7b7de707fe14a147f43e3528b2d941dd5547e0 call \
container-with-file-from-url --url stringfunc (m *MyModule) Example(url string) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| from | String | "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! |
| arch | String | "x86_64" | cpu architecture |
Example
dagger -m github.com/scottames/daggerverse/distrobox@0d7b7de707fe14a147f43e3528b2d941dd5547e0 call \
host-spawn-filefunc (m *MyModule) Example() *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| from | String | "cgr.dev/chainguard/git:latest" | container to use to clone the distrobox project note: `git` is expected to be the entrypoint! |
| path | String | - | desired path inside the container to clone the distrobox project |
Example
dagger -m github.com/scottames/daggerverse/distrobox@0d7b7de707fe14a147f43e3528b2d941dd5547e0 call \
host-exec-filefunc (m *MyModule) Example() *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | file to match string in |
| regex | String ! | - | regex to match against |
Example
dagger -m github.com/scottames/daggerverse/distrobox@0d7b7de707fe14a147f43e3528b2d941dd5547e0 call \
find-string-submatch-in-file --file file:path --regex stringfunc (m *MyModule) Example(ctx context.Context, file *dagger.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)
}