docker
Dagger-native Docker and OCI image helpers.
Installation
dagger install github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47Entrypoint
Return Type
Build !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container ! | - | No description provided |
| contextPath | String ! | - | No description provided |
| dockerfilePath | String ! | - | No description provided |
| target | String | - | No description provided |
| buildArgs | [String ! ] ! | - | No description provided |
Example
Function Build.Constructor is not accessible from the docker moduleFunction Build.Constructor is not accessible from the docker moduleFunction Build.Constructor is not accessible from the docker moduleFunction Build.Constructor is not accessible from the docker moduleEntrypoint
Return Type
Image !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageRef | String ! | - | No description provided |
Example
Function Image.Constructor is not accessible from the docker moduleFunction Image.Constructor is not accessible from the docker moduleFunction Image.Constructor is not accessible from the docker moduleFunction Image.Constructor is not accessible from the docker moduleEntrypoint
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 \
containerfunc (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-pathfunc (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-pathfunc (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 \
targetfunc (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-argsfunc (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-reffunc (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 \
modulefunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Source directory containing the Docker build context |
| contextPath | String ! | "." | Build context path relative to source |
| dockerfilePath | String ! | "Dockerfile" | Dockerfile path relative to context |
| target | String | null | Optional Docker build target |
| buildArgs | [String ! ] | null | Optional build arguments in KEY=VALUE form |
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
build --context-path string --dockerfile-path stringfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageRef | String ! | - | OCI image reference |
Example
dagger -m github.com/riftonix/daggerverse/modules/docker@8ba356227617743f8526ae90eb5f1f7efb106f47 call \
image --image-ref stringfunc (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)
}