apko
Builds containers using the Apko CLI
Installation
dagger install github.com/opopops/daggerverse/apko@v1.2.1
Entrypoint
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | "cgr.dev/chainguard/wolfi-base:latest" | Base image |
registry | String | "index.docker.io" | No description provided |
username | String | null | No description provided |
password | Secret | null | No description provided |
user | String | "65532" | No description provided |
container | Container | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string
func (m *myModule) example(image string) *Apko {
return dag.
Apko(image)
}
@function
def example(image: str, ) -> dag.Apko:
return (
dag.apko(image)
)
@func()
example(image: string, ): Apko {
return dag
.apko(image)
}
Types
Image 🔗
Apko Image module
username() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
username
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Publish(tag, context, config).
Username(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.publish(tag, context, config)
.username()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.publish(tag, context, config)
.username()
}
password() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
password
func (m *myModule) example(tag string, context *Directory, config string) *Secret {
return dag.
Apko().
Publish(tag, context, config).
Password()
}
@function
def example(tag: str, context: dagger.Directory, config: str) -> dagger.Secret:
return (
dag.apko()
.publish(tag, context, config)
.password()
)
@func()
example(tag: string, context: Directory, config: string): Secret {
return dag
.apko()
.publish(tag, context, config)
.password()
}
container() 🔗
Returns authenticated container
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
container
func (m *myModule) example(tag string, context *Directory, config string) *Container {
return dag.
Apko().
Publish(tag, context, config).
Container()
}
@function
def example(tag: str, context: dagger.Directory, config: str) -> dagger.Container:
return (
dag.apko()
.publish(tag, context, config)
.container()
)
@func()
example(tag: string, context: Directory, config: string): Container {
return dag
.apko()
.publish(tag, context, config)
.container()
}
digest() 🔗
Retrieves the image digest
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
digest
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Publish(tag, context, config).
Digest(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.publish(tag, context, config)
.digest()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.publish(tag, context, config)
.digest()
}
platforms() 🔗
Retrieves image platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
platforms
func (m *myModule) example(tag string, context *Directory, config string) [] {
return dag.
Apko().
Publish(tag, context, config).
Platforms()
}
@function
def example(tag: str, context: dagger.Directory, config: str) -> List[]:
return (
dag.apko()
.publish(tag, context, config)
.platforms()
)
@func()
example(tag: string, context: Directory, config: string): [] {
return dag
.apko()
.publish(tag, context, config)
.platforms()
}
ref() 🔗
Retrieves the fully qualified image ref
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
ref
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Publish(tag, context, config).
Ref(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.publish(tag, context, config)
.ref()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.publish(tag, context, config)
.ref()
}
registry() 🔗
Retrieves the registry host from image address
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
registry
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Publish(tag, context, config).
Registry(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.publish(tag, context, config)
.registry()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.publish(tag, context, config)
.registry()
}
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/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
scan --output-format string
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string, outputFormat string) string {
return dag.
Apko().
Publish(tag, context, config).
Scan(ctxoutputFormat)
}
@function
async def example(tag: str, context: dagger.Directory, config: str, output_format: str) -> str:
return await (
dag.apko()
.publish(tag, context, config)
.scan(output_format)
)
@func()
async example(tag: string, context: Directory, config: string, outputFormat: string): Promise<string> {
return dag
.apko()
.publish(tag, context, config)
.scan(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/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
sign --private-key env:MYSECRET --password env:MYSECRET --recursive boolean
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string, privateKey *Secret, password *Secret, recursive bool) string {
return dag.
Apko().
Publish(tag, context, config).
Sign(ctx, privateKey, password, recursive)
}
@function
async def example(tag: str, context: dagger.Directory, config: str, private_key: dagger.Secret, password: dagger.Secret, recursive: bool) -> str:
return await (
dag.apko()
.publish(tag, context, config)
.sign(private_key, password, recursive)
)
@func()
async example(tag: string, context: Directory, config: string, privateKey: Secret, password: Secret, recursive: boolean): Promise<string> {
return dag
.apko()
.publish(tag, context, config)
.sign(privateKey, password, recursive)
}
tag() 🔗
Tag image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | Tag |
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
tag --tag string
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string, tag1 string) string {
return dag.
Apko().
Publish(tag, context, config).
Tag(ctx, tag1)
}
@function
async def example(tag: str, context: dagger.Directory, config: str, tag1: str) -> str:
return await (
dag.apko()
.publish(tag, context, config)
.tag(tag1)
)
@func()
async example(tag: string, context: Directory, config: string, tag1: string): Promise<string> {
return dag
.apko()
.publish(tag, context, config)
.tag(tag1)
}
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/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
with-scan --output-format string
func (m *myModule) example(tag string, context *Directory, config string, outputFormat string) *ApkoImage {
return dag.
Apko().
Publish(tag, context, config).
WithScan(outputFormat)
}
@function
def example(tag: str, context: dagger.Directory, config: str, output_format: str) -> dag.ApkoImage:
return (
dag.apko()
.publish(tag, context, config)
.with_scan(output_format)
)
@func()
example(tag: string, context: Directory, config: string, outputFormat: string): ApkoImage {
return dag
.apko()
.publish(tag, context, config)
.withScan(outputFormat)
}
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/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
with-sign --private-key env:MYSECRET --password env:MYSECRET --recursive boolean
func (m *myModule) example(tag string, context *Directory, config string, privateKey *Secret, password *Secret, recursive bool) *ApkoImage {
return dag.
Apko().
Publish(tag, context, config).
WithSign(privateKey, password, recursive)
}
@function
def example(tag: str, context: dagger.Directory, config: str, private_key: dagger.Secret, password: dagger.Secret, recursive: bool) -> dag.ApkoImage:
return (
dag.apko()
.publish(tag, context, config)
.with_sign(private_key, password, recursive)
)
@func()
example(tag: string, context: Directory, config: string, privateKey: Secret, password: Secret, recursive: boolean): ApkoImage {
return dag
.apko()
.publish(tag, context, config)
.withSign(privateKey, password, 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@327a52a86fa82c8a28102a10c27acac1525686a0 call \
publish --tag string --context DIR_PATH --config string \
with-tag --tag string
func (m *myModule) example(tag string, context *Directory, config string, tag1 string) *ApkoImage {
return dag.
Apko().
Publish(tag, context, config).
WithTag(tag1)
}
@function
def example(tag: str, context: dagger.Directory, config: str, tag1: str) -> dag.ApkoImage:
return (
dag.apko()
.publish(tag, context, config)
.with_tag(tag1)
)
@func()
example(tag: string, context: Directory, config: string, tag1: string): ApkoImage {
return dag
.apko()
.publish(tag, context, config)
.withTag(tag1)
}
Build 🔗
Apko Build module
image() 🔗
Apko image
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
image
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Build(tag, context, config).
Image(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.build(tag, context, config)
.image()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.build(tag, context, config)
.image()
}
registry() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
registry
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Build(tag, context, config).
Registry(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.build(tag, context, config)
.registry()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.build(tag, context, config)
.registry()
}
username() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
username
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Build(tag, context, config).
Username(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.build(tag, context, config)
.username()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.build(tag, context, config)
.username()
}
password() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
password
func (m *myModule) example(tag string, context *Directory, config string) *Secret {
return dag.
Apko().
Build(tag, context, config).
Password()
}
@function
def example(tag: str, context: dagger.Directory, config: str) -> dagger.Secret:
return (
dag.apko()
.build(tag, context, config)
.password()
)
@func()
example(tag: string, context: Directory, config: string): Secret {
return dag
.apko()
.build(tag, context, config)
.password()
}
user() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
user
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string) string {
return dag.
Apko().
Build(tag, context, config).
User(ctx)
}
@function
async def example(tag: str, context: dagger.Directory, config: str) -> str:
return await (
dag.apko()
.build(tag, context, config)
.user()
)
@func()
async example(tag: string, context: Directory, config: string): Promise<string> {
return dag
.apko()
.build(tag, context, config)
.user()
}
asDirectory() 🔗
Returns the image OCI layout directory
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
as-directory
func (m *myModule) example(tag string, context *Directory, config string) *Directory {
return dag.
Apko().
Build(tag, context, config).
AsDirectory()
}
@function
def example(tag: str, context: dagger.Directory, config: str) -> dagger.Directory:
return (
dag.apko()
.build(tag, context, config)
.as_directory()
)
@func()
example(tag: string, context: Directory, config: string): Directory {
return dag
.apko()
.build(tag, context, config)
.asDirectory()
}
publish() 🔗
Publish multi-arch image
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | [String ! ] ! | - | Image tag |
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
publish --image string1 --image string2
func (m *myModule) example(tag string, context *Directory, config string, image []string) *ApkoImage {
return dag.
Apko().
Build(tag, context, config).
Publish(image)
}
@function
def example(tag: str, context: dagger.Directory, config: str, image: List[str]) -> dag.ApkoImage:
return (
dag.apko()
.build(tag, context, config)
.publish(image)
)
@func()
example(tag: string, context: Directory, config: string, image: string[]): ApkoImage {
return dag
.apko()
.build(tag, context, config)
.publish(image)
}
sbom() 🔗
Returns SBOM
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
sbom
func (m *myModule) example(tag string, context *Directory, config string) *Directory {
return dag.
Apko().
Build(tag, context, config).
Sbom()
}
@function
def example(tag: str, context: dagger.Directory, config: str) -> dagger.Directory:
return (
dag.apko()
.build(tag, context, config)
.sbom()
)
@func()
example(tag: string, context: Directory, config: string): Directory {
return dag
.apko()
.build(tag, context, config)
.sbom()
}
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/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
scan --output-format string
func (m *myModule) example(ctx context.Context, tag string, context *Directory, config string, outputFormat string) string {
return dag.
Apko().
Build(tag, context, config).
Scan(ctxoutputFormat)
}
@function
async def example(tag: str, context: dagger.Directory, config: str, output_format: str) -> str:
return await (
dag.apko()
.build(tag, context, config)
.scan(output_format)
)
@func()
async example(tag: string, context: Directory, config: string, outputFormat: string): Promise<string> {
return dag
.apko()
.build(tag, context, config)
.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/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
build --tag string --context DIR_PATH --config string \
with-scan --output-format string
func (m *myModule) example(tag string, context *Directory, config string, outputFormat string) *ApkoBuild {
return dag.
Apko().
Build(tag, context, config).
WithScan(outputFormat)
}
@function
def example(tag: str, context: dagger.Directory, config: str, output_format: str) -> dag.ApkoBuild:
return (
dag.apko()
.build(tag, context, config)
.with_scan(output_format)
)
@func()
example(tag: string, context: Directory, config: string, outputFormat: string): ApkoBuild {
return dag
.apko()
.build(tag, context, config)
.withScan(outputFormat)
}
Apko 🔗
Apko module
image() 🔗
Base image
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string image
func (m *myModule) example(ctx context.Context, image string) string {
return dag.
Apko(image).
Image(ctx)
}
@function
async def example(image: str, ) -> str:
return await (
dag.apko(image)
.image()
)
@func()
async example(image: string, ): Promise<string> {
return dag
.apko(image)
.image()
}
registry() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string registry
func (m *myModule) example(ctx context.Context, image string) string {
return dag.
Apko(image).
Registry(ctx)
}
@function
async def example(image: str, ) -> str:
return await (
dag.apko(image)
.registry()
)
@func()
async example(image: string, ): Promise<string> {
return dag
.apko(image)
.registry()
}
username() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string username
func (m *myModule) example(ctx context.Context, image string) string {
return dag.
Apko(image).
Username(ctx)
}
@function
async def example(image: str, ) -> str:
return await (
dag.apko(image)
.username()
)
@func()
async example(image: string, ): Promise<string> {
return dag
.apko(image)
.username()
}
password() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string password
func (m *myModule) example(image string) *Secret {
return dag.
Apko(image).
Password()
}
@function
def example(image: str, ) -> dagger.Secret:
return (
dag.apko(image)
.password()
)
@func()
example(image: string, ): Secret {
return dag
.apko(image)
.password()
}
user() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string user
func (m *myModule) example(ctx context.Context, image string) string {
return dag.
Apko(image).
User(ctx)
}
@function
async def example(image: str, ) -> str:
return await (
dag.apko(image)
.user()
)
@func()
async example(image: string, ): Promise<string> {
return dag
.apko(image)
.user()
}
build() 🔗
Build an image using Apko
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | Image tag |
context | Directory ! | - | Working dir |
config | String ! | "apko.yaml" | Config file |
arch | String | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string build --tag string --context DIR_PATH --config string
func (m *myModule) example(image string, tag string, context *Directory, config string) *ApkoBuild {
return dag.
Apko(image).
Build(tag, context, config)
}
@function
def example(image: str, tag: str, context: dagger.Directory, config: str) -> dag.ApkoBuild:
return (
dag.apko(image)
.build(tag, context, config)
)
@func()
example(image: string, tag: string, context: Directory, config: string): ApkoBuild {
return dag
.apko(image)
.build(tag, context, config)
}
publish() 🔗
Publish an image using Apko
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | Image tag |
context | Directory ! | - | Working dir |
config | String ! | "apko.yaml" | Config file |
arch | String | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string publish --tag string --context DIR_PATH --config string
func (m *myModule) example(image string, tag string, context *Directory, config string) *ApkoImage {
return dag.
Apko(image).
Publish(tag, context, config)
}
@function
def example(image: str, tag: str, context: dagger.Directory, config: str) -> dag.ApkoImage:
return (
dag.apko(image)
.publish(tag, context, config)
)
@func()
example(image: string, tag: string, context: Directory, config: string): ApkoImage {
return dag
.apko(image)
.publish(tag, context, config)
}
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" | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@327a52a86fa82c8a28102a10c27acac1525686a0 call \
--image string with-registry-auth --username string --secret env:MYSECRET
func (m *myModule) example(image string, username string, secret *Secret) *Apko {
return dag.
Apko(image).
WithRegistryAuth(username, secret)
}
@function
def example(image: str, username: str, secret: dagger.Secret) -> dag.Apko:
return (
dag.apko(image)
.with_registry_auth(username, secret)
)
@func()
example(image: string, username: string, secret: Secret): Apko {
return dag
.apko(image)
.withRegistryAuth(username, secret)
}