apko
Builds containers using the Apko CLI
Installation
dagger install github.com/opopops/daggerverse/apko@v1.8.1Entrypoint
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 |
| container | Container | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
--image string --version string --user stringfunc (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 module
container() 🔗
Returns image container
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| platform | Scalar | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
containerfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool) *dagger.Container {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Container()
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> dagger.Container:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.container()
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): Container {
return dag
.apko()
.publish(config, tag, sbom, arch, 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@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
copy --target stringfunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, arch string, local bool, target string) string {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Copy(ctx, target)
}@function
async def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool, target: str) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, arch, local)
.copy(target)
)@func()
async example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean, target: string): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.copy(target)
}digest() 🔗
Retrieves the image digest
Return Type
String ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
digestfunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, arch string, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Digest(ctx)
}@function
async def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, arch, local)
.digest()
)@func()
async example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.digest()
}platforms() 🔗
Retrieves image platforms
Return Type
[Scalar ! ] ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
platformsfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool) [] {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Platforms()
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> List[]:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.platforms()
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): [] {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.platforms()
}ref() 🔗
Retrieves the fully qualified image ref
Return Type
String ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
reffunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, arch string, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Ref(ctx)
}@function
async def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, arch, local)
.ref()
)@func()
async example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.ref()
}registry() 🔗
Retrieves the registry host from image address
Return Type
String ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
registryfunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, arch string, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Registry(ctx)
}@function
async def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, arch, local)
.registry()
)@func()
async example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.registry()
}sbomDir() 🔗
Returns the SBOM directory
Return Type
Directory ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
sbom-dirfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool) *dagger.Directory {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
SbomDir()
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> dagger.Directory:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.sbom_dir()
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): Directory {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.sbomDir()
}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 ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
scan --fail boolean --output-format stringfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool, fail bool, outputFormat string) *dagger.File {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Scan(fail, outputFormat)
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool, fail: bool, output_format: str) -> dagger.File:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.scan(fail, output_format)
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean, fail: boolean, outputFormat: string): File {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.scan(fail, outputFormat)
}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/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
signfunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, arch string, local bool) string {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Sign(ctx)
}@function
async def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, arch, local)
.sign()
)@func()
async example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.sign()
}tag() 🔗
Tag image
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tag | String ! | - | Tag |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
tag --tag stringfunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, sbom bool, arch string, local bool, tag1 string) string {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
Tag(ctx, tag1)
}@function
async def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool, tag1: str) -> str:
return await (
dag.apko()
.publish(config, tag, sbom, arch, local)
.tag(tag1)
)@func()
async example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean, tag1: string): Promise<string> {
return dag
.apko()
.publish(config, tag, sbom, arch, 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@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
with-copy --target stringfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool, target string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
WithCopy(target)
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool, target: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.with_copy(target)
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean, target: string): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.withCopy(target)
}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 ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
with-scan --fail boolean --output-format stringfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool, fail bool, outputFormat string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
WithScan(fail, outputFormat)
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool, fail: bool, output_format: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.with_scan(fail, output_format)
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean, fail: boolean, outputFormat: string): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.withScan(fail, outputFormat)
}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/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
with-signfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
WithSign()
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.with_sign()
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.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/apko@1a16147d17380e846f57182860b10808563dc364 call \
publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local boolean \
with-tag --tag stringfunc (m *MyModule) Example(config *dagger.File, tag []string, sbom bool, arch string, local bool, tag1 string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag, sbom, arch, local).
WithTag(tag1)
}@function
def example(config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool, tag1: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag, sbom, arch, local)
.with_tag(tag1)
)@func()
example(config: File, tag: string[], sbom: boolean, arch: string, local: boolean, tag1: string): ApkoImage {
return dag
.apko()
.publish(config, tag, sbom, arch, local)
.withTag(tag1)
}Build 🔗
Apko Build module
asTarball() 🔗
Returns the image tarball
Return Type
File ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
as-tarballfunc (m *MyModule) Example(config *dagger.File, tag string, arch string, format string) *dagger.File {
return dag.
Apko().
Build(config, tag, arch, format).
AsTarball()
}@function
def example(config: dagger.File, tag: str, arch: str, format: str) -> dagger.File:
return (
dag.apko()
.build(config, tag, arch, format)
.as_tarball()
)@func()
example(config: File, tag: string, arch: string, format: string): File {
return dag
.apko()
.build(config, tag, arch, format)
.asTarball()
}buildDir() 🔗
Returns the build directory
Return Type
Directory ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
build-dirfunc (m *MyModule) Example(config *dagger.File, tag string, arch string, format string) *dagger.Directory {
return dag.
Apko().
Build(config, tag, arch, format).
BuildDir()
}@function
def example(config: dagger.File, tag: str, arch: str, format: str) -> dagger.Directory:
return (
dag.apko()
.build(config, tag, arch, format)
.build_dir()
)@func()
example(config: File, tag: string, arch: string, format: string): Directory {
return dag
.apko()
.build(config, tag, arch, format)
.buildDir()
}container() 🔗
Returns the build container
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| platform | Scalar | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
containerfunc (m *MyModule) Example(config *dagger.File, tag string, arch string, format string) *dagger.Container {
return dag.
Apko().
Build(config, tag, arch, format).
Container()
}@function
def example(config: dagger.File, tag: str, arch: str, format: str) -> dagger.Container:
return (
dag.apko()
.build(config, tag, arch, format)
.container()
)@func()
example(config: File, tag: string, arch: string, format: string): Container {
return dag
.apko()
.build(config, tag, arch, format)
.container()
}ociDir() 🔗
Returns the OCI directory
Return Type
Directory ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
oci-dirfunc (m *MyModule) Example(config *dagger.File, tag string, arch string, format string) *dagger.Directory {
return dag.
Apko().
Build(config, tag, arch, format).
OciDir()
}@function
def example(config: dagger.File, tag: str, arch: str, format: str) -> dagger.Directory:
return (
dag.apko()
.build(config, tag, arch, format)
.oci_dir()
)@func()
example(config: File, tag: string, arch: string, format: string): Directory {
return dag
.apko()
.build(config, tag, arch, format)
.ociDir()
}publish() 🔗
Publish multi-arch image
Return Type
Image !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tag | [String ! ] ! | [] | Additional tags |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
publish --tag string1 --tag string2func (m *MyModule) Example(config *dagger.File, tag string, arch string, format string, tag1 []string) *dagger.ApkoImage {
return dag.
Apko().
Build(config, tag, arch, format).
Publish(tag1)
}@function
def example(config: dagger.File, tag: str, arch: str, format: str, tag1: List[str]) -> dagger.ApkoImage:
return (
dag.apko()
.build(config, tag, arch, format)
.publish(tag1)
)@func()
example(config: File, tag: string, arch: string, format: string, tag1: string[]): ApkoImage {
return dag
.apko()
.build(config, tag, arch, format)
.publish(tag1)
}sbomDir() 🔗
Returns the SBOM directory
Return Type
Directory ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
sbom-dirfunc (m *MyModule) Example(config *dagger.File, tag string, arch string, format string) *dagger.Directory {
return dag.
Apko().
Build(config, tag, arch, format).
SbomDir()
}@function
def example(config: dagger.File, tag: str, arch: str, format: str) -> dagger.Directory:
return (
dag.apko()
.build(config, tag, arch, format)
.sbom_dir()
)@func()
example(config: File, tag: string, arch: string, format: string): Directory {
return dag
.apko()
.build(config, tag, arch, format)
.sbomDir()
}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 ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
scan --fail boolean --output-format stringfunc (m *MyModule) Example(config *dagger.File, tag string, arch string, format string, fail bool, outputFormat string) *dagger.File {
return dag.
Apko().
Build(config, tag, arch, format).
Scan(fail, outputFormat)
}@function
def example(config: dagger.File, tag: str, arch: str, format: str, fail: bool, output_format: str) -> dagger.File:
return (
dag.apko()
.build(config, tag, arch, format)
.scan(fail, output_format)
)@func()
example(config: File, tag: string, arch: string, format: string, fail: boolean, outputFormat: string): File {
return dag
.apko()
.build(config, tag, arch, format)
.scan(fail, outputFormat)
}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 ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
build --config file:path --tag string --arch string --format string \
with-scan --fail boolean --output-format stringfunc (m *MyModule) Example(config *dagger.File, tag string, arch string, format string, fail bool, outputFormat string) *dagger.ApkoBuild {
return dag.
Apko().
Build(config, tag, arch, format).
WithScan(fail, outputFormat)
}@function
def example(config: dagger.File, tag: str, arch: str, format: str, fail: bool, output_format: str) -> dagger.ApkoBuild:
return (
dag.apko()
.build(config, tag, arch, format)
.with_scan(fail, output_format)
)@func()
example(config: File, tag: string, arch: string, format: string, fail: boolean, outputFormat: string): ApkoBuild {
return dag
.apko()
.build(config, tag, arch, format)
.withScan(fail, outputFormat)
}Apko 🔗
Apko module
build() 🔗
Build an image using Apko
Return Type
Build !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| context | Directory | - | Working dir |
| config | File ! | - | Config file |
| tag | String ! | - | Image tag |
| arch | String ! | "" | Architectures to build for |
| format | String ! | "tarball" | Image format |
| 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@1a16147d17380e846f57182860b10808563dc364 call \
--image string --version string --user string build --config file:path --tag string --arch string --format stringfunc (m *MyModule) Example(image string, version string, user string, config *dagger.File, tag string, arch string, format string) *dagger.ApkoBuild {
return dag.
Apko(image, version, user).
Build(config, tag, arch, format)
}@function
def example(image: str, version: str, user: str, config: dagger.File, tag: str, arch: str, format: str) -> dagger.ApkoBuild:
return (
dag.apko(image, version, user)
.build(config, tag, arch, format)
)@func()
example(image: string, version: string, user: string, config: File, tag: string, arch: string, format: string): ApkoBuild {
return dag
.apko(image, version, user)
.build(config, tag, arch, format)
}container() 🔗
Returns apko container
Return Type
Container ! Example
dagger -m github.com/opopops/daggerverse/apko@1a16147d17380e846f57182860b10808563dc364 call \
--image string --version string --user string containerfunc (m *MyModule) Example(image string, version string, user string) *dagger.Container {
return dag.
Apko(image, version, user).
Container()
}@function
def example(image: str, version: str, user: str, ) -> dagger.Container:
return (
dag.apko(image, version, user)
.container()
)@func()
example(image: string, version: string, user: string, ): Container {
return dag
.apko(image, version, user)
.container()
}publish() 🔗
Publish an image using Apko
Return Type
Image !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| context | Directory | - | Working dir |
| config | File ! | - | Config file |
| tag | [String ! ] ! | - | Image tags |
| sbom | Boolean ! | true | generate an SBOM |
| arch | String ! | "" | Architectures to build for |
| 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@1a16147d17380e846f57182860b10808563dc364 call \
--image string --version string --user string publish --config file:path --tag string1 --tag string2 --sbom boolean --arch string --local booleanfunc (m *MyModule) Example(image string, version string, user string, config *dagger.File, tag []string, sbom bool, arch string, local bool) *dagger.ApkoImage {
return dag.
Apko(image, version, user).
Publish(config, tag, sbom, arch, local)
}@function
def example(image: str, version: str, user: str, config: dagger.File, tag: List[str], sbom: bool, arch: str, local: bool) -> dagger.ApkoImage:
return (
dag.apko(image, version, user)
.publish(config, tag, sbom, arch, local)
)@func()
example(image: string, version: string, user: string, config: File, tag: string[], sbom: boolean, arch: string, local: boolean): ApkoImage {
return dag
.apko(image, version, user)
.publish(config, tag, sbom, arch, 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@1a16147d17380e846f57182860b10808563dc364 call \
--image string --version string --user string with-registry-auth --username string --secret env:MYSECRET --address stringfunc (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)
}