apko
Builds containers using the Apko CLI
Installation
dagger install github.com/opopops/daggerverse/apko@v1.5.5
Entrypoint
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | "cgr.dev/chainguard/wolfi-base:latest" | wolfi-base image |
version | String | null | No description provided |
user | String | "65532" | No description provided |
registryUsername | String | null | No description provided |
registryPassword | Secret | null | No description provided |
container | Container | null | No description provided |
credentials | [List ! ] | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 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
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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
container
func (m *myModule) example(context *Directory, config *File, tag string) *Container {
return dag.
Apko().
Publish(context, config, tag).
Container()
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str) -> dagger.Container:
return (
dag.apko()
.publish(context, config, tag)
.container()
)
@func()
example(context: Directory, config: File, tag: string): Container {
return dag
.apko()
.publish(context, config, tag)
.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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
copy --target string
func (m *myModule) example(ctx context.Context, context *Directory, config *File, tag string, target string) string {
return dag.
Apko().
Publish(context, config, tag).
Copy(ctx, target)
}
@function
async def example(context: dagger.Directory, config: dagger.File, tag: str, target: str) -> str:
return await (
dag.apko()
.publish(context, config, tag)
.copy(target)
)
@func()
async example(context: Directory, config: File, tag: string, target: string): Promise<string> {
return dag
.apko()
.publish(context, config, tag)
.copy(target)
}
digest() 🔗
Retrieves the image digest
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
digest
func (m *myModule) example(ctx context.Context, context *Directory, config *File, tag string) string {
return dag.
Apko().
Publish(context, config, tag).
Digest(ctx)
}
@function
async def example(context: dagger.Directory, config: dagger.File, tag: str) -> str:
return await (
dag.apko()
.publish(context, config, tag)
.digest()
)
@func()
async example(context: Directory, config: File, tag: string): Promise<string> {
return dag
.apko()
.publish(context, config, tag)
.digest()
}
platforms() 🔗
Retrieves image platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
platforms
func (m *myModule) example(context *Directory, config *File, tag string) [] {
return dag.
Apko().
Publish(context, config, tag).
Platforms()
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str) -> List[]:
return (
dag.apko()
.publish(context, config, tag)
.platforms()
)
@func()
example(context: Directory, config: File, tag: string): [] {
return dag
.apko()
.publish(context, config, tag)
.platforms()
}
ref() 🔗
Retrieves the fully qualified image ref
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
ref
func (m *myModule) example(ctx context.Context, context *Directory, config *File, tag string) string {
return dag.
Apko().
Publish(context, config, tag).
Ref(ctx)
}
@function
async def example(context: dagger.Directory, config: dagger.File, tag: str) -> str:
return await (
dag.apko()
.publish(context, config, tag)
.ref()
)
@func()
async example(context: Directory, config: File, tag: string): Promise<string> {
return dag
.apko()
.publish(context, config, tag)
.ref()
}
registry() 🔗
Retrieves the registry host from image address
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
registry
func (m *myModule) example(ctx context.Context, context *Directory, config *File, tag string) string {
return dag.
Apko().
Publish(context, config, tag).
Registry(ctx)
}
@function
async def example(context: dagger.Directory, config: dagger.File, tag: str) -> str:
return await (
dag.apko()
.publish(context, config, tag)
.registry()
)
@func()
async example(context: Directory, config: File, tag: string): Promise<string> {
return dag
.apko()
.publish(context, config, tag)
.registry()
}
scan() 🔗
Scan image using Grype
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
failOn | String | null | No description provided |
outputFormat | String ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
scan --output-format string
func (m *myModule) example(context *Directory, config *File, tag string, outputFormat string) *File {
return dag.
Apko().
Publish(context, config, tag).
Scan(outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, output_format: str) -> dagger.File:
return (
dag.apko()
.publish(context, config, tag)
.scan(output_format)
)
@func()
example(context: Directory, config: File, tag: string, outputFormat: string): File {
return dag
.apko()
.publish(context, config, tag)
.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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
sign --private-key env:MYSECRET --password env:MYSECRET --recursive boolean
func (m *myModule) example(ctx context.Context, context *Directory, config *File, tag string, privateKey *Secret, password *Secret, recursive bool) string {
return dag.
Apko().
Publish(context, config, tag).
Sign(ctx, privateKey, password, recursive)
}
@function
async def example(context: dagger.Directory, config: dagger.File, tag: str, private_key: dagger.Secret, password: dagger.Secret, recursive: bool) -> str:
return await (
dag.apko()
.publish(context, config, tag)
.sign(private_key, password, recursive)
)
@func()
async example(context: Directory, config: File, tag: string, privateKey: Secret, password: Secret, recursive: boolean): Promise<string> {
return dag
.apko()
.publish(context, config, tag)
.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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
tag --tag string
func (m *myModule) example(ctx context.Context, context *Directory, config *File, tag string, tag1 string) string {
return dag.
Apko().
Publish(context, config, tag).
Tag(ctx, tag1)
}
@function
async def example(context: dagger.Directory, config: dagger.File, tag: str, tag1: str) -> str:
return await (
dag.apko()
.publish(context, config, tag)
.tag(tag1)
)
@func()
async example(context: Directory, config: File, tag: string, tag1: string): Promise<string> {
return dag
.apko()
.publish(context, config, tag)
.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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
with-copy --target string
func (m *myModule) example(context *Directory, config *File, tag string, target string) *ApkoImage {
return dag.
Apko().
Publish(context, config, tag).
WithCopy(target)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, target: str) -> dag.ApkoImage:
return (
dag.apko()
.publish(context, config, tag)
.with_copy(target)
)
@func()
example(context: Directory, config: File, tag: string, target: string): ApkoImage {
return dag
.apko()
.publish(context, config, tag)
.withCopy(target)
}
withScan() 🔗
Scan image using Grype (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
failOn | String | null | No description provided |
outputFormat | String ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
with-scan --output-format string
func (m *myModule) example(context *Directory, config *File, tag string, outputFormat string) *ApkoImage {
return dag.
Apko().
Publish(context, config, tag).
WithScan(outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, output_format: str) -> dag.ApkoImage:
return (
dag.apko()
.publish(context, config, tag)
.with_scan(output_format)
)
@func()
example(context: Directory, config: File, tag: string, outputFormat: string): ApkoImage {
return dag
.apko()
.publish(context, config, tag)
.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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
with-sign --private-key env:MYSECRET --password env:MYSECRET --recursive boolean
func (m *myModule) example(context *Directory, config *File, tag string, privateKey *Secret, password *Secret, recursive bool) *ApkoImage {
return dag.
Apko().
Publish(context, config, tag).
WithSign(privateKey, password, recursive)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, private_key: dagger.Secret, password: dagger.Secret, recursive: bool) -> dag.ApkoImage:
return (
dag.apko()
.publish(context, config, tag)
.with_sign(private_key, password, recursive)
)
@func()
example(context: Directory, config: File, tag: string, privateKey: Secret, password: Secret, recursive: boolean): ApkoImage {
return dag
.apko()
.publish(context, config, tag)
.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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
publish --context DIR_PATH --config file:path --tag string \
with-tag --tag string
func (m *myModule) example(context *Directory, config *File, tag string, tag1 string) *ApkoImage {
return dag.
Apko().
Publish(context, config, tag).
WithTag(tag1)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, tag1: str) -> dag.ApkoImage:
return (
dag.apko()
.publish(context, config, tag)
.with_tag(tag1)
)
@func()
example(context: Directory, config: File, tag: string, tag1: string): ApkoImage {
return dag
.apko()
.publish(context, config, tag)
.withTag(tag1)
}
Build 🔗
Apko Build module
ociDir() 🔗
Returns the image OCI layout directory
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
build --context DIR_PATH --config file:path --tag string \
oci-dir
func (m *myModule) example(context *Directory, config *File, tag string) *Directory {
return dag.
Apko().
Build(context, config, tag).
OciDir()
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str) -> dagger.Directory:
return (
dag.apko()
.build(context, config, tag)
.oci_dir()
)
@func()
example(context: Directory, config: File, tag: string): Directory {
return dag
.apko()
.build(context, config, tag)
.ociDir()
}
publish() 🔗
Publish multi-arch image
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
registryUsername | String | null | No description provided |
registryPassword | Secret | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
build --context DIR_PATH --config file:path --tag string \
publish
func (m *myModule) example(context *Directory, config *File, tag string) *ApkoImage {
return dag.
Apko().
Build(context, config, tag).
Publish()
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str) -> dag.ApkoImage:
return (
dag.apko()
.build(context, config, tag)
.publish()
)
@func()
example(context: Directory, config: File, tag: string): ApkoImage {
return dag
.apko()
.build(context, config, tag)
.publish()
}
sbom() 🔗
Returns SBOM
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
build --context DIR_PATH --config file:path --tag string \
sbom
func (m *myModule) example(context *Directory, config *File, tag string) *Directory {
return dag.
Apko().
Build(context, config, tag).
Sbom()
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str) -> dagger.Directory:
return (
dag.apko()
.build(context, config, tag)
.sbom()
)
@func()
example(context: Directory, config: File, tag: string): Directory {
return dag
.apko()
.build(context, config, tag)
.sbom()
}
scan() 🔗
Scan build result using Grype
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
failOn | String | null | No description provided |
outputFormat | String ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
build --context DIR_PATH --config file:path --tag string \
scan --output-format string
func (m *myModule) example(context *Directory, config *File, tag string, outputFormat string) *File {
return dag.
Apko().
Build(context, config, tag).
Scan(outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, output_format: str) -> dagger.File:
return (
dag.apko()
.build(context, config, tag)
.scan(output_format)
)
@func()
example(context: Directory, config: File, tag: string, outputFormat: string): File {
return dag
.apko()
.build(context, config, tag)
.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 ! | "sarif" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
build --context DIR_PATH --config file:path --tag string \
with-scan --output-format string
func (m *myModule) example(context *Directory, config *File, tag string, outputFormat string) *ApkoBuild {
return dag.
Apko().
Build(context, config, tag).
WithScan(outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, output_format: str) -> dag.ApkoBuild:
return (
dag.apko()
.build(context, config, tag)
.with_scan(output_format)
)
@func()
example(context: Directory, config: File, tag: string, outputFormat: string): ApkoBuild {
return dag
.apko()
.build(context, config, tag)
.withScan(outputFormat)
}
Apko 🔗
Apko module
image() 🔗
wolfi-base image
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 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()
}
version() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
--image string version
func (m *myModule) example(ctx context.Context, image string) string {
return dag.
Apko(image).
Version(ctx)
}
@function
async def example(image: str, ) -> str:
return await (
dag.apko(image)
.version()
)
@func()
async example(image: string, ): Promise<string> {
return dag
.apko(image)
.version()
}
user() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 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()
}
registryUsername() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
--image string registry-username
func (m *myModule) example(ctx context.Context, image string) string {
return dag.
Apko(image).
RegistryUsername(ctx)
}
@function
async def example(image: str, ) -> str:
return await (
dag.apko(image)
.registry_username()
)
@func()
async example(image: string, ): Promise<string> {
return dag
.apko(image)
.registryUsername()
}
registryPassword() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
--image string registry-password
func (m *myModule) example(image string) *Secret {
return dag.
Apko(image).
RegistryPassword()
}
@function
def example(image: str, ) -> dagger.Secret:
return (
dag.apko(image)
.registry_password()
)
@func()
example(image: string, ): Secret {
return dag
.apko(image)
.registryPassword()
}
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 | null | No description provided |
keyringAppend | File | null | No description provided |
repositoryAppend | Directory | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
--image string build --context DIR_PATH --config file:path --tag string
func (m *myModule) example(image string, context *Directory, config *File, tag string) *ApkoBuild {
return dag.
Apko(image).
Build(context, config, tag)
}
@function
def example(image: str, context: dagger.Directory, config: dagger.File, tag: str) -> dag.ApkoBuild:
return (
dag.apko(image)
.build(context, config, tag)
)
@func()
example(image: string, context: Directory, config: File, tag: string): ApkoBuild {
return dag
.apko(image)
.build(context, config, tag)
}
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 tag |
sbom | Boolean | true | No description provided |
arch | String | null | No description provided |
local | Boolean | false | No description provided |
keyringAppend | File | null | No description provided |
repositoryAppend | Directory | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 call \
--image string publish --context DIR_PATH --config file:path --tag string
func (m *myModule) example(image string, context *Directory, config *File, tag string) *ApkoImage {
return dag.
Apko(image).
Publish(context, config, tag)
}
@function
def example(image: str, context: dagger.Directory, config: dagger.File, tag: str) -> dag.ApkoImage:
return (
dag.apko(image)
.publish(context, config, tag)
)
@func()
example(image: string, context: Directory, config: File, tag: string): ApkoImage {
return dag
.apko(image)
.publish(context, config, tag)
}
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@078d3e017bd37e1efc26da3ac41c11cbfe8a1829 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)
}