apko
Builds containers using the Apko CLI
Installation
dagger install github.com/opopops/daggerverse/apko@v1.16.0
Entrypoint
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String | "cgr.dev/chainguard/wolfi-base:latest" | wolfi-base image |
version | String | "latest" | Apko version |
user | String | "nonroot" | Image user |
source | Directory | null | Work directory |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
func (m *MyModule) Example() *dagger.Apko {
return dag.
Apko()
}
@function
def example() -> dagger.Apko:
return (
dag.apko()
)
@func()
example(): Apko {
return dag
.apko()
}
Types
Cli 🔗
Apko CLI
image() 🔗
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
image
func (m *MyModule) Example(ctx context.Context) string {
return dag.
Apko().
Apko().
Image(ctx)
}
@function
async def example() -> str:
return await (
dag.apko()
.apko()
.image()
)
@func()
async example(): Promise<string> {
return dag
.apko()
.apko()
.image()
}
user() 🔗
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
user
func (m *MyModule) Example(ctx context.Context) string {
return dag.
Apko().
Apko().
User(ctx)
}
@function
async def example() -> str:
return await (
dag.apko()
.apko()
.user()
)
@func()
async example(): Promise<string> {
return dag
.apko()
.apko()
.user()
}
version() 🔗
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
version
func (m *MyModule) Example(ctx context.Context) string {
return dag.
Apko().
Apko().
Version(ctx)
}
@function
async def example() -> str:
return await (
dag.apko()
.apko()
.version()
)
@func()
async example(): Promise<string> {
return dag
.apko()
.apko()
.version()
}
container() 🔗
Returns the container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
container
func (m *MyModule) Example() *dagger.Container {
return dag.
Apko().
Apko().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.apko()
.apko()
.container()
)
@func()
example(): Container {
return dag
.apko()
.apko()
.container()
}
dockerConfig() 🔗
Returns the Docker config file
Return Type
File !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
docker-config
func (m *MyModule) Example() *dagger.File {
return dag.
Apko().
Apko().
DockerConfig()
}
@function
def example() -> dagger.File:
return (
dag.apko()
.apko()
.docker_config()
)
@func()
example(): File {
return dag
.apko()
.apko()
.dockerConfig()
}
withDockerConfig() 🔗
Set Docker config file (for chaining)
Return Type
Cli !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dockerConfig | File ! | - | Docker config file |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
with-docker-config --docker-config file:path
func (m *MyModule) Example(dockerConfig *dagger.File) *dagger.ApkoCli {
return dag.
Apko().
Apko().
WithDockerConfig(dockerConfig)
}
@function
def example(docker_config: dagger.File) -> dagger.ApkoCli:
return (
dag.apko()
.apko()
.with_docker_config(docker_config)
)
@func()
example(dockerConfig: File): ApkoCli {
return dag
.apko()
.apko()
.withDockerConfig(dockerConfig)
}
withDockerSocket() 🔗
Retrieves this Apko CLI plus a socket forwarded to the given Unix socket path
Return Type
Cli !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Socket ! | - | Identifier of the Docker socket to forward |
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(source *dagger.Socket) *dagger.ApkoCli {
return dag.
Apko().
Apko().
WithDockerSocket(source)
}
@function
def example(source: dagger.Socket) -> dagger.ApkoCli:
return (
dag.apko()
.apko()
.with_docker_socket(source)
)
@func()
example(source: Socket): ApkoCli {
return dag
.apko()
.apko()
.withDockerSocket(source)
}
withEnvVariable() 🔗
Set a new environment variable in the Apko container
Return Type
Cli !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | Name of the environment variable |
value | String ! | - | Value of the environment variable |
expand | Boolean | false | Replace “${VAR}” or “$VAR” in the value according to the current environment variables defined in the container |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
with-env-variable --name string --value string
func (m *MyModule) Example(name string, value string) *dagger.ApkoCli {
return dag.
Apko().
Apko().
WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dagger.ApkoCli:
return (
dag.apko()
.apko()
.with_env_variable(name, value)
)
@func()
example(name: string, value: string): ApkoCli {
return dag
.apko()
.apko()
.withEnvVariable(name, value)
}
withRegistryAuth() 🔗
Authenticates with registry
Return Type
Cli !
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@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
with-registry-auth --username string --secret env:MYSECRET
func (m *MyModule) Example(username string, secret *dagger.Secret) *dagger.ApkoCli {
return dag.
Apko().
Apko().
WithRegistryAuth(username, secret)
}
@function
def example(username: str, secret: dagger.Secret) -> dagger.ApkoCli:
return (
dag.apko()
.apko()
.with_registry_auth(username, secret)
)
@func()
example(username: string, secret: Secret): ApkoCli {
return dag
.apko()
.apko()
.withRegistryAuth(username, secret)
}
withSecretVariable() 🔗
Set a new environment variable, using a secret value
Return Type
Cli !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | Name of the secret variable |
secret | Secret ! | - | Identifier of the secret value |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko \
with-secret-variable --name string --secret env:MYSECRET
func (m *MyModule) Example(name string, secret *dagger.Secret) *dagger.ApkoCli {
return dag.
Apko().
Apko().
WithSecretVariable(name, secret)
}
@function
def example(name: str, secret: dagger.Secret) -> dagger.ApkoCli:
return (
dag.apko()
.apko()
.with_secret_variable(name, secret)
)
@func()
example(name: string, secret: Secret): ApkoCli {
return dag
.apko()
.apko()
.withSecretVariable(name, secret)
}
Sbom 🔗
SBOM files
directory() 🔗
Returns the SBOM directory
Return Type
Directory !
Example
Function ApkoSbom.directory is not accessible from the apko module
Function ApkoSbom.directory is not accessible from the apko module
Function ApkoSbom.directory is not accessible from the apko module
Function ApkoSbom.directory is not accessible from the apko module
file() 🔗
Returns the SBOM file for the specified platform (index if not specified)
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
Function ApkoSbom.file is not accessible from the apko module
Function ApkoSbom.file is not accessible from the apko module
Function ApkoSbom.file is not accessible from the apko module
Function ApkoSbom.file is not accessible from the apko module
Image 🔗
Image
address() 🔗
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
address
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string) string {
return dag.
Apko().
Publish(config, tag).
Address(ctx)
}
@function
async def example(config: dagger.File, tag: List[str]) -> str:
return await (
dag.apko()
.publish(config, tag)
.address()
)
@func()
async example(config: File, tag: string[]): Promise<string> {
return dag
.apko()
.publish(config, tag)
.address()
}
attest() 🔗
Attest image SBOMs with Cosign
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret | null | Cosign private key |
password | Secret | null | Cosign password |
identityToken | Secret | null | Cosign identity token |
oidcProvider | String | "" | Specify the provider to get the OIDC token from |
oidcIssuer | String | "" | OIDC provider to be used to issue ID toke |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
attest
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string) string {
return dag.
Apko().
Publish(config, tag).
Attest(ctx)
}
@function
async def example(config: dagger.File, tag: List[str]) -> str:
return await (
dag.apko()
.publish(config, tag)
.attest()
)
@func()
async example(config: File, tag: string[]): Promise<string> {
return dag
.apko()
.publish(config, tag)
.attest()
}
container() 🔗
Returns the container for the specified platform (current platform if not specified)
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
container
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.Container {
return dag.
Apko().
Publish(config, tag).
Container()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.Container:
return (
dag.apko()
.publish(config, tag)
.container()
)
@func()
example(config: File, tag: string[]): Container {
return dag
.apko()
.publish(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@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
copy --target string
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, target string) string {
return dag.
Apko().
Publish(config, tag).
Copy(ctx, target)
}
@function
async def example(config: dagger.File, tag: List[str], target: str) -> str:
return await (
dag.apko()
.publish(config, tag)
.copy(target)
)
@func()
async example(config: File, tag: string[], target: string): Promise<string> {
return dag
.apko()
.publish(config, tag)
.copy(target)
}
digest() 🔗
Retrieves the image digest
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
digest
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string) string {
return dag.
Apko().
Publish(config, tag).
Digest(ctx)
}
@function
async def example(config: dagger.File, tag: List[str]) -> str:
return await (
dag.apko()
.publish(config, tag)
.digest()
)
@func()
async example(config: File, tag: string[]): Promise<string> {
return dag
.apko()
.publish(config, tag)
.digest()
}
platforms() 🔗
Retrieves image platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
platforms
func (m *MyModule) Example(config *dagger.File, tag []string) [] {
return dag.
Apko().
Publish(config, tag).
Platforms()
}
@function
def example(config: dagger.File, tag: List[str]) -> List[]:
return (
dag.apko()
.publish(config, tag)
.platforms()
)
@func()
example(config: File, tag: string[]): [] {
return dag
.apko()
.publish(config, tag)
.platforms()
}
ref() 🔗
Retrieves the fully qualified image ref
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
ref
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string) string {
return dag.
Apko().
Publish(config, tag).
Ref(ctx)
}
@function
async def example(config: dagger.File, tag: List[str]) -> str:
return await (
dag.apko()
.publish(config, tag)
.ref()
)
@func()
async example(config: File, tag: string[]): Promise<string> {
return dag
.apko()
.publish(config, tag)
.ref()
}
registry() 🔗
Retrieves the registry host from image address
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
registry
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string) string {
return dag.
Apko().
Publish(config, tag).
Registry(ctx)
}
@function
async def example(config: dagger.File, tag: List[str]) -> str:
return await (
dag.apko()
.publish(config, tag)
.registry()
)
@func()
async example(config: File, tag: string[]): Promise<string> {
return dag
.apko()
.publish(config, tag)
.registry()
}
sbom() 🔗
Returns the SBOM directory
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
sbom
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.Directory {
return dag.
Apko().
Publish(config, tag).
Sbom()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.Directory:
return (
dag.apko()
.publish(config, tag)
.sbom()
)
@func()
example(config: File, tag: string[]): Directory {
return dag
.apko()
.publish(config, tag)
.sbom()
}
sbomFile() 🔗
Return the SBOM for the specified platform (index if not specified)
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
sbom-file
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.File {
return dag.
Apko().
Publish(config, tag).
SbomFile()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.File:
return (
dag.apko()
.publish(config, tag)
.sbom_file()
)
@func()
example(config: File, tag: string[]): File {
return dag
.apko()
.publish(config, tag)
.sbomFile()
}
scan() 🔗
Scan image using Grype
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severity | String | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
scan
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.File {
return dag.
Apko().
Publish(config, tag).
Scan()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.File:
return (
dag.apko()
.publish(config, tag)
.scan()
)
@func()
example(config: File, tag: string[]): File {
return dag
.apko()
.publish(config, tag)
.scan()
}
sign() 🔗
Sign image with Cosign
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret | null | Cosign private key |
password | Secret | null | Cosign password |
identityToken | Secret | null | Cosign identity token |
oidcProvider | String | "" | Specify the provider to get the OIDC token from |
oidcIssuer | String | "" | OIDC provider to be used to issue ID toke |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
sign
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string) string {
return dag.
Apko().
Publish(config, tag).
Sign(ctx)
}
@function
async def example(config: dagger.File, tag: List[str]) -> str:
return await (
dag.apko()
.publish(config, tag)
.sign()
)
@func()
async example(config: File, tag: string[]): Promise<string> {
return dag
.apko()
.publish(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@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
tag --tag string
func (m *MyModule) Example(ctx context.Context, config *dagger.File, tag []string, tag1 string) string {
return dag.
Apko().
Publish(config, tag).
Tag(ctx, tag1)
}
@function
async def example(config: dagger.File, tag: List[str], tag1: str) -> str:
return await (
dag.apko()
.publish(config, tag)
.tag(tag1)
)
@func()
async example(config: File, tag: string[], tag1: string): Promise<string> {
return dag
.apko()
.publish(config, tag)
.tag(tag1)
}
tarball() 🔗
Returns the container tarball for the specified platform
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
tarball
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.File {
return dag.
Apko().
Publish(config, tag).
Tarball()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.File:
return (
dag.apko()
.publish(config, tag)
.tarball()
)
@func()
example(config: File, tag: string[]): File {
return dag
.apko()
.publish(config, tag)
.tarball()
}
withAttest() 🔗
Attest image SBOMs with Cosign (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret | null | Cosign private key |
password | Secret | null | Cosign password |
identityToken | Secret | null | Cosign identity token |
oidcProvider | String | "" | Specify the provider to get the OIDC token from |
oidcIssuer | String | "" | OIDC provider to be used to issue ID toke |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
with-attest
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag).
WithAttest()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag)
.with_attest()
)
@func()
example(config: File, tag: string[]): ApkoImage {
return dag
.apko()
.publish(config, tag)
.withAttest()
}
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@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
with-copy --target string
func (m *MyModule) Example(config *dagger.File, tag []string, target string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag).
WithCopy(target)
}
@function
def example(config: dagger.File, tag: List[str], target: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag)
.with_copy(target)
)
@func()
example(config: File, tag: string[], target: string): ApkoImage {
return dag
.apko()
.publish(config, tag)
.withCopy(target)
}
withRegistryAuth() 🔗
Authenticates with registry
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | Registry username |
secret | Secret ! | - | Registry password |
address | String | "docker.io" | Registry host |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
with-registry-auth --username string --secret env:MYSECRET
func (m *MyModule) Example(config *dagger.File, tag []string, username string, secret *dagger.Secret) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag).
WithRegistryAuth(username, secret)
}
@function
def example(config: dagger.File, tag: List[str], username: str, secret: dagger.Secret) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag)
.with_registry_auth(username, secret)
)
@func()
example(config: File, tag: string[], username: string, secret: Secret): ApkoImage {
return dag
.apko()
.publish(config, tag)
.withRegistryAuth(username, secret)
}
withScan() 🔗
Scan image using Grype (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severity | String | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
with-scan
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag).
WithScan()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag)
.with_scan()
)
@func()
example(config: File, tag: string[]): ApkoImage {
return dag
.apko()
.publish(config, tag)
.withScan()
}
withSign() 🔗
Sign image with Cosign (for chaining)
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateKey | Secret | null | Cosign private key |
password | Secret | null | Cosign password |
identityToken | Secret | null | Cosign identity token |
oidcProvider | String | "" | Specify the provider to get the OIDC token from |
oidcIssuer | String | "" | OIDC provider to be used to issue ID toke |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
with-sign
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag).
WithSign()
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag)
.with_sign()
)
@func()
example(config: File, tag: string[]): ApkoImage {
return dag
.apko()
.publish(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@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2 \
with-tag --tag string
func (m *MyModule) Example(config *dagger.File, tag []string, tag1 string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag).
WithTag(tag1)
}
@function
def example(config: dagger.File, tag: List[str], tag1: str) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag)
.with_tag(tag1)
)
@func()
example(config: File, tag: string[], tag1: string): ApkoImage {
return dag
.apko()
.publish(config, tag)
.withTag(tag1)
}
Build 🔗
Apko Build
asDirectory() 🔗
Returns the build as directory including tarball and sbom dir
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
as-directory
func (m *MyModule) Example(config *dagger.File) *dagger.Directory {
return dag.
Apko().
Build(config).
AsDirectory()
}
@function
def example(config: dagger.File) -> dagger.Directory:
return (
dag.apko()
.build(config)
.as_directory()
)
@func()
example(config: File): Directory {
return dag
.apko()
.build(config)
.asDirectory()
}
asTarball() 🔗
Returns the build as tarball
Return Type
File !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
as-tarball
func (m *MyModule) Example(config *dagger.File) *dagger.File {
return dag.
Apko().
Build(config).
AsTarball()
}
@function
def example(config: dagger.File) -> dagger.File:
return (
dag.apko()
.build(config)
.as_tarball()
)
@func()
example(config: File): File {
return dag
.apko()
.build(config)
.asTarball()
}
container() 🔗
Returns the container for the specified platform (current platform if not specified)
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
container
func (m *MyModule) Example(config *dagger.File) *dagger.Container {
return dag.
Apko().
Build(config).
Container()
}
@function
def example(config: dagger.File) -> dagger.Container:
return (
dag.apko()
.build(config)
.container()
)
@func()
example(config: File): Container {
return dag
.apko()
.build(config)
.container()
}
platforms() 🔗
Retrieves build platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
platforms
func (m *MyModule) Example(config *dagger.File) [] {
return dag.
Apko().
Build(config).
Platforms()
}
@function
def example(config: dagger.File) -> List[]:
return (
dag.apko()
.build(config)
.platforms()
)
@func()
example(config: File): [] {
return dag
.apko()
.build(config)
.platforms()
}
publish() 🔗
Publish image
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tag | [String ! ] ! | - | Tags |
force | Boolean | false | Force image publishing (invalidate cache) |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
publish --tag string1 --tag string2
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.ApkoImage {
return dag.
Apko().
Build(config).
Publish(tag)
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.ApkoImage:
return (
dag.apko()
.build(config)
.publish(tag)
)
@func()
example(config: File, tag: string[]): ApkoImage {
return dag
.apko()
.build(config)
.publish(tag)
}
sbom() 🔗
Returns the SBOM directory
Return Type
Directory !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
sbom
func (m *MyModule) Example(config *dagger.File) *dagger.Directory {
return dag.
Apko().
Build(config).
Sbom()
}
@function
def example(config: dagger.File) -> dagger.Directory:
return (
dag.apko()
.build(config)
.sbom()
)
@func()
example(config: File): Directory {
return dag
.apko()
.build(config)
.sbom()
}
sbomFile() 🔗
Returns the SBOM for the specified platform (index if not specified)
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
sbom-file
func (m *MyModule) Example(config *dagger.File) *dagger.File {
return dag.
Apko().
Build(config).
SbomFile()
}
@function
def example(config: dagger.File) -> dagger.File:
return (
dag.apko()
.build(config)
.sbom_file()
)
@func()
example(config: File): File {
return dag
.apko()
.build(config)
.sbomFile()
}
scan() 🔗
Scan build result using Grype
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severity | String | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
scan
func (m *MyModule) Example(config *dagger.File) *dagger.File {
return dag.
Apko().
Build(config).
Scan()
}
@function
def example(config: dagger.File) -> dagger.File:
return (
dag.apko()
.build(config)
.scan()
)
@func()
example(config: File): File {
return dag
.apko()
.build(config)
.scan()
}
tarball() 🔗
Returns the container tarball for the specified platform
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | null | Platform |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
tarball
func (m *MyModule) Example(config *dagger.File) *dagger.File {
return dag.
Apko().
Build(config).
Tarball()
}
@function
def example(config: dagger.File) -> dagger.File:
return (
dag.apko()
.build(config)
.tarball()
)
@func()
example(config: File): File {
return dag
.apko()
.build(config)
.tarball()
}
withRegistryAuth() 🔗
Authenticates with registry
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | Registry username |
secret | Secret ! | - | Registry password |
address | String | "docker.io" | Registry host |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
with-registry-auth --username string --secret env:MYSECRET
func (m *MyModule) Example(config *dagger.File, username string, secret *dagger.Secret) *dagger.ApkoBuild {
return dag.
Apko().
Build(config).
WithRegistryAuth(username, secret)
}
@function
def example(config: dagger.File, username: str, secret: dagger.Secret) -> dagger.ApkoBuild:
return (
dag.apko()
.build(config)
.with_registry_auth(username, secret)
)
@func()
example(config: File, username: string, secret: Secret): ApkoBuild {
return dag
.apko()
.build(config)
.withRegistryAuth(username, secret)
}
withScan() 🔗
Scan build result using Grype (for chaining)
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
severity | String | "" | Specify the minimum vulnerability severity to trigger an error |
fail | Boolean | true | Set to false to avoid failing based on severity-cutoff |
outputFormat | String | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path \
with-scan
func (m *MyModule) Example(config *dagger.File) *dagger.ApkoBuild {
return dag.
Apko().
Build(config).
WithScan()
}
@function
def example(config: dagger.File) -> dagger.ApkoBuild:
return (
dag.apko()
.build(config)
.with_scan()
)
@func()
example(config: File): ApkoBuild {
return dag
.apko()
.build(config)
.withScan()
}
Config 🔗
Apko Config
authors() 🔗
Returns the authors from ‘org.opencontainers.image.authors’ annotation
Return Type
[String ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
authors
func (m *MyModule) Example(ctx context.Context, config *dagger.File) []string {
return dag.
Apko().
Config(config).
Authors(ctx)
}
@function
async def example(config: dagger.File) -> List[str]:
return await (
dag.apko()
.config(config)
.authors()
)
@func()
async example(config: File): Promise<string[]> {
return dag
.apko()
.config(config)
.authors()
}
description() 🔗
Returns the description from ‘org.opencontainers.image.description’ annotation
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
description
func (m *MyModule) Example(ctx context.Context, config *dagger.File) string {
return dag.
Apko().
Config(config).
Description(ctx)
}
@function
async def example(config: dagger.File) -> str:
return await (
dag.apko()
.config(config)
.description()
)
@func()
async example(config: File): Promise<string> {
return dag
.apko()
.config(config)
.description()
}
file() 🔗
Returns the full Apko config file
Return Type
File !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
file
func (m *MyModule) Example(config *dagger.File) *dagger.File {
return dag.
Apko().
Config(config).
File()
}
@function
def example(config: dagger.File) -> dagger.File:
return (
dag.apko()
.config(config)
.file()
)
@func()
example(config: File): File {
return dag
.apko()
.config(config)
.file()
}
licenses() 🔗
Returns the licenses from ‘org.opencontainers.image.licenses’ annotation
Return Type
[String ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
licenses
func (m *MyModule) Example(ctx context.Context, config *dagger.File) []string {
return dag.
Apko().
Config(config).
Licenses(ctx)
}
@function
async def example(config: dagger.File) -> List[str]:
return await (
dag.apko()
.config(config)
.licenses()
)
@func()
async example(config: File): Promise<string[]> {
return dag
.apko()
.config(config)
.licenses()
}
platforms() 🔗
Returns the platforms
Return Type
[Scalar ! ] !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
platforms
func (m *MyModule) Example(config *dagger.File) [] {
return dag.
Apko().
Config(config).
Platforms()
}
@function
def example(config: dagger.File) -> List[]:
return (
dag.apko()
.config(config)
.platforms()
)
@func()
example(config: File): [] {
return dag
.apko()
.config(config)
.platforms()
}
source() 🔗
Returns the source from ‘org.opencontainers.image.source’ annotation
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
source
func (m *MyModule) Example(ctx context.Context, config *dagger.File) string {
return dag.
Apko().
Config(config).
Source(ctx)
}
@function
async def example(config: dagger.File) -> str:
return await (
dag.apko()
.config(config)
.source()
)
@func()
async example(config: File): Promise<string> {
return dag
.apko()
.config(config)
.source()
}
title() 🔗
Returns the title from ‘org.opencontainers.image.title’ annotation
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
title
func (m *MyModule) Example(ctx context.Context, config *dagger.File) string {
return dag.
Apko().
Config(config).
Title(ctx)
}
@function
async def example(config: dagger.File) -> str:
return await (
dag.apko()
.config(config)
.title()
)
@func()
async example(config: File): Promise<string> {
return dag
.apko()
.config(config)
.title()
}
vendor() 🔗
Returns the vendor from ‘org.opencontainers.image.vendor’ annotation
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
vendor
func (m *MyModule) Example(ctx context.Context, config *dagger.File) string {
return dag.
Apko().
Config(config).
Vendor(ctx)
}
@function
async def example(config: dagger.File) -> str:
return await (
dag.apko()
.config(config)
.vendor()
)
@func()
async example(config: File): Promise<string> {
return dag
.apko()
.config(config)
.vendor()
}
version() 🔗
Returns the version from ‘org.opencontainers.image.version’ annotation
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path \
version
func (m *MyModule) Example(ctx context.Context, config *dagger.File) string {
return dag.
Apko().
Config(config).
Version(ctx)
}
@function
async def example(config: dagger.File) -> str:
return await (
dag.apko()
.config(config)
.version()
)
@func()
async example(config: File): Promise<string> {
return dag
.apko()
.config(config)
.version()
}
Apko 🔗
Apko module
apko() 🔗
Returns the Apko CLI
Return Type
Cli !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
apko
func (m *MyModule) Example() *dagger.ApkoCli {
return dag.
Apko().
Apko()
}
@function
def example() -> dagger.ApkoCli:
return (
dag.apko()
.apko()
)
@func()
example(): ApkoCli {
return dag
.apko()
.apko()
}
build() 🔗
Build an image using Apko
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | Config file |
tag | String | "apko-build" | Image tag |
includePaths | [Directory ! ] | [] | Additional include paths where to look for input files |
keyringAppend | [File ! ] | [] | Path to extra keys to include in the keyring |
repositoryAppend | [Directory ! ] | [] | Path to extra repositories to include |
arch | [Scalar ! ] | [] | Platforms |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
build --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.ApkoBuild {
return dag.
Apko().
Build(config)
}
@function
def example(config: dagger.File) -> dagger.ApkoBuild:
return (
dag.apko()
.build(config)
)
@func()
example(config: File): ApkoBuild {
return dag
.apko()
.build(config)
}
config() 🔗
Returns the derived Apko config
Return Type
Config !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | Config file |
source | Directory | null | Work directory |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
config --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.ApkoConfig {
return dag.
Apko().
Config(config)
}
@function
def example(config: dagger.File) -> dagger.ApkoConfig:
return (
dag.apko()
.config(config)
)
@func()
example(config: File): ApkoConfig {
return dag
.apko()
.config(config)
}
container() 🔗
Returns the Apko container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
container
func (m *MyModule) Example() *dagger.Container {
return dag.
Apko().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.apko()
.container()
)
@func()
example(): Container {
return dag
.apko()
.container()
}
dockerConfig() 🔗
Returns the Docker config file
Return Type
File !
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
docker-config
func (m *MyModule) Example() *dagger.File {
return dag.
Apko().
DockerConfig()
}
@function
def example() -> dagger.File:
return (
dag.apko()
.docker_config()
)
@func()
example(): File {
return dag
.apko()
.dockerConfig()
}
publish() 🔗
Publish an image using Apko
Return Type
Image !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
config | File ! | - | Config file |
tag | [String ! ] ! | - | Image tags |
includePaths | [Directory ! ] | [] | Additional include paths where to look for input files |
keyringAppend | [File ! ] | [] | Path to extra keys to include in the keyring |
repositoryAppend | [Directory ! ] | [] | Path to extra repositories to include |
arch | [Scalar ! ] | [] | Platforms |
sbom | Boolean | true | generate SBOM |
local | Boolean | false | Publish image just to local Docker daemon |
force | Boolean | false | Force image publishing (invalidate cache) |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
publish --config file:path --tag string1 --tag string2
func (m *MyModule) Example(config *dagger.File, tag []string) *dagger.ApkoImage {
return dag.
Apko().
Publish(config, tag)
}
@function
def example(config: dagger.File, tag: List[str]) -> dagger.ApkoImage:
return (
dag.apko()
.publish(config, tag)
)
@func()
example(config: File, tag: string[]): ApkoImage {
return dag
.apko()
.publish(config, tag)
}
withDockerConfig() 🔗
Set Docker config file (for chaining)
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dockerConfig | File ! | - | Docker config file |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
with-docker-config --docker-config file:path
func (m *MyModule) Example(dockerConfig *dagger.File) *dagger.Apko {
return dag.
Apko().
WithDockerConfig(dockerConfig)
}
@function
def example(docker_config: dagger.File) -> dagger.Apko:
return (
dag.apko()
.with_docker_config(docker_config)
)
@func()
example(dockerConfig: File): Apko {
return dag
.apko()
.withDockerConfig(dockerConfig)
}
withDockerSocket() 🔗
Retrieves the Apko container plus a socket forwarded to the given Unix socket path
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Socket ! | - | Identifier of the Docker socket to forward |
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(source *dagger.Socket) *dagger.Apko {
return dag.
Apko().
WithDockerSocket(source)
}
@function
def example(source: dagger.Socket) -> dagger.Apko:
return (
dag.apko()
.with_docker_socket(source)
)
@func()
example(source: Socket): Apko {
return dag
.apko()
.withDockerSocket(source)
}
withEnvVariable() 🔗
Set a new environment variable in the Apko container
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | Name of the environment variable |
value | String ! | - | Value of the environment variable |
expand | Boolean | false | Replace “${VAR}” or “$VAR” in the value according to the current environment variables defined in the container |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
with-env-variable --name string --value string
func (m *MyModule) Example(name string, value string) *dagger.Apko {
return dag.
Apko().
WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dagger.Apko:
return (
dag.apko()
.with_env_variable(name, value)
)
@func()
example(name: string, value: string): Apko {
return dag
.apko()
.withEnvVariable(name, value)
}
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@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
with-registry-auth --username string --secret env:MYSECRET
func (m *MyModule) Example(username string, secret *dagger.Secret) *dagger.Apko {
return dag.
Apko().
WithRegistryAuth(username, secret)
}
@function
def example(username: str, secret: dagger.Secret) -> dagger.Apko:
return (
dag.apko()
.with_registry_auth(username, secret)
)
@func()
example(username: string, secret: Secret): Apko {
return dag
.apko()
.withRegistryAuth(username, secret)
}
withSecretVariable() 🔗
Set a new environment variable, using a secret value
Return Type
Apko !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | Name of the secret variable |
secret | Secret ! | - | Identifier of the secret value |
Example
dagger -m github.com/opopops/daggerverse/apko@f5b2b0725aaecd1d771479f2e1c886dad9ac554d call \
with-secret-variable --name string --secret env:MYSECRET
func (m *MyModule) Example(name string, secret *dagger.Secret) *dagger.Apko {
return dag.
Apko().
WithSecretVariable(name, secret)
}
@function
def example(name: str, secret: dagger.Secret) -> dagger.Apko:
return (
dag.apko()
.with_secret_variable(name, secret)
)
@func()
example(name: string, secret: Secret): Apko {
return dag
.apko()
.withSecretVariable(name, secret)
}