Dagger
Search

docker

Dagger module

Installation

dagger install github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6

Entrypoint

Return Type
Docker !
Arguments
NameTypeDescription
containers[Container ! ] !Container to use.
digestString !No description provided
Example
func (m *myModule) example(containers []*Container, digest string) *Docker  {
	return dag.
			Docker(containers, digest)
}
@function
def example(containers: List[dagger.Container], digest: str) -> dag.Docker:
	return (
		dag.docker(containers, digest)
	)
@func()
example(containers: Container[], digest: string): Docker {
	return dag
		.docker(containers, digest)
}

Types

Docker

Docker module

container()

Container to use.

Return Type
[Container ! ] !
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string container
func (m *myModule) example(containers []*Container, digest string) []*Container  {
	return dag.
			Docker(containers, digest).
			Container()
}
@function
def example(containers: List[dagger.Container], digest: str) -> List[dagger.Container]:
	return (
		dag.docker(containers, digest)
		.container()
	)
@func()
example(containers: Container[], digest: string): Container[] {
	return dag
		.docker(containers, digest)
		.container()
}

import()

Return a container from registry

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
addressString !-Image's address from its registry.
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string import --address string
func (m *myModule) example(containers []*Container, digest string, address string) *Container  {
	return dag.
			Docker(containers, digest).
			Import(address)
}
@function
def example(containers: List[dagger.Container], digest: str, address: str) -> dagger.Container:
	return (
		dag.docker(containers, digest)
		.import_(address)
	)
@func()
example(containers: Container[], digest: string, address: string): Container {
	return dag
		.docker(containers, digest)
		.import(address)
}

apkoBuild()

Return Type
Docker !
Arguments
NameTypeDefault ValueDescription
contextDirectory !-Directory context used by apko.
configString !"apko.yaml"apko config file.
archString nullNo description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string apko-build --context DIR_PATH --config string \
 import --address string
func (m *myModule) example(containers []*Container, digest string, context *Directory, config string) *Docker  {
	return dag.
			Docker(containers, digest).
			ApkoBuild(context, config)
}
@function
def example(containers: List[dagger.Container], digest: str, context: dagger.Directory, config: str) -> dag.Docker:
	return (
		dag.docker(containers, digest)
		.apko_build(context, config)
	)
@func()
example(containers: Container[], digest: string, context: Directory, config: string): Docker {
	return dag
		.docker(containers, digest)
		.apkoBuild(context, config)
}

build()

Build multi-platform image

Return Type
Docker !
Arguments
NameTypeDefault ValueDescription
contextDirectory !-Directory context used by the Dockerfile.
dockerfileString !"Dockerfile"Path to the Dockerfile to use.
platformString nullNo description provided
targetString !""Target build stage to build.
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string build --context DIR_PATH --dockerfile string --target string \
 import --address string
func (m *myModule) example(containers []*Container, digest string, context *Directory, dockerfile string, target string) *Docker  {
	return dag.
			Docker(containers, digest).
			Build(context, dockerfile, target)
}
@function
def example(containers: List[dagger.Container], digest: str, context: dagger.Directory, dockerfile: str, target: str) -> dag.Docker:
	return (
		dag.docker(containers, digest)
		.build(context, dockerfile, target)
	)
@func()
example(containers: Container[], digest: string, context: Directory, dockerfile: string, target: string): Docker {
	return dag
		.docker(containers, digest)
		.build(context, dockerfile, target)
}

scanReport()

Return Grype scan report

Return Type
String !
Arguments
NameTypeDefault ValueDescription
containerContainer nullNo description provided
failOnString nullNo description provided
outputFormatString "table"No description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string scan-report
func (m *myModule) example(ctx context.Context, containers []*Container, digest string) string  {
	return dag.
			Docker(containers, digest).
			ScanReport(ctx)
}
@function
async def example(containers: List[dagger.Container], digest: str) -> str:
	return await (
		dag.docker(containers, digest)
		.scan_report()
	)
@func()
async example(containers: Container[], digest: string): Promise<string> {
	return dag
		.docker(containers, digest)
		.scanReport()
}

scan()

Scan container using Grype

Return Type
Docker !
Arguments
NameTypeDefault ValueDescription
containerContainer nullNo description provided
failOnString "critical"No description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string scan \
 import --address string
func (m *myModule) example(containers []*Container, digest string) *Docker  {
	return dag.
			Docker(containers, digest).
			Scan()
}
@function
def example(containers: List[dagger.Container], digest: str) -> dag.Docker:
	return (
		dag.docker(containers, digest)
		.scan()
	)
@func()
example(containers: Container[], digest: string): Docker {
	return dag
		.docker(containers, digest)
		.scan()
}

export()

Export container

Return Type
File !
Arguments
NameTypeDefault ValueDescription
platformVariants[Container ! ] nullNo description provided
compressBoolean falseNo description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string export
func (m *myModule) example(containers []*Container, digest string) *File  {
	return dag.
			Docker(containers, digest).
			Export()
}
@function
def example(containers: List[dagger.Container], digest: str) -> dagger.File:
	return (
		dag.docker(containers, digest)
		.export()
	)
@func()
example(containers: Container[], digest: string): File {
	return dag
		.docker(containers, digest)
		.export()
}

publish()

Publish container

Return Type
String !
Arguments
NameTypeDefault ValueDescription
addressString !-No description provided
platformVariants[Container ! ] nullNo description provided
usernameString nullNo description provided
passwordSecret nullNo description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string publish --address string
func (m *myModule) example(ctx context.Context, containers []*Container, digest string, address string) string  {
	return dag.
			Docker(containers, digest).
			Publish(ctx, address)
}
@function
async def example(containers: List[dagger.Container], digest: str, address: str) -> str:
	return await (
		dag.docker(containers, digest)
		.publish(address)
	)
@func()
async example(containers: Container[], digest: string, address: string): Promise<string> {
	return dag
		.docker(containers, digest)
		.publish(address)
}

sign()

Sign Docker image

Return Type
String !
Arguments
NameTypeDefault ValueDescription
privateKeySecret !-A reference to a secret value, which can be handled more safely than the value itself.
passwordSecret !-A reference to a secret value, which can be handled more safely than the value itself.
digestString nullNo description provided
registryUsernameString nullNo description provided
registryPasswordSecret nullNo description provided
dockerConfigFile nullNo description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string sign --private-key env:MYSECRET --password env:MYSECRET
func (m *myModule) example(ctx context.Context, containers []*Container, digest string, privateKey *Secret, password *Secret) string  {
	return dag.
			Docker(containers, digest).
			Sign(ctx, privateKey, password)
}
@function
async def example(containers: List[dagger.Container], digest: str, private_key: dagger.Secret, password: dagger.Secret) -> str:
	return await (
		dag.docker(containers, digest)
		.sign(private_key, password)
	)
@func()
async example(containers: Container[], digest: string, privateKey: Secret, password: Secret): Promise<string> {
	return dag
		.docker(containers, digest)
		.sign(privateKey, password)
}

releaseApko()

Release APKO image

Return Type
String !
Arguments
NameTypeDefault ValueDescription
contextDirectory !-A directory.
addressString !-No description provided
configString !"apko.yaml"No description provided
usernameString nullNo description provided
passwordSecret nullNo description provided
dockerConfigFile nullNo description provided
archString nullNo description provided
scanBoolean falseNo description provided
scanFailOnString "critical"No description provided
signBoolean falseNo description provided
cosignPasswordSecret nullNo description provided
cosignPrivateKeySecret nullNo description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string release-apko --context DIR_PATH --address string --config string
func (m *myModule) example(ctx context.Context, containers []*Container, digest string, context *Directory, address string, config string) string  {
	return dag.
			Docker(containers, digest).
			ReleaseApko(ctx, context, address, config)
}
@function
async def example(containers: List[dagger.Container], digest: str, context: dagger.Directory, address: str, config: str) -> str:
	return await (
		dag.docker(containers, digest)
		.release_apko(context, address, config)
	)
@func()
async example(containers: Container[], digest: string, context: Directory, address: string, config: string): Promise<string> {
	return dag
		.docker(containers, digest)
		.releaseApko(context, address, config)
}

release()

Release Docker image

Return Type
String !
Arguments
NameTypeDefault ValueDescription
contextDirectory !-A directory.
addressString !-No description provided
dockerfileString !"Dockerfile"No description provided
usernameString nullNo description provided
passwordSecret nullNo description provided
dockerConfigFile nullNo description provided
platformString nullNo description provided
scanBoolean falseNo description provided
scanFailOnString "critical"No description provided
signBoolean falseNo description provided
cosignPasswordSecret nullNo description provided
cosignPrivateKeySecret nullNo description provided
Example
dagger -m github.com/opopops/docker@7ae3c37d3ee93cb2f735ba3b84f23be49e01b3d6 call \
 --digest string release --context DIR_PATH --address string --dockerfile string
func (m *myModule) example(ctx context.Context, containers []*Container, digest string, context *Directory, address string, dockerfile string) string  {
	return dag.
			Docker(containers, digest).
			Release(ctx, context, address, dockerfile)
}
@function
async def example(containers: List[dagger.Container], digest: str, context: dagger.Directory, address: str, dockerfile: str) -> str:
	return await (
		dag.docker(containers, digest)
		.release(context, address, dockerfile)
	)
@func()
async example(containers: Container[], digest: string, context: Directory, address: string, dockerfile: string): Promise<string> {
	return dag
		.docker(containers, digest)
		.release(context, address, dockerfile)
}