alpine-workspace
No long description provided.
Installation
dagger install github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134bEntrypoint
Return Type
AlpineWorkspace !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
--source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.AlpineWorkspace {
return dag.
AlpineWorkspace(source)
}@function
def example(source: dagger.Directory) -> dagger.AlpineWorkspace:
return (
dag.alpine_workspace(source)
)@func()
example(source: Directory): AlpineWorkspace {
return dag
.alpineWorkspace(source)
}Types
AlpineWorkspace 🔗
container() 🔗
Return Type
Container ! Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
--source DIR_PATH containerfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
AlpineWorkspace(source).
Container()
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.alpine_workspace(source)
.container()
)@func()
example(source: Directory): Container {
return dag
.alpineWorkspace(source)
.container()
}addPackages() 🔗
Install system packages using apk to the alpine workspace.
Use this to install system packages like python3, git, etc.
You cannot install project dependencies with this tool.
Return Type
AlpineWorkspace !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| packages | [String ! ] ! | - | List of alpine packages to install |
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
--source DIR_PATH add-packages --packages string1 --packages string2func (m *MyModule) Example(source *dagger.Directory, packages []string) *dagger.AlpineWorkspace {
return dag.
AlpineWorkspace(source).
AddPackages(packages)
}@function
def example(source: dagger.Directory, packages: List[str]) -> dagger.AlpineWorkspace:
return (
dag.alpine_workspace(source)
.add_packages(packages)
)@func()
example(source: Directory, packages: string[]): AlpineWorkspace {
return dag
.alpineWorkspace(source)
.addPackages(packages)
}withExec() 🔗
Run any command inside the alpine workspace
Use this to install project dependencies, run tests, etc.
Return Type
AlpineWorkspace !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [String ! ] ! | - | Command to run |
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
--source DIR_PATH with-exec --args string1 --args string2func (m *MyModule) Example(source *dagger.Directory, args []string) *dagger.AlpineWorkspace {
return dag.
AlpineWorkspace(source).
WithExec(args)
}@function
def example(source: dagger.Directory, args: List[str]) -> dagger.AlpineWorkspace:
return (
dag.alpine_workspace(source)
.with_exec(args)
)@func()
example(source: Directory, args: string[]): AlpineWorkspace {
return dag
.alpineWorkspace(source)
.withExec(args)
}read() 🔗
Read a file at a given path and returns its content.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Path to read the file at |
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
--source DIR_PATH read --path stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string) string {
return dag.
AlpineWorkspace(source).
Read(ctx, path)
}@function
async def example(source: dagger.Directory, path: str) -> str:
return await (
dag.alpine_workspace(source)
.read(path)
)@func()
async example(source: Directory, path: string): Promise<string> {
return dag
.alpineWorkspace(source)
.read(path)
}write() 🔗
Write a file at a given path with the provided content.
Return Type
AlpineWorkspace !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Path to write the file at |
| contents | String ! | - | Contents to write |
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
--source DIR_PATH write --path string --contents stringfunc (m *MyModule) Example(source *dagger.Directory, path string, contents string) *dagger.AlpineWorkspace {
return dag.
AlpineWorkspace(source).
Write(path, contents)
}@function
def example(source: dagger.Directory, path: str, contents: str) -> dagger.AlpineWorkspace:
return (
dag.alpine_workspace(source)
.write(path, contents)
)@func()
example(source: Directory, path: string, contents: string): AlpineWorkspace {
return dag
.alpineWorkspace(source)
.write(path, contents)
}tree() 🔗
List the available files in tree format
Return Type
String ! Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
--source DIR_PATH treefunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string {
return dag.
AlpineWorkspace(source).
Tree(ctx)
}@function
async def example(source: dagger.Directory) -> str:
return await (
dag.alpine_workspace(source)
.tree()
)@func()
async example(source: Directory): Promise<string> {
return dag
.alpineWorkspace(source)
.tree()
}