Dagger
Search

docker

This module has been generated via dagger init and serves as a reference to
basic 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@7c259323bd0bc33da2815e567871b9029a52cb7e

Entrypoint

Return Type
Docker
Example
dagger -m github.com/wouter2397/dagger-modules/docker@7c259323bd0bc33da2815e567871b9029a52cb7e 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
NameTypeDefault ValueDescription
dirDirectory !-No description provided
fileString !-No description provided
Example
dagger -m github.com/wouter2397/dagger-modules/docker@7c259323bd0bc33da2815e567871b9029a52cb7e call \
 docker-build --dir DIR_PATH --file string
func (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
NameTypeDefault ValueDescription
containerContainer !-No description provided
addressString !-No description provided
Example
dagger -m github.com/wouter2397/dagger-modules/docker@7c259323bd0bc33da2815e567871b9029a52cb7e call \
 push-image --container IMAGE:TAG --address string
func (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
NameTypeDefault ValueDescription
dirDirectory !-No description provided
fileString !-No description provided
addressString !-No description provided
Example
dagger -m github.com/wouter2397/dagger-modules/docker@7c259323bd0bc33da2815e567871b9029a52cb7e call \
 build-and-push --dir DIR_PATH --file string --address string
func (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)
}