docker
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/wouter2397/dagger-modules/docker@0c280408f00c68beabccc31d2d2f3cedbb91014eEntrypoint
Return Type
Docker Example
dagger -m github.com/wouter2397/dagger-modules/docker@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
func (m *MyModule) Example() *dagger.Docker {
return dag.
Docker()
}@function
def example() -> dagger.Docker:
return (
dag.docker()
)@func()
example(): Docker {
return dag
.docker()
}Types
Docker 🔗
dockerBuild() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| dir | Directory ! | - | No description provided |
| file | String ! | - | No description provided |
Example
dagger -m github.com/wouter2397/dagger-modules/docker@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
docker-build --dir DIR_PATH --file stringfunc (m *MyModule) Example(dir *dagger.Directory, file string) *dagger.Container {
return dag.
Docker().
DockerBuild(dir, file)
}@function
def example(dir: dagger.Directory, file: str) -> dagger.Container:
return (
dag.docker()
.docker_build(dir, file)
)@func()
example(dir: Directory, file: string): Container {
return dag
.docker()
.dockerBuild(dir, file)
}pushImage() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | No description provided |
| address | String ! | - | No description provided |
Example
dagger -m github.com/wouter2397/dagger-modules/docker@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
push-image --container IMAGE:TAG --address stringfunc (m *MyModule) Example(ctx context.Context, container *dagger.Container, address string) string {
return dag.
Docker().
PushImage(ctx, container, address)
}@function
async def example(container: dagger.Container, address: str) -> str:
return await (
dag.docker()
.push_image(container, address)
)@func()
async example(container: Container, address: string): Promise<string> {
return dag
.docker()
.pushImage(container, address)
}buildAndPush() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| dir | Directory ! | - | No description provided |
| file | String ! | - | No description provided |
| address | String ! | - | No description provided |
Example
dagger -m github.com/wouter2397/dagger-modules/docker@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
build-and-push --dir DIR_PATH --file string --address stringfunc (m *MyModule) Example(ctx context.Context, dir *dagger.Directory, file string, address string) string {
return dag.
Docker().
BuildAndPush(ctx, dir, file, address)
}@function
async def example(dir: dagger.Directory, file: str, address: str) -> str:
return await (
dag.docker()
.build_and_push(dir, file, address)
)@func()
async example(dir: Directory, file: string, address: string): Promise<string> {
return dag
.docker()
.buildAndPush(dir, file, address)
}