Dagger
Search

docker

Dagger-native Docker and OCI image helpers.

Installation

dagger install github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47

Entrypoint

Return Type
Build !
Arguments
NameTypeDefault ValueDescription
containerContainer !-No description provided
contextPathString !-No description provided
dockerfilePathString !-No description provided
targetString -No description provided
buildArgs[String ! ] !-No description provided
Example
Function Build.Constructor is not accessible from the docker module
Function Build.Constructor is not accessible from the docker module
Function Build.Constructor is not accessible from the docker module
Function Build.Constructor is not accessible from the docker module

Entrypoint

Return Type
Image !
Arguments
NameTypeDefault ValueDescription
imageRefString !-No description provided
Example
Function Image.Constructor is not accessible from the docker module
Function Image.Constructor is not accessible from the docker module
Function Image.Constructor is not accessible from the docker module
Function Image.Constructor is not accessible from the docker module

Entrypoint

Return Type
Docker !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 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

Build 🔗

Container image build result.

container() 🔗

Return the built container.

Return Type
Container !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 build --context-path string --dockerfile-path string \
 container
func (m *MyModule) Example(contextPath string, dockerfilePath string) *dagger.Container  {
	return dag.
			Docker().
			Build(contextPath, dockerfilePath).
			Container()
}
@function
def example(context_path: str, dockerfile_path: str) -> dagger.Container:
	return (
		dag.docker()
		.build(context_path, dockerfile_path)
		.container()
	)
@func()
example(contextPath: string, dockerfilePath: string): Container {
	return dag
		.docker()
		.build(contextPath, dockerfilePath)
		.container()
}

contextPath() 🔗

Return the build context path.

Return Type
String !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 build --context-path string --dockerfile-path string \
 context-path
func (m *MyModule) Example(ctx context.Context, contextPath string, dockerfilePath string) string  {
	return dag.
			Docker().
			Build(contextPath, dockerfilePath).
			ContextPath(ctx)
}
@function
async def example(context_path: str, dockerfile_path: str) -> str:
	return await (
		dag.docker()
		.build(context_path, dockerfile_path)
		.context_path()
	)
@func()
async example(contextPath: string, dockerfilePath: string): Promise<string> {
	return dag
		.docker()
		.build(contextPath, dockerfilePath)
		.contextPath()
}

dockerfilePath() 🔗

Return the Dockerfile path.

Return Type
String !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 build --context-path string --dockerfile-path string \
 dockerfile-path
func (m *MyModule) Example(ctx context.Context, contextPath string, dockerfilePath string) string  {
	return dag.
			Docker().
			Build(contextPath, dockerfilePath).
			DockerfilePath(ctx)
}
@function
async def example(context_path: str, dockerfile_path: str) -> str:
	return await (
		dag.docker()
		.build(context_path, dockerfile_path)
		.dockerfile_path()
	)
@func()
async example(contextPath: string, dockerfilePath: string): Promise<string> {
	return dag
		.docker()
		.build(contextPath, dockerfilePath)
		.dockerfilePath()
}

target() 🔗

Return the build target, if configured.

Return Type
String !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 build --context-path string --dockerfile-path string \
 target
func (m *MyModule) Example(ctx context.Context, contextPath string, dockerfilePath string) string  {
	return dag.
			Docker().
			Build(contextPath, dockerfilePath).
			Target(ctx)
}
@function
async def example(context_path: str, dockerfile_path: str) -> str:
	return await (
		dag.docker()
		.build(context_path, dockerfile_path)
		.target()
	)
@func()
async example(contextPath: string, dockerfilePath: string): Promise<string> {
	return dag
		.docker()
		.build(contextPath, dockerfilePath)
		.target()
}

buildArgs() 🔗

Return configured build arguments.

Return Type
[String ! ] !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 build --context-path string --dockerfile-path string \
 build-args
func (m *MyModule) Example(ctx context.Context, contextPath string, dockerfilePath string) []string  {
	return dag.
			Docker().
			Build(contextPath, dockerfilePath).
			BuildArgs(ctx)
}
@function
async def example(context_path: str, dockerfile_path: str) -> List[str]:
	return await (
		dag.docker()
		.build(context_path, dockerfile_path)
		.build_args()
	)
@func()
async example(contextPath: string, dockerfilePath: string): Promise<string[]> {
	return dag
		.docker()
		.build(contextPath, dockerfilePath)
		.buildArgs()
}

Image 🔗

Published image result.

imageRef() 🔗

Return the published image reference.

Return Type
String !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 image --image-ref string \
 image-ref
func (m *MyModule) Example(ctx context.Context, imageRef string) string  {
	return dag.
			Docker().
			Image(imageRef).
			ImageRef(ctx)
}
@function
async def example(image_ref: str) -> str:
	return await (
		dag.docker()
		.image(image_ref)
		.image_ref()
	)
@func()
async example(imageRef: string): Promise<string> {
	return dag
		.docker()
		.image(imageRef)
		.imageRef()
}

Docker 🔗

Docker module entrypoint.

module() 🔗

Return the module name.

Return Type
String !
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 module
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Docker().
			Module(ctx)
}
@function
async def example() -> str:
	return await (
		dag.docker()
		.module()
	)
@func()
async example(): Promise<string> {
	return dag
		.docker()
		.module()
}

build() 🔗

Create a Docker build result.

Return Type
Build !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -Source directory containing the Docker build context
contextPathString !"."Build context path relative to source
dockerfilePathString !"Dockerfile"Dockerfile path relative to context
targetString nullOptional Docker build target
buildArgs[String ! ] nullOptional build arguments in KEY=VALUE form
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 build --context-path string --dockerfile-path string
func (m *MyModule) Example(contextPath string, dockerfilePath string) *dagger.DockerBuild  {
	return dag.
			Docker().
			Build(contextPath, dockerfilePath)
}
@function
def example(context_path: str, dockerfile_path: str) -> dagger.DockerBuild:
	return (
		dag.docker()
		.build(context_path, dockerfile_path)
	)
@func()
example(contextPath: string, dockerfilePath: string): DockerBuild {
	return dag
		.docker()
		.build(contextPath, dockerfilePath)
}

image() 🔗

Create a Docker image result.

Return Type
Image !
Arguments
NameTypeDefault ValueDescription
imageRefString !-OCI image reference
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
 image --image-ref string
func (m *MyModule) Example(imageRef string) *dagger.DockerImage  {
	return dag.
			Docker().
			Image(imageRef)
}
@function
def example(image_ref: str) -> dagger.DockerImage:
	return (
		dag.docker()
		.image(image_ref)
	)
@func()
example(imageRef: string): DockerImage {
	return dag
		.docker()
		.image(imageRef)
}