containers
A Dagger module to interact with containers
Installation
dagger install github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf
Entrypoint
Return Type
Containers
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
func (m *myModule) example() *Containers {
return dag.
Containers()
}
@function
def example() -> dag.Containers:
return (
dag.containers()
)
@func()
example(): Containers {
return dag
.containers()
}
Types
Containers 🔗
A Dagger module to build, ship and run docker-compatible (OCI) containers
from() 🔗
Pull a container from a registry
Return Type
Ctr !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
address | String ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
from --address string
func (m *myModule) example(address string) *ContainersCtr {
return dag.
Containers().
From(address)
}
@function
def example(address: str) -> dag.ContainersCtr:
return (
dag.containers()
.from_(address)
)
@func()
example(address: string): ContainersCtr {
return dag
.containers()
.from(address)
}
scratch() 🔗
Initialize an empty container
Return Type
Ctr !
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch
func (m *myModule) example() *ContainersCtr {
return dag.
Containers().
Scratch()
}
@function
def example() -> dag.ContainersCtr:
return (
dag.containers()
.scratch()
)
@func()
example(): ContainersCtr {
return dag
.containers()
.scratch()
}
Ctr 🔗
A docker-compatible container
state() 🔗
Return Type
Container !
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
state
func (m *myModule) example() *Container {
return dag.
Containers().
Scratch().
State()
}
@function
def example() -> dagger.Container:
return (
dag.containers()
.scratch()
.state()
)
@func()
example(): Container {
return dag
.containers()
.scratch()
.state()
}
withFile() 🔗
Return Type
Ctr !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
path | String ! | - | No description provided |
file | File ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
with-file --path string --file file:path
func (m *myModule) example(path string, file *File) *ContainersCtr {
return dag.
Containers().
Scratch().
WithFile(path, file)
}
@function
def example(path: str, file: dagger.File) -> dag.ContainersCtr:
return (
dag.containers()
.scratch()
.with_file(path, file)
)
@func()
example(path: string, file: File): ContainersCtr {
return dag
.containers()
.scratch()
.withFile(path, file)
}
withEntrypoint() 🔗
Return Type
Ctr !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
with-entrypoint --args string1 --args string2
func (m *myModule) example(args []string) *ContainersCtr {
return dag.
Containers().
Scratch().
WithEntrypoint(args)
}
@function
def example(args: List[str]) -> dag.ContainersCtr:
return (
dag.containers()
.scratch()
.with_entrypoint(args)
)
@func()
example(args: string[]): ContainersCtr {
return dag
.containers()
.scratch()
.withEntrypoint(args)
}
withoutEntrypoint() 🔗
Return Type
Ctr !
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
without-entrypoint
func (m *myModule) example() *ContainersCtr {
return dag.
Containers().
Scratch().
WithoutEntrypoint()
}
@function
def example() -> dag.ContainersCtr:
return (
dag.containers()
.scratch()
.without_entrypoint()
)
@func()
example(): ContainersCtr {
return dag
.containers()
.scratch()
.withoutEntrypoint()
}
withoutDefaultArgs() 🔗
Return Type
Ctr !
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
without-default-args
func (m *myModule) example() *ContainersCtr {
return dag.
Containers().
Scratch().
WithoutDefaultArgs()
}
@function
def example() -> dag.ContainersCtr:
return (
dag.containers()
.scratch()
.without_default_args()
)
@func()
example(): ContainersCtr {
return dag
.containers()
.scratch()
.withoutDefaultArgs()
}
withDefaultArgs() 🔗
Return Type
Ctr !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
with-default-args --args string1 --args string2
func (m *myModule) example(args []string) *ContainersCtr {
return dag.
Containers().
Scratch().
WithDefaultArgs(args)
}
@function
def example(args: List[str]) -> dag.ContainersCtr:
return (
dag.containers()
.scratch()
.with_default_args(args)
)
@func()
example(args: string[]): ContainersCtr {
return dag
.containers()
.scratch()
.withDefaultArgs(args)
}
stdout() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
stdout
func (m *myModule) example(ctx context.Context) string {
return dag.
Containers().
Scratch().
Stdout(ctx)
}
@function
async def example() -> str:
return await (
dag.containers()
.scratch()
.stdout()
)
@func()
async example(): Promise<string> {
return dag
.containers()
.scratch()
.stdout()
}
withExec() 🔗
Return Type
Ctr !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/containers@f678bfe29024559abec0ac77fbbd558bc8402cdf call \
scratch \
with-exec --args string1 --args string2
func (m *myModule) example(args []string) *ContainersCtr {
return dag.
Containers().
Scratch().
WithExec(args)
}
@function
def example(args: List[str]) -> dag.ContainersCtr:
return (
dag.containers()
.scratch()
.with_exec(args)
)
@func()
example(args: string[]): ContainersCtr {
return dag
.containers()
.scratch()
.withExec(args)
}