apko
Builds containers using the Apko CLI
Installation
dagger install github.com/opopops/daggerverse/apko@v1.12.1
Entrypoint
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | "cgr.dev/chainguard/wolfi-base:latest" | wolfi-base image |
version | String ! | "latest" | Apko version |
user | String ! | "65532" | Image user |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
--image string --version string --user string
func (m *MyModule) Example(image string, version string, user string) *dagger.Apko {
return dag.
Apko(image, version, user)
}
@function
def example(image: str, version: str, user: str) -> dagger.Apko:
return (
dag.apko(image, version, user)
)
@func()
example(image: string, version: string, user: string): Apko {
return dag
.apko(image, version, user)
}
Types
Image 🔗
Apko Image
address() 🔗
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
address
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, local).
Address(ctx)
}
@function
async def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, local)
.address()
)
@func()
async example(config: File, tag: string[], sbom: boolean, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, local)
.address()
}
apko() 🔗
Returns the apko container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
apko
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool) *dagger.Container {
return dag.
Apko().
Publish(config, tag, sbom, local).
Apko()
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> dagger.Container:
return (
dag.apko()
.publish(config, tag, sbom, local)
.apko()
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean): Container {
return dag
.apko()
.publish(config, tag, sbom, local)
.apko()
}
asTarball() 🔗
Returns the image tarball
Return Type
File !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
as-tarball
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool) *dagger.File {
return dag.
Apko().
Publish(config, tag, sbom, local).
AsTarball()
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> dagger.File:
return (
dag.apko()
.publish(config, tag, sbom, local)
.as_tarball()
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean): File {
return dag
.apko()
.publish(config, tag, sbom, local)
.asTarball()
}
container() 🔗
Returns the image container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
container
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool) *dagger.Container {
return dag.
Apko().
Publish(config, tag, sbom, local).
Container()
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> dagger.Container:
return (
dag.apko()
.publish(config, tag, sbom, local)
.container()
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean): Container {
return dag
.apko()
.publish(config, tag, sbom, local)
.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/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
copy --target string
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, local bool, target string) string {
return dag.
Apko().
Publish(config, tag, sbom, local).
Copy(ctx, target)
}
@function
async def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, target: str) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, local)
.copy(target)
)
@func()
async example(config: File, tag: string[], sbom: boolean, local: boolean, target: string): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, local)
.copy(target)
}
digest() 🔗
Retrieves the image digest
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
digest
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, local).
Digest(ctx)
}
@function
async def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, local)
.digest()
)
@func()
async example(config: File, tag: string[], sbom: boolean, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, local)
.digest()
}
platforms() 🔗
Retrieves image platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
platforms
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool) [] {
return dag.
Apko().
Publish(config, tag, sbom, local).
Platforms()
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> List[]:
return (
dag.apko()
.publish(config, tag, sbom, local)
.platforms()
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean): [] {
return dag
.apko()
.publish(config, tag, sbom, local)
.platforms()
}
ref() 🔗
Retrieves the fully qualified image ref
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
ref
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, local).
Ref(ctx)
}
@function
async def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, local)
.ref()
)
@func()
async example(config: File, tag: string[], sbom: boolean, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, local)
.ref()
}
registry() 🔗
Retrieves the registry host from image address
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
registry
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, local).
Registry(ctx)
}
@function
async def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, local)
.registry()
)
@func()
async example(config: File, tag: string[], sbom: boolean, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, local)
.registry()
}
sbom() 🔗
Returns the SBOM directory
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
sbom
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool) *dagger.Directory {
return dag.
Apko().
Publish(config, tag, sbom, local).
Sbom()
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool) -> dagger.Directory:
return (
dag.apko()
.publish(config, tag, sbom, local)
.sbom()
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean): Directory {
return dag
.apko()
.publish(config, tag, sbom, local)
.sbom()
}
scan() 🔗
Scan image using Grype
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severityCutoff | String ! | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean ! | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
scan --severity-cutoff string --fail boolean --output-format string
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool, severityCutoff string, fail bool, outputFormat string) *dagger.File {
return dag.
Apko().
Publish(config, tag, sbom, local).
Scan(severityCutoff, fail, outputFormat)
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, severity_cutoff: str, fail: bool, output_format: str) -> dagger.File:
return (
dag.apko()
.publish(config, tag, sbom, local)
.scan(severity_cutoff, fail, output_format)
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean, severityCutoff: string, fail: boolean, outputFormat: string): File {
return dag
.apko()
.publish(config, tag, sbom, local)
.scan(severityCutoff, fail, outputFormat)
}
sign() 🔗
Sign image with Cosign
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret | null | Cosign private key |
password | Secret | null | Cosign password |
oidcProvider | String ! | "" | Specify the provider to get the OIDC token from |
oidcIssuer | String ! | "" | OIDC provider to be used to issue ID toke |
recursive | Boolean ! | true | If a multi-arch image is specified, additionally sign each discrete image |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
sign --oidc-provider string --oidc-issuer string --recursive boolean
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, local bool, oidcProvider string, oidcIssuer string, recursive bool) string {
return dag.
Apko().
Publish(config, tag, sbom, local).
Sign(ctxoidcProvider, oidcIssuer, recursive)
}
@function
async def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, oidc_provider: str, oidc_issuer: str, recursive: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, local)
.sign(oidc_provider, oidc_issuer, recursive)
)
@func()
async example(config: File, tag: string[], sbom: boolean, local: boolean, oidcProvider: string, oidcIssuer: string, recursive: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, local)
.sign(oidcProvider, oidcIssuer, recursive)
}
tag() 🔗
Tag image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | Tag |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
tag --tag string
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, local bool, tag1 string) string {
return dag.
Apko().
Publish(config, tag, sbom, local).
Tag(ctx, tag1)
}
@function
async def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, tag1: str) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, local)
.tag(tag1)
)
@func()
async example(config: File, tag: string[], sbom: boolean, local: boolean, tag1: string): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, local)
.tag(tag1)
}
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/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
with-copy --target string
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool, target string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, local).
WithCopy(target)
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, target: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, local)
.with_copy(target)
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean, target: string): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, local)
.withCopy(target)
}
withRegistryAuth() 🔗
Authenticates 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/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
with-registry-auth --username string --secret env:MYSECRET --address string
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool, username string, secret *dagger.Secret, address string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, local).
WithRegistryAuth(username, secret, address)
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, username: str, secret: dagger.Secret, address: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, local)
.with_registry_auth(username, secret, address)
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean, username: string, secret: Secret, address: string): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, local)
.withRegistryAuth(username, secret, address)
}
withScan() 🔗
Scan image using Grype (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severityCutoff | String ! | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean ! | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
with-scan --severity-cutoff string --fail boolean --output-format string
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool, severityCutoff string, fail bool, outputFormat string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, local).
WithScan(severityCutoff, fail, outputFormat)
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, severity_cutoff: str, fail: bool, output_format: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, local)
.with_scan(severity_cutoff, fail, output_format)
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean, severityCutoff: string, fail: boolean, outputFormat: string): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, local)
.withScan(severityCutoff, fail, outputFormat)
}
withSign() 🔗
Sign image with Cosign (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret | null | Cosign private key |
password | Secret | null | Cosign password |
oidcProvider | String ! | "" | Specify the provider to get the OIDC token from |
oidcIssuer | String ! | "" | OIDC provider to be used to issue ID toke |
recursive | Boolean ! | true | If a multi-arch image is specified, additionally sign each discrete image |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
with-sign --oidc-provider string --oidc-issuer string --recursive boolean
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool, oidcProvider string, oidcIssuer string, recursive bool) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, local).
WithSign(oidcProvider, oidcIssuer, recursive)
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, oidc_provider: str, oidc_issuer: str, recursive: bool) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, local)
.with_sign(oidc_provider, oidc_issuer, recursive)
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean, oidcProvider: string, oidcIssuer: string, recursive: boolean): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, local)
.withSign(oidcProvider, oidcIssuer, recursive)
}
withTag() 🔗
Tag image (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | Tag |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean \
with-tag --tag string
func (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, local bool, tag1 string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, local).
WithTag(tag1)
}
@function
def example(config: dagger.File, tag: List[str], sbom: bool, local: bool, tag1: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, local)
.with_tag(tag1)
)
@func()
example(config: File, tag: string[], sbom: boolean, local: boolean, tag1: string): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, local)
.withTag(tag1)
}
Build 🔗
Apko Build
apko() 🔗
Returns the apko container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
apko
func (m *MyModule) Example(config *dagger.File, tag string) *dagger.Container {
return dag.
Apko().
Build(config, tag).
Apko()
}
@function
def example(config: dagger.File, tag: str) -> dagger.Container:
return (
dag.apko()
.build(config, tag)
.apko()
)
@func()
example(config: File, tag: string): Container {
return dag
.apko()
.build(config, tag)
.apko()
}
asDirectory() 🔗
Returns the build directory including image tarball and sbom dir
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
as-directory
func (m *MyModule) Example(config *dagger.File, tag string) *dagger.Directory {
return dag.
Apko().
Build(config, tag).
AsDirectory()
}
@function
def example(config: dagger.File, tag: str) -> dagger.Directory:
return (
dag.apko()
.build(config, tag)
.as_directory()
)
@func()
example(config: File, tag: string): Directory {
return dag
.apko()
.build(config, tag)
.asDirectory()
}
asTarball() 🔗
Returns the image tarball
Return Type
File !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
as-tarball
func (m *MyModule) Example(config *dagger.File, tag string) *dagger.File {
return dag.
Apko().
Build(config, tag).
AsTarball()
}
@function
def example(config: dagger.File, tag: str) -> dagger.File:
return (
dag.apko()
.build(config, tag)
.as_tarball()
)
@func()
example(config: File, tag: string): File {
return dag
.apko()
.build(config, tag)
.asTarball()
}
container() 🔗
Returns the image container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
container
func (m *MyModule) Example(config *dagger.File, tag string) *dagger.Container {
return dag.
Apko().
Build(config, tag).
Container()
}
@function
def example(config: dagger.File, tag: str) -> dagger.Container:
return (
dag.apko()
.build(config, tag)
.container()
)
@func()
example(config: File, tag: string): Container {
return dag
.apko()
.build(config, tag)
.container()
}
platforms() 🔗
Retrieves build platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
platforms
func (m *MyModule) Example(config *dagger.File, tag string) [] {
return dag.
Apko().
Build(config, tag).
Platforms()
}
@function
def example(config: dagger.File, tag: str) -> List[]:
return (
dag.apko()
.build(config, tag)
.platforms()
)
@func()
example(config: File, tag: string): [] {
return dag
.apko()
.build(config, tag)
.platforms()
}
publish() 🔗
Publish image
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | [String ! ] ! | - | Image tags |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
publish --tag string1 --tag string2
func (m *MyModule) Example(config *dagger.File, tag string, tag1 []string) *dagger.ApkoImage {
return dag.
Apko().
Build(config, tag).
Publish(tag1)
}
@function
def example(config: dagger.File, tag: str, tag1: List[str]) -> dagger.ApkoImage:
return (
dag.apko()
.build(config, tag)
.publish(tag1)
)
@func()
example(config: File, tag: string, tag1: string[]): ApkoImage {
return dag
.apko()
.build(config, tag)
.publish(tag1)
}
sbom() 🔗
Returns the SBOM directory
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
sbom
func (m *MyModule) Example(config *dagger.File, tag string) *dagger.Directory {
return dag.
Apko().
Build(config, tag).
Sbom()
}
@function
def example(config: dagger.File, tag: str) -> dagger.Directory:
return (
dag.apko()
.build(config, tag)
.sbom()
)
@func()
example(config: File, tag: string): Directory {
return dag
.apko()
.build(config, tag)
.sbom()
}
scan() 🔗
Scan build result using Grype
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severityCutoff | String ! | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean ! | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
scan --severity-cutoff string --fail boolean --output-format string
func (m *MyModule) Example(config *dagger.File, tag string, severityCutoff string, fail bool, outputFormat string) *dagger.File {
return dag.
Apko().
Build(config, tag).
Scan(severityCutoff, fail, outputFormat)
}
@function
def example(config: dagger.File, tag: str, severity_cutoff: str, fail: bool, output_format: str) -> dagger.File:
return (
dag.apko()
.build(config, tag)
.scan(severity_cutoff, fail, output_format)
)
@func()
example(config: File, tag: string, severityCutoff: string, fail: boolean, outputFormat: string): File {
return dag
.apko()
.build(config, tag)
.scan(severityCutoff, fail, outputFormat)
}
withRegistryAuth() 🔗
Authenticates 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/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
with-registry-auth --username string --secret env:MYSECRET --address string
func (m *MyModule) Example(config *dagger.File, tag string, username string, secret *dagger.Secret, address string) *dagger.ApkoBuild {
return dag.
Apko().
Build(config, tag).
WithRegistryAuth(username, secret, address)
}
@function
def example(config: dagger.File, tag: str, username: str, secret: dagger.Secret, address: str) -> dagger.ApkoBuild:
return (
dag.apko()
.build(config, tag)
.with_registry_auth(username, secret, address)
)
@func()
example(config: File, tag: string, username: string, secret: Secret, address: string): ApkoBuild {
return dag
.apko()
.build(config, tag)
.withRegistryAuth(username, secret, address)
}
withScan() 🔗
Scan build result using Grype (for chaining)
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severityCutoff | String ! | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean ! | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
build --config file:path --tag string \
with-scan --severity-cutoff string --fail boolean --output-format string
func (m *MyModule) Example(config *dagger.File, tag string, severityCutoff string, fail bool, outputFormat string) *dagger.ApkoBuild {
return dag.
Apko().
Build(config, tag).
WithScan(severityCutoff, fail, outputFormat)
}
@function
def example(config: dagger.File, tag: str, severity_cutoff: str, fail: bool, output_format: str) -> dagger.ApkoBuild:
return (
dag.apko()
.build(config, tag)
.with_scan(severity_cutoff, fail, output_format)
)
@func()
example(config: File, tag: string, severityCutoff: string, fail: boolean, outputFormat: string): ApkoBuild {
return dag
.apko()
.build(config, tag)
.withScan(severityCutoff, fail, outputFormat)
}
Apko 🔗
Apko module
apko() 🔗
Returns the apko container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
--image string --version string --user string apko
func (m *MyModule) Example(image string, version string, user string) *dagger.Container {
return dag.
Apko(image, version, user).
Apko()
}
@function
def example(image: str, version: str, user: str) -> dagger.Container:
return (
dag.apko(image, version, user)
.apko()
)
@func()
example(image: string, version: string, user: string): Container {
return dag
.apko(image, version, user)
.apko()
}
build() 🔗
Build an image using Apko
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | Working dir |
config | File ! | - | Config file |
tag | String ! | "apko-build" | Image tag |
arch | [Scalar ! ] | null | Platforms |
keyringAppend | File | null | Path to extra keys to include in the keyring |
repositoryAppend | Directory | null | Path to extra repositories to include |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
--image string --version string --user string build --config file:path --tag string
func (m *MyModule) Example(image string, version string, user string, config *dagger.File, tag string) *dagger.ApkoBuild {
return dag.
Apko(image, version, user).
Build(config, tag)
}
@function
def example(image: str, version: str, user: str, config: dagger.File, tag: str) -> dagger.ApkoBuild:
return (
dag.apko(image, version, user)
.build(config, tag)
)
@func()
example(image: string, version: string, user: string, config: File, tag: string): ApkoBuild {
return dag
.apko(image, version, user)
.build(config, tag)
}
publish() 🔗
Publish an image using Apko
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | Working dir |
config | File ! | - | Config file |
tag | [String ! ] ! | - | Image tags |
sbom | Boolean ! | true | generate an SBOM |
arch | [Scalar ! ] | null | Platforms |
local | Boolean ! | false | Publish image just to local Docker daemon |
keyringAppend | File | null | Path to extra keys to include in the keyring |
repositoryAppend | Directory | null | Path to extra repositories to include |
Example
dagger -m github.com/opopops/daggerverse/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
--image string --version string --user string publish --config file:path --tag string1 --tag string2 --sbom boolean --local boolean
func (m *MyModule) Example(image string, version string, user string, config *dagger.File, tag []string, sbom bool, local bool) *dagger.ApkoImage {
return dag.
Apko(image, version, user).
Publish(config, tag, sbom, local)
}
@function
def example(image: str, version: str, user: str, config: dagger.File, tag: List[str], sbom: bool, local: bool) -> dagger.ApkoImage:
return (
dag.apko(image, version, user)
.publish(config, tag, sbom, local)
)
@func()
example(image: string, version: string, user: string, config: File, tag: string[], sbom: boolean, local: boolean): ApkoImage {
return dag
.apko(image, version, user)
.publish(config, tag, sbom, local)
}
withRegistryAuth() 🔗
Authenticates with registry
Return Type
Apko !
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/apko@182a7f073ae270ad14e161e68ab478471f0bd81f call \
--image string --version string --user string with-registry-auth --username string --secret env:MYSECRET --address string
func (m *MyModule) Example(image string, version string, user string, username string, secret *dagger.Secret, address string) *dagger.Apko {
return dag.
Apko(image, version, user).
WithRegistryAuth(username, secret, address)
}
@function
def example(image: str, version: str, user: str, username: str, secret: dagger.Secret, address: str) -> dagger.Apko:
return (
dag.apko(image, version, user)
.with_registry_auth(username, secret, address)
)
@func()
example(image: string, version: string, user: string, username: string, secret: Secret, address: string): Apko {
return dag
.apko(image, version, user)
.withRegistryAuth(username, secret, address)
}