docker
Build, publish, scan and sign multi-platform Docker images.
Installation
dagger install github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805Entrypoint
Return Type
Docker !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Directory | - | Working dir | 
| image | String | "cgr.dev/chainguard/wolfi-base:latest" | wolfi-base image | 
| version | String | "latest" | Docker CLI version | 
| user | String | "nonroot" | Image user | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 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
Cli 🔗
Apko CLI
image() 🔗
Return Type
String !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 docker \
 imagefunc (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Docker().
			Docker().
			Image(ctx)
}@function
async def example() -> str:
	return await (
		dag.docker()
		.docker()
		.image()
	)@func()
async example(): Promise<string> {
	return dag
		.docker()
		.docker()
		.image()
}user() 🔗
Return Type
String !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 docker \
 userfunc (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Docker().
			Docker().
			User(ctx)
}@function
async def example() -> str:
	return await (
		dag.docker()
		.docker()
		.user()
	)@func()
async example(): Promise<string> {
	return dag
		.docker()
		.docker()
		.user()
}version() 🔗
Return Type
String !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 docker \
 versionfunc (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Docker().
			Docker().
			Version(ctx)
}@function
async def example() -> str:
	return await (
		dag.docker()
		.docker()
		.version()
	)@func()
async example(): Promise<string> {
	return dag
		.docker()
		.docker()
		.version()
}container() 🔗
Returns the container
Return Type
Container !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 docker \
 containerfunc (m *MyModule) Example() *dagger.Container  {
	return dag.
			Docker().
			Docker().
			Container()
}@function
def example() -> dagger.Container:
	return (
		dag.docker()
		.docker()
		.container()
	)@func()
example(): Container {
	return dag
		.docker()
		.docker()
		.container()
}withEnvVariable() 🔗
Set a new environment variable in the Apko container
Return Type
Cli !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| name | String ! | - | Name of the environment variable | 
| value | String ! | - | Value of the environment variable | 
| expand | Boolean | false | Replace “${VAR}” or “$VAR” in the value according to the current environment variables defined in the container | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 docker \
 with-env-variable --name string --value stringfunc (m *MyModule) Example(name string, value string) *dagger.DockerCli  {
	return dag.
			Docker().
			Docker().
			WithEnvVariable(name, value)
}@function
def example(name: str, value: str) -> dagger.DockerCli:
	return (
		dag.docker()
		.docker()
		.with_env_variable(name, value)
	)@func()
example(name: string, value: string): DockerCli {
	return dag
		.docker()
		.docker()
		.withEnvVariable(name, value)
}withRegistryAuth() 🔗
Authenticates with registry
Return Type
Cli !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| username | String ! | - | Registry username | 
| secret | Secret ! | - | Registry password | 
| address | String | "docker.io" | Registry host | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 docker \
 with-registry-auth --username string --secret env:MYSECRETfunc (m *MyModule) Example(username string, secret *dagger.Secret) *dagger.DockerCli  {
	return dag.
			Docker().
			Docker().
			WithRegistryAuth(username, secret)
}@function
def example(username: str, secret: dagger.Secret) -> dagger.DockerCli:
	return (
		dag.docker()
		.docker()
		.with_registry_auth(username, secret)
	)@func()
example(username: string, secret: Secret): DockerCli {
	return dag
		.docker()
		.docker()
		.withRegistryAuth(username, secret)
}withSecretVariable() 🔗
Set a new environment variable, using a secret value
Return Type
Cli !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| name | String ! | - | Name of the secret variable | 
| secret | Secret ! | - | Identifier of the secret value | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 docker \
 with-secret-variable --name string --secret env:MYSECRETfunc (m *MyModule) Example(name string, secret *dagger.Secret) *dagger.DockerCli  {
	return dag.
			Docker().
			Docker().
			WithSecretVariable(name, secret)
}@function
def example(name: str, secret: dagger.Secret) -> dagger.DockerCli:
	return (
		dag.docker()
		.docker()
		.with_secret_variable(name, secret)
	)@func()
example(name: string, secret: Secret): DockerCli {
	return dag
		.docker()
		.docker()
		.withSecretVariable(name, secret)
}withUnixSocket() 🔗
Retrieves this Apko CLI plus a socket forwarded to the given Unix socket path
Return Type
Cli !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Socket ! | - | Identifier of the socket to forward | 
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(source *dagger.Socket) *dagger.DockerCli  {
	return dag.
			Docker().
			Docker().
			WithUnixSocket(source)
}@function
def example(source: dagger.Socket) -> dagger.DockerCli:
	return (
		dag.docker()
		.docker()
		.with_unix_socket(source)
	)@func()
example(source: Socket): DockerCli {
	return dag
		.docker()
		.docker()
		.withUnixSocket(source)
}Sbom 🔗
SBOM files
directory() 🔗
Returns the SBOM directory
Return Type
Directory !Example
Function DockerSbom.directory is not accessible from the docker moduleFunction DockerSbom.directory is not accessible from the docker moduleFunction DockerSbom.directory is not accessible from the docker moduleFunction DockerSbom.directory is not accessible from the docker modulefile() 🔗
Returns the SBOM file for the specified platform (current platform if not specified)
Return Type
File !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
Function DockerSbom.file is not accessible from the docker moduleFunction DockerSbom.file is not accessible from the docker moduleFunction DockerSbom.file is not accessible from the docker moduleFunction DockerSbom.file is not accessible from the docker moduleImage 🔗
Docker Image
address() 🔗
Return Type
String !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 addressfunc (m *MyModule) Example(ctx context.Context, tag []string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Address(ctx)
}@function
async def example(tag: List[str]) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.address()
	)@func()
async example(tag: string[]): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.address()
}attest() 🔗
Attest image SBOMs with Cosign
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| privateKey | Secret | null | Cosign private key | 
| password | Secret | null | Cosign password | 
| identityToken | Secret | null | Cosign identity token | 
| oidcProvider | String | "" | Specify the provider to get the OIDC token from | 
| oidcIssuer | String | "" | OIDC provider to be used to issue ID toke | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 attestfunc (m *MyModule) Example(ctx context.Context, tag []string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Attest(ctx)
}@function
async def example(tag: List[str]) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.attest()
	)@func()
async example(tag: string[]): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.attest()
}container() 🔗
Returns the container for the specified platform (current platform if not specified)
Return Type
Container !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 containerfunc (m *MyModule) Example(tag []string) *dagger.Container  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Container()
}@function
def example(tag: List[str]) -> dagger.Container:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.container()
	)@func()
example(tag: string[]): Container {
	return dag
		.docker()
		.build()
		.publish(tag)
		.container()
}copy() 🔗
Copy image to another registry
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| target | String ! | - | Target | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 copy --target stringfunc (m *MyModule) Example(ctx context.Context, tag []string, target string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Copy(ctx, target)
}@function
async def example(tag: List[str], target: str) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.copy(target)
	)@func()
async example(tag: string[], target: string): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.copy(target)
}digest() 🔗
Retrieves the image digest
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 digestfunc (m *MyModule) Example(ctx context.Context, tag []string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Digest(ctx)
}@function
async def example(tag: List[str]) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.digest()
	)@func()
async example(tag: string[]): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.digest()
}platforms() 🔗
Retrieves image platforms
Return Type
[Scalar ! ] !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 platformsfunc (m *MyModule) Example(tag []string) []  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Platforms()
}@function
def example(tag: List[str]) -> List[]:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.platforms()
	)@func()
example(tag: string[]): [] {
	return dag
		.docker()
		.build()
		.publish(tag)
		.platforms()
}ref() 🔗
Retrieves the fully qualified image ref
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 reffunc (m *MyModule) Example(ctx context.Context, tag []string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Ref(ctx)
}@function
async def example(tag: List[str]) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.ref()
	)@func()
async example(tag: string[]): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.ref()
}registry() 🔗
Retrieves the registry host from image address
Return Type
String !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 registryfunc (m *MyModule) Example(ctx context.Context, tag []string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Registry(ctx)
}@function
async def example(tag: List[str]) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.registry()
	)@func()
async example(tag: string[]): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.registry()
}sbom() 🔗
Returns the SBOM directory
Return Type
Directory !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 sbomfunc (m *MyModule) Example(tag []string) *dagger.Directory  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Sbom()
}@function
def example(tag: List[str]) -> dagger.Directory:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.sbom()
	)@func()
example(tag: string[]): Directory {
	return dag
		.docker()
		.build()
		.publish(tag)
		.sbom()
}sbomFile() 🔗
Return the SBOM for the specified platform (index if not specified)
Return Type
File !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 sbom-filefunc (m *MyModule) Example(tag []string) *dagger.File  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			SbomFile()
}@function
def example(tag: List[str]) -> dagger.File:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.sbom_file()
	)@func()
example(tag: string[]): File {
	return dag
		.docker()
		.build()
		.publish(tag)
		.sbomFile()
}scan() 🔗
Scan image using Grype
Return Type
File !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| severityCutoff | String | null | No description provided | 
| fail | Boolean ! | true | Set to false to avoid failing based on severity-cutoff | 
| outputFormat | String | "table" | Report output formatter | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 scan --fail booleanfunc (m *MyModule) Example(tag []string, fail bool) *dagger.File  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Scan(fail)
}@function
def example(tag: List[str], fail: bool) -> dagger.File:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.scan(fail)
	)@func()
example(tag: string[], fail: boolean): File {
	return dag
		.docker()
		.build()
		.publish(tag)
		.scan(fail)
}sign() 🔗
Sign image with Cosign
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| privateKey | Secret | null | No description provided | 
| password | Secret | null | No description provided | 
| oidcProvider | String | null | No description provided | 
| oidcIssuer | String | null | No description provided | 
| recursive | Boolean | true | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 signfunc (m *MyModule) Example(ctx context.Context, tag []string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Sign(ctx)
}@function
async def example(tag: List[str]) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.sign()
	)@func()
async example(tag: string[]): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.sign()
}tag() 🔗
Tag image
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| tag | String ! | - | Tag | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 tag --tag stringfunc (m *MyModule) Example(ctx context.Context, tag []string, tag1 string) string  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Tag(ctx, tag1)
}@function
async def example(tag: List[str], tag1: str) -> str:
	return await (
		dag.docker()
		.build()
		.publish(tag)
		.tag(tag1)
	)@func()
async example(tag: string[], tag1: string): Promise<string> {
	return dag
		.docker()
		.build()
		.publish(tag)
		.tag(tag1)
}tarball() 🔗
Returns the container tarball for the specified platform
Return Type
File !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 tarballfunc (m *MyModule) Example(tag []string) *dagger.File  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			Tarball()
}@function
def example(tag: List[str]) -> dagger.File:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.tarball()
	)@func()
example(tag: string[]): File {
	return dag
		.docker()
		.build()
		.publish(tag)
		.tarball()
}withAttest() 🔗
Attest image SBOMs with Cosign (for chaining)
Return Type
Image !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| privateKey | Secret | null | Cosign private key | 
| password | Secret | null | Cosign password | 
| identityToken | Secret | null | Cosign identity token | 
| oidcProvider | String | "" | Specify the provider to get the OIDC token from | 
| oidcIssuer | String | "" | OIDC provider to be used to issue ID toke | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 with-attestfunc (m *MyModule) Example(tag []string) *dagger.DockerImage  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			WithAttest()
}@function
def example(tag: List[str]) -> dagger.DockerImage:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.with_attest()
	)@func()
example(tag: string[]): DockerImage {
	return dag
		.docker()
		.build()
		.publish(tag)
		.withAttest()
}withCopy() 🔗
Copy image to another registry (for chaining)
Return Type
Image !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| target | String ! | - | Target | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 with-copy --target stringfunc (m *MyModule) Example(tag []string, target string) *dagger.DockerImage  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			WithCopy(target)
}@function
def example(tag: List[str], target: str) -> dagger.DockerImage:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.with_copy(target)
	)@func()
example(tag: string[], target: string): DockerImage {
	return dag
		.docker()
		.build()
		.publish(tag)
		.withCopy(target)
}withRegistryAuth() 🔗
Authenticate with registry
Return Type
Image !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| username | String ! | - | Registry username | 
| secret | Secret ! | - | Registry password | 
| address | String | "docker.io" | Registry host | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 with-registry-auth --username string --secret env:MYSECRETfunc (m *MyModule) Example(tag []string, username string, secret *dagger.Secret) *dagger.DockerImage  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			WithRegistryAuth(username, secret)
}@function
def example(tag: List[str], username: str, secret: dagger.Secret) -> dagger.DockerImage:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.with_registry_auth(username, secret)
	)@func()
example(tag: string[], username: string, secret: Secret): DockerImage {
	return dag
		.docker()
		.build()
		.publish(tag)
		.withRegistryAuth(username, secret)
}withScan() 🔗
Scan image using Grype (for chaining)
Return Type
Image !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| severityCutoff | String | null | No description provided | 
| fail | Boolean | true | Set to false to avoid failing based on severity-cutoff | 
| outputFormat | String | "table" | Report output formatter | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 with-scanfunc (m *MyModule) Example(tag []string) *dagger.DockerImage  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			WithScan()
}@function
def example(tag: List[str]) -> dagger.DockerImage:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.with_scan()
	)@func()
example(tag: string[]): DockerImage {
	return dag
		.docker()
		.build()
		.publish(tag)
		.withScan()
}withSign() 🔗
Sign image with Cosign (for chaining)
Return Type
Image !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| privateKey | Secret | null | No description provided | 
| password | Secret | null | No description provided | 
| oidcProvider | String | null | No description provided | 
| oidcIssuer | String | null | No description provided | 
| recursive | Boolean | true | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 with-signfunc (m *MyModule) Example(tag []string) *dagger.DockerImage  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			WithSign()
}@function
def example(tag: List[str]) -> dagger.DockerImage:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.with_sign()
	)@func()
example(tag: string[]): DockerImage {
	return dag
		.docker()
		.build()
		.publish(tag)
		.withSign()
}withTag() 🔗
Tag image (for chaining)
Return Type
Image !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| tag | String ! | - | Tag | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2 \
 with-tag --tag stringfunc (m *MyModule) Example(tag []string, tag1 string) *dagger.DockerImage  {
	return dag.
			Docker().
			Build().
			Publish(tag).
			WithTag(tag1)
}@function
def example(tag: List[str], tag1: str) -> dagger.DockerImage:
	return (
		dag.docker()
		.build()
		.publish(tag)
		.with_tag(tag1)
	)@func()
example(tag: string[], tag1: string): DockerImage {
	return dag
		.docker()
		.build()
		.publish(tag)
		.withTag(tag1)
}Build 🔗
Docker Build
asDirectory() 🔗
Returns the build as directory including tarball and sbom dir
Return Type
Directory !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 as-directoryfunc (m *MyModule) Example() *dagger.Directory  {
	return dag.
			Docker().
			Build().
			AsDirectory()
}@function
def example() -> dagger.Directory:
	return (
		dag.docker()
		.build()
		.as_directory()
	)@func()
example(): Directory {
	return dag
		.docker()
		.build()
		.asDirectory()
}asTarball() 🔗
Returns the build as tarball
Return Type
File !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 as-tarballfunc (m *MyModule) Example() *dagger.File  {
	return dag.
			Docker().
			Build().
			AsTarball()
}@function
def example() -> dagger.File:
	return (
		dag.docker()
		.build()
		.as_tarball()
	)@func()
example(): File {
	return dag
		.docker()
		.build()
		.asTarball()
}container() 🔗
Returns the container for the specified platform (current platform if not specified)
Return Type
Container !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 containerfunc (m *MyModule) Example() *dagger.Container  {
	return dag.
			Docker().
			Build().
			Container()
}@function
def example() -> dagger.Container:
	return (
		dag.docker()
		.build()
		.container()
	)@func()
example(): Container {
	return dag
		.docker()
		.build()
		.container()
}platforms() 🔗
Retrieves build platforms
Return Type
[Scalar ! ] !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 platformsfunc (m *MyModule) Example() []  {
	return dag.
			Docker().
			Build().
			Platforms()
}@function
def example() -> List[]:
	return (
		dag.docker()
		.build()
		.platforms()
	)@func()
example(): [] {
	return dag
		.docker()
		.build()
		.platforms()
}publish() 🔗
Publish image
Return Type
Image !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| tag | [String ! ] ! | - | Image tags | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 publish --tag string1 --tag string2func (m *MyModule) Example(tag []string) *dagger.DockerImage  {
	return dag.
			Docker().
			Build().
			Publish(tag)
}@function
def example(tag: List[str]) -> dagger.DockerImage:
	return (
		dag.docker()
		.build()
		.publish(tag)
	)@func()
example(tag: string[]): DockerImage {
	return dag
		.docker()
		.build()
		.publish(tag)
}sbom() 🔗
Returns the SBOM directory
Return Type
Directory !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 sbomfunc (m *MyModule) Example() *dagger.Directory  {
	return dag.
			Docker().
			Build().
			Sbom()
}@function
def example() -> dagger.Directory:
	return (
		dag.docker()
		.build()
		.sbom()
	)@func()
example(): Directory {
	return dag
		.docker()
		.build()
		.sbom()
}sbomFile() 🔗
Returns the SBOM for the specified platform (index if not specified)
Return Type
File !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 sbom-filefunc (m *MyModule) Example() *dagger.File  {
	return dag.
			Docker().
			Build().
			SbomFile()
}@function
def example() -> dagger.File:
	return (
		dag.docker()
		.build()
		.sbom_file()
	)@func()
example(): File {
	return dag
		.docker()
		.build()
		.sbomFile()
}scan() 🔗
Scan build result using Grype
Return Type
File !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| severityCutoff | String | null | No description provided | 
| fail | Boolean | true | Set to false to avoid failing based on severity-cutoff | 
| outputFormat | String | "table" | Report output formatter | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 scanfunc (m *MyModule) Example() *dagger.File  {
	return dag.
			Docker().
			Build().
			Scan()
}@function
def example() -> dagger.File:
	return (
		dag.docker()
		.build()
		.scan()
	)@func()
example(): File {
	return dag
		.docker()
		.build()
		.scan()
}tarball() 🔗
Returns the container tarball for the specified platform
Return Type
File !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| platform | Scalar | null | Platform | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 tarballfunc (m *MyModule) Example() *dagger.File  {
	return dag.
			Docker().
			Build().
			Tarball()
}@function
def example() -> dagger.File:
	return (
		dag.docker()
		.build()
		.tarball()
	)@func()
example(): File {
	return dag
		.docker()
		.build()
		.tarball()
}withRegistryAuth() 🔗
Authenticate with registry
Return Type
Build !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| username | String ! | - | Registry username | 
| secret | Secret ! | - | Registry password | 
| address | String ! | "docker.io" | Registry host | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 with-registry-auth --username string --secret env:MYSECRET --address stringfunc (m *MyModule) Example(username string, secret *dagger.Secret, address string) *dagger.DockerBuild  {
	return dag.
			Docker().
			Build().
			WithRegistryAuth(username, secret, address)
}@function
def example(username: str, secret: dagger.Secret, address: str) -> dagger.DockerBuild:
	return (
		dag.docker()
		.build()
		.with_registry_auth(username, secret, address)
	)@func()
example(username: string, secret: Secret, address: string): DockerBuild {
	return dag
		.docker()
		.build()
		.withRegistryAuth(username, secret, address)
}withScan() 🔗
Scan build result using Grype (for chaining)
Return Type
Build !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| severityCutoff | String | null | No description provided | 
| fail | Boolean | true | Set to false to avoid failing based on severity-cutoff | 
| outputFormat | String | "table" | Report output formatter | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 build \
 with-scanfunc (m *MyModule) Example() *dagger.DockerBuild  {
	return dag.
			Docker().
			Build().
			WithScan()
}@function
def example() -> dagger.DockerBuild:
	return (
		dag.docker()
		.build()
		.with_scan()
	)@func()
example(): DockerBuild {
	return dag
		.docker()
		.build()
		.withScan()
}Docker 🔗
Docker
build() 🔗
Build multi-arch OCI image
Return Type
Build !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| dockerfile | String | "Dockerfile" | Location of the Dockerfile | 
| target | String | "" | Set the target build stage to build | 
| buildArg | [String ! ] | [] | Build args to pass to the build in the format of name=value | 
| secret | [Secret ! ] | [] | Secrets to pass to the build | 
| platform | [Scalar ! ] | [] | Set target platform for build | 
| sbom | Boolean | true | generate SBOM | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 buildfunc (m *MyModule) Example() *dagger.DockerBuild  {
	return dag.
			Docker().
			Build()
}@function
def example() -> dagger.DockerBuild:
	return (
		dag.docker()
		.build()
	)@func()
example(): DockerBuild {
	return dag
		.docker()
		.build()
}container() 🔗
Returns the docker container
Return Type
Container !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 containerfunc (m *MyModule) Example() *dagger.Container  {
	return dag.
			Docker().
			Container()
}@function
def example() -> dagger.Container:
	return (
		dag.docker()
		.container()
	)@func()
example(): Container {
	return dag
		.docker()
		.container()
}docker() 🔗
Returns the Apko CLI
Return Type
Cli !Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 dockerfunc (m *MyModule) Example() *dagger.DockerCli  {
	return dag.
			Docker().
			Docker()
}@function
def example() -> dagger.DockerCli:
	return (
		dag.docker()
		.docker()
	)@func()
example(): DockerCli {
	return dag
		.docker()
		.docker()
}withEnvVariable() 🔗
Set a new environment variable in the Apko container
Return Type
Docker !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| name | String ! | - | Name of the environment variable | 
| value | String ! | - | Value of the environment variable | 
| expand | Boolean | false | Replace “${VAR}” or “$VAR” in the value according to the current environment variables defined in the container | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 with-env-variable --name string --value stringfunc (m *MyModule) Example(name string, value string) *dagger.Docker  {
	return dag.
			Docker().
			WithEnvVariable(name, value)
}@function
def example(name: str, value: str) -> dagger.Docker:
	return (
		dag.docker()
		.with_env_variable(name, value)
	)@func()
example(name: string, value: string): Docker {
	return dag
		.docker()
		.withEnvVariable(name, value)
}withRegistryAuth() 🔗
Authenticate with registry
Return Type
Docker !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| username | String ! | - | Registry username | 
| secret | Secret ! | - | Registry password | 
| address | String | "docker.io" | Registry host | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 with-registry-auth --username string --secret env:MYSECRETfunc (m *MyModule) Example(username string, secret *dagger.Secret) *dagger.Docker  {
	return dag.
			Docker().
			WithRegistryAuth(username, secret)
}@function
def example(username: str, secret: dagger.Secret) -> dagger.Docker:
	return (
		dag.docker()
		.with_registry_auth(username, secret)
	)@func()
example(username: string, secret: Secret): Docker {
	return dag
		.docker()
		.withRegistryAuth(username, secret)
}withSecretVariable() 🔗
Set a new environment variable, using a secret value
Return Type
Docker !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| name | String ! | - | Name of the secret variable | 
| secret | Secret ! | - | Identifier of the secret value | 
Example
dagger -m github.com/opopops/daggerverse/docker@b352411e8b8d0b5e2705e1f5e3db386fc35b5805 call \
 with-secret-variable --name string --secret env:MYSECRETfunc (m *MyModule) Example(name string, secret *dagger.Secret) *dagger.Docker  {
	return dag.
			Docker().
			WithSecretVariable(name, secret)
}@function
def example(name: str, secret: dagger.Secret) -> dagger.Docker:
	return (
		dag.docker()
		.with_secret_variable(name, secret)
	)@func()
example(name: string, secret: Secret): Docker {
	return dag
		.docker()
		.withSecretVariable(name, secret)
}withUnixSocket() 🔗
Retrieves the Apko container plus a socket forwarded to the given Unix socket path
Return Type
Docker !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Socket ! | - | Identifier of the socket to forward | 
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(source *dagger.Socket) *dagger.Docker  {
	return dag.
			Docker().
			WithUnixSocket(source)
}@function
def example(source: dagger.Socket) -> dagger.Docker:
	return (
		dag.docker()
		.with_unix_socket(source)
	)@func()
example(source: Socket): Docker {
	return dag
		.docker()
		.withUnixSocket(source)
}