Dagger
Search

alpine-workspace

No long description provided.

Installation

dagger install github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b

Entrypoint

Return Type
AlpineWorkspace !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
 --source DIR_PATH
func (m *myModule) example(source *Directory) *AlpineWorkspace  {
	return dag.
			AlpineWorkspace(source)
}
@function
def example(source: dagger.Directory) -> dag.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 container
func (m *myModule) example(source *Directory) *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
NameTypeDefault ValueDescription
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 string2
func (m *myModule) example(source *Directory, packages []string) *AlpineWorkspace  {
	return dag.
			AlpineWorkspace(source).
			AddPackages(packages)
}
@function
def example(source: dagger.Directory, packages: List[str]) -> dag.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
NameTypeDefault ValueDescription
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 string2
func (m *myModule) example(source *Directory, args []string) *AlpineWorkspace  {
	return dag.
			AlpineWorkspace(source).
			WithExec(args)
}
@function
def example(source: dagger.Directory, args: List[str]) -> dag.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
NameTypeDefault ValueDescription
pathString !-Path to read the file at
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
 --source DIR_PATH read --path string
func (m *myModule) example(ctx context.Context, source *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
NameTypeDefault ValueDescription
pathString !-Path to write the file at
contentsString !-Contents to write
Example
dagger -m github.com/eunomie/local-agent/alpine-workspace@9e573759e7af3a212698993ace54b0d55c53134b call \
 --source DIR_PATH write --path string --contents string
func (m *myModule) example(source *Directory, path string, contents string) *AlpineWorkspace  {
	return dag.
			AlpineWorkspace(source).
			Write(path, contents)
}
@function
def example(source: dagger.Directory, path: str, contents: str) -> dag.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 tree
func (m *myModule) example(ctx context.Context, source *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()
}