apko
Builds containers using the Apko CLI
Installation
dagger install github.com/opopops/daggerverse/apko@v1.6.2
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@07cecad7afb3d5266589817ca946bf431ab00c65 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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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 |
---|---|---|---|
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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
scan --fail boolean --output-format string
func (m *myModule) example(context *Directory, config *File, tag []string, fail bool, outputFormat string) *File {
return dag.
Apko().
Publish(context, config, tag).
Scan(fail, outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: List[str], fail: bool, output_format: str) -> dagger.File:
return (
dag.apko()
.publish(context, config, tag)
.scan(fail, output_format)
)
@func()
example(context: Directory, config: File, tag: string[], fail: boolean, outputFormat: string): File {
return dag
.apko()
.publish(context, config, tag)
.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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
sign
func (m *myModule) example(ctx context.Context, context *Directory, config *File, tag []string) string {
return dag.
Apko().
Publish(context, config, tag).
Sign(ctx)
}
@function
async def example(context: dagger.Directory, config: dagger.File, tag: List[str]) -> str:
return await (
dag.apko()
.publish(context, config, tag)
.sign()
)
@func()
async example(context: Directory, config: File, tag: string[]): Promise<string> {
return dag
.apko()
.publish(context, config, tag)
.sign()
}
tag() 🔗
Tag image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | String ! | - | Tag |
Example
dagger -m github.com/opopops/daggerverse/apko@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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 |
---|---|---|---|
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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
with-scan --fail boolean --output-format string
func (m *myModule) example(context *Directory, config *File, tag []string, fail bool, outputFormat string) *ApkoImage {
return dag.
Apko().
Publish(context, config, tag).
WithScan(fail, outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: List[str], fail: bool, output_format: str) -> dag.ApkoImage:
return (
dag.apko()
.publish(context, config, tag)
.with_scan(fail, output_format)
)
@func()
example(context: Directory, config: File, tag: string[], fail: boolean, outputFormat: string): ApkoImage {
return dag
.apko()
.publish(context, config, tag)
.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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
with-sign
func (m *myModule) example(context *Directory, config *File, tag []string) *ApkoImage {
return dag.
Apko().
Publish(context, config, tag).
WithSign()
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: List[str]) -> dag.ApkoImage:
return (
dag.apko()
.publish(context, config, tag)
.with_sign()
)
@func()
example(context: Directory, config: File, tag: string[]): ApkoImage {
return dag
.apko()
.publish(context, config, tag)
.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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
publish --context DIR_PATH --config file:path --tag string1 --tag string2 \
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: List[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
buildDir() 🔗
Returns the build directory
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@07cecad7afb3d5266589817ca946bf431ab00c65 call \
build --context DIR_PATH --config file:path --tag string \
build-dir
func (m *myModule) example(context *Directory, config *File, tag string) *Directory {
return dag.
Apko().
Build(context, config, tag).
BuildDir()
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str) -> dagger.Directory:
return (
dag.apko()
.build(context, config, tag)
.build_dir()
)
@func()
example(context: Directory, config: File, tag: string): Directory {
return dag
.apko()
.build(context, config, tag)
.buildDir()
}
publish() 🔗
Publish multi-arch image
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | [String ! ] ! | [] | Additional tags |
registryUsername | String | null | No description provided |
registryPassword | Secret | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/apko@07cecad7afb3d5266589817ca946bf431ab00c65 call \
build --context DIR_PATH --config file:path --tag string \
publish --tag string1 --tag string2
func (m *myModule) example(context *Directory, config *File, tag string, tag1 []string) *ApkoImage {
return dag.
Apko().
Build(context, config, tag).
Publish(tag1)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, tag1: List[str]) -> dag.ApkoImage:
return (
dag.apko()
.build(context, config, tag)
.publish(tag1)
)
@func()
example(context: Directory, config: File, tag: string, tag1: string[]): ApkoImage {
return dag
.apko()
.build(context, config, tag)
.publish(tag1)
}
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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
build --context DIR_PATH --config file:path --tag string \
scan --fail boolean --output-format string
func (m *myModule) example(context *Directory, config *File, tag string, fail bool, outputFormat string) *File {
return dag.
Apko().
Build(context, config, tag).
Scan(fail, outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, fail: bool, output_format: str) -> dagger.File:
return (
dag.apko()
.build(context, config, tag)
.scan(fail, output_format)
)
@func()
example(context: Directory, config: File, tag: string, fail: boolean, outputFormat: string): File {
return dag
.apko()
.build(context, config, tag)
.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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
build --context DIR_PATH --config file:path --tag string \
with-scan --fail boolean --output-format string
func (m *myModule) example(context *Directory, config *File, tag string, fail bool, outputFormat string) *ApkoBuild {
return dag.
Apko().
Build(context, config, tag).
WithScan(fail, outputFormat)
}
@function
def example(context: dagger.Directory, config: dagger.File, tag: str, fail: bool, output_format: str) -> dag.ApkoBuild:
return (
dag.apko()
.build(context, config, tag)
.with_scan(fail, output_format)
)
@func()
example(context: Directory, config: File, tag: string, fail: boolean, outputFormat: string): ApkoBuild {
return dag
.apko()
.build(context, config, tag)
.withScan(fail, outputFormat)
}
Apko 🔗
Apko module
image() 🔗
wolfi-base image
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@07cecad7afb3d5266589817ca946bf431ab00c65 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@07cecad7afb3d5266589817ca946bf431ab00c65 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@07cecad7afb3d5266589817ca946bf431ab00c65 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@07cecad7afb3d5266589817ca946bf431ab00c65 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@07cecad7afb3d5266589817ca946bf431ab00c65 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@07cecad7afb3d5266589817ca946bf431ab00c65 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 tags |
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@07cecad7afb3d5266589817ca946bf431ab00c65 call \
--image string publish --context DIR_PATH --config file:path --tag string1 --tag string2
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: List[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@07cecad7afb3d5266589817ca946bf431ab00c65 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)
}