docker
Build, publish, scan and sign multi-platform Docker images.
Installation
dagger install github.com/opopops/daggerverse/docker@v1.2.0
Entrypoint
Return Type
Docker !
Arguments
Name | Type | Description |
---|---|---|
registry | String | No description provided |
username | String | No description provided |
password | Secret | No description provided |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
func (m *myModule) example() *Docker {
return dag.
Docker()
}
@function
def example() -> dag.Docker:
return (
dag.docker()
)
@func()
example(): Docker {
return dag
.docker()
}
Types
Image 🔗
Docker Image
username() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
username
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Username(ctx)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.username()
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.username()
}
password() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
password
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) *Secret {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Password()
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> dagger.Secret:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.password()
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): Secret {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.password()
}
container() 🔗
Returns authenticated container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
container
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) *Container {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Container()
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> dagger.Container:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.container()
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): Container {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.container()
}
platforms() 🔗
Retrieves image platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
platforms
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) [] {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Platforms()
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> List[]:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.platforms()
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): [] {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.platforms()
}
ref() 🔗
Retrieves the fully qualified image ref
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
ref
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Ref(ctx)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.ref()
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.ref()
}
digest() 🔗
Retrieves the image digest
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
digest
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Digest(ctx)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.digest()
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.digest()
}
registry() 🔗
Retrieves the registry host from image address
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
registry
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Registry(ctx)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.registry()
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.registry()
}
tag() 🔗
Tag image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | Tag |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
tag --tag string
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string, tag string) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Tag(ctx, tag)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str, tag: str) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.tag(tag)
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string, tag: string): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.tag(tag)
}
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@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
with-tag --tag string
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string, tag string) *DockerImage {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
WithTag(tag)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str, tag: str) -> dag.DockerImage:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.with_tag(tag)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string, tag: string): DockerImage {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.withTag(tag)
}
scan() 🔗
Scan image using Grype
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
scan --output-format string
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string, outputFormat string) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Scan(ctxoutputFormat)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str, output_format: str) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.scan(output_format)
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string, outputFormat: string): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.scan(outputFormat)
}
withScan() 🔗
Scan image using Grype (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
with-scan --output-format string
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string, outputFormat string) *DockerImage {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
WithScan(outputFormat)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str, output_format: str) -> dag.DockerImage:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.with_scan(output_format)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string, outputFormat: string): DockerImage {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.withScan(outputFormat)
}
sign() 🔗
Sign image with Cosign
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret ! | - | Cosign private key |
password | Secret ! | - | Cosign password |
recursive | Boolean ! | true | If a multi-arch image is specified, additionally sign each discrete image |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
sign --private-key env:MYSECRET --password env:MYSECRET --recursive boolean
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string, privateKey *Secret, password *Secret, recursive bool) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
Sign(ctx, privateKey, password, recursive)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str, private_key: dagger.Secret, password: dagger.Secret, recursive: bool) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.sign(private_key, password, recursive)
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string, privateKey: Secret, password: Secret, recursive: boolean): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.sign(privateKey, password, recursive)
}
withSign() 🔗
Sign image with Cosign (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret ! | - | Cosign private key |
password | Secret ! | - | Cosign password |
recursive | Boolean ! | false | If a multi-arch image is specified, additionally sign each discrete image |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string \
with-sign --private-key env:MYSECRET --password env:MYSECRET --recursive boolean
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string, privateKey *Secret, password *Secret, recursive bool) *DockerImage {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image).
WithSign(privateKey, password, recursive)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str, private_key: dagger.Secret, password: dagger.Secret, recursive: bool) -> dag.DockerImage:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
.with_sign(private_key, password, recursive)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string, privateKey: Secret, password: Secret, recursive: boolean): DockerImage {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
.withSign(privateKey, password, recursive)
}
Build 🔗
Docker Build
registry() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
registry
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Registry(ctx)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret]) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.registry()
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[]): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.registry()
}
username() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
username
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Username(ctx)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret]) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.username()
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[]): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.username()
}
password() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
password
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret) *Secret {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Password()
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret]) -> dagger.Secret:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.password()
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[]): Secret {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.password()
}
platforms() 🔗
Retrieves build platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
platforms
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret) [] {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Platforms()
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret]) -> List[]:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.platforms()
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[]): [] {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.platforms()
}
container() 🔗
Returns the current host platform variant container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
container
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret) *Container {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Container()
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret]) -> dagger.Container:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.container()
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[]): Container {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.container()
}
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@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
with-registry-auth --username string --secret env:MYSECRET --address string
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, username string, secret1 *Secret, address string) *DockerBuild {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
WithRegistryAuth(username, secret1, address)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], username: str, secret1: dagger.Secret, address: str) -> dag.DockerBuild:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.with_registry_auth(username, secret1, address)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], username: string, secret1: Secret, address: string): DockerBuild {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.withRegistryAuth(username, secret1, address)
}
asTarball() 🔗
Export container as tarball
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
compress | Boolean ! | false | Enable compression |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
as-tarball --compress boolean
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, compress bool) *File {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
AsTarball(compress)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], compress: bool) -> dagger.File:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.as_tarball(compress)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], compress: boolean): File {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.asTarball(compress)
}
scan() 🔗
Scan build result using Grype
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
scan --output-format string
func (m *myModule) example(ctx context.Context, context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, outputFormat string) string {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Scan(ctxoutputFormat)
}
@function
async def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], output_format: str) -> str:
return await (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.scan(output_format)
)
@func()
async example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], outputFormat: string): Promise<string> {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.scan(outputFormat)
}
withScan() 🔗
Scan build result using Grype (for chaining)
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
with-scan --output-format string
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, outputFormat string) *DockerBuild {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
WithScan(outputFormat)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], output_format: str) -> dag.DockerBuild:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.with_scan(output_format)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], outputFormat: string): DockerBuild {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.withScan(outputFormat)
}
publish() 🔗
Publish multi-arch image
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | Image tags |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2 \
publish --image string
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret, image string) *DockerImage {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret).
Publish(image)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret], image: str) -> dag.DockerImage:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
.publish(image)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[], image: string): DockerImage {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
.publish(image)
}
Docker 🔗
Docker CLI
registry() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
registry
func (m *myModule) example(ctx context.Context) string {
return dag.
Docker().
Registry(ctx)
}
@function
async def example() -> str:
return await (
dag.docker()
.registry()
)
@func()
async example(): Promise<string> {
return dag
.docker()
.registry()
}
username() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
username
func (m *myModule) example(ctx context.Context) string {
return dag.
Docker().
Username(ctx)
}
@function
async def example() -> str:
return await (
dag.docker()
.username()
)
@func()
async example(): Promise<string> {
return dag
.docker()
.username()
}
password() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
password
func (m *myModule) example() *Secret {
return dag.
Docker().
Password()
}
@function
def example() -> dagger.Secret:
return (
dag.docker()
.password()
)
@func()
example(): Secret {
return dag
.docker()
.password()
}
build() 🔗
Build multi-arch OCI image
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
context | Directory ! | - | Dockerfile context |
platform | [Scalar ! ] ! | [] | Set target platform for build |
file | String ! | "Dockerfile" | Name 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 |
Example
dagger -m github.com/opopops/daggerverse/docker@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
build --context DIR_PATH --file string --target string --build-arg string1 --build-arg string2
func (m *myModule) example(context *Directory, platform [], file string, target string, buildArg []string, secret []*Secret) *DockerBuild {
return dag.
Docker().
Build(context, platform, file, target, buildArg, secret)
}
@function
def example(context: dagger.Directory, platform: List[], file: str, target: str, build_arg: List[str], secret: List[dagger.Secret]) -> dag.DockerBuild:
return (
dag.docker()
.build(context, platform, file, target, build_arg, secret)
)
@func()
example(context: Directory, platform: [], file: string, target: string, buildArg: string[], secret: Secret[]): DockerBuild {
return dag
.docker()
.build(context, platform, file, target, buildArg, secret)
}