apko
No long description provided.
Installation
dagger install github.com/hampusctl/daggerverse/apko@1cf54efa2b1c06819bb1fe1def0a9d3b03245e7fEntrypoint
Return Type
Apko !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | container to use for Apko operations. If not provided, creates a new one from repository:tag |
| repository | String ! | "cgr.dev/chainguard/apko" | repository is the container registry and image name for the Apko tool |
| tag | String ! | "latest" | tag specifies the version of the Apko tool to use |
| extraCaCerts | [File ! ] | - | extraCaCerts are additional CA certificate files to trust in the container environment |
Example
dagger -m github.com/hampusctl/daggerverse/apko@1cf54efa2b1c06819bb1fe1def0a9d3b03245e7f call \
--repository string --tag stringfunc (m *MyModule) Example(repository string, tag string) *dagger.Apko {
return dag.
Apko(repository, tag)
}@function
def example(repository: str, tag: str, ) -> dagger.Apko:
return (
dag.apko(repository, tag)
)@func()
example(repository: string, tag: string, ): Apko {
return dag
.apko(repository, tag)
}Types
Apko 🔗
Apko provides functionality for building minimal container images using Apko
container() 🔗
Return Type
Container ! Example
dagger -m github.com/hampusctl/daggerverse/apko@1cf54efa2b1c06819bb1fe1def0a9d3b03245e7f call \
--repository string --tag string containerfunc (m *MyModule) Example(repository string, tag string) *dagger.Container {
return dag.
Apko(repository, tag).
Container()
}@function
def example(repository: str, tag: str, ) -> dagger.Container:
return (
dag.apko(repository, tag)
.container()
)@func()
example(repository: string, tag: string, ): Container {
return dag
.apko(repository, tag)
.container()
}build() 🔗
Build creates a container image from an Apko configuration file. The configuration is processed and built into a container image. Returns the built container ready for use or publishing.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| configFile | File ! | - | configFile is the Apko YAML configuration defining the image contents and metadata |
| tag | String ! | "latest" | tag is the image tag to use when building (default: latest) |
| extraArgs | [String ! ] | - | extraArgs are additional command-line arguments passed to 'apko build' |
Example
dagger -m github.com/hampusctl/daggerverse/apko@1cf54efa2b1c06819bb1fe1def0a9d3b03245e7f call \
--repository string --tag string build --config-file file:path --tag stringfunc (m *MyModule) Example(repository string, tag string, configFile *dagger.File, tag1 string) *dagger.Container {
return dag.
Apko(repository, tag).
Build(configFile, tag1)
}@function
def example(repository: str, tag: str, config_file: dagger.File, tag1: str) -> dagger.Container:
return (
dag.apko(repository, tag)
.build(config_file, tag1)
)@func()
example(repository: string, tag: string, configFile: File, tag1: string): Container {
return dag
.apko(repository, tag)
.build(configFile, tag1)
}showConfig() 🔗
ShowConfig displays the resolved configuration from an Apko YAML file. This is useful for debugging and understanding what the final configuration looks like.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| configFile | File ! | - | configFile is the Apko YAML configuration file to analyze |
Example
dagger -m github.com/hampusctl/daggerverse/apko@1cf54efa2b1c06819bb1fe1def0a9d3b03245e7f call \
--repository string --tag string show-config --config-file file:pathfunc (m *MyModule) Example(ctx context.Context, repository string, tag string, configFile *dagger.File) string {
return dag.
Apko(repository, tag).
ShowConfig(ctx, configFile)
}@function
async def example(repository: str, tag: str, config_file: dagger.File) -> str:
return await (
dag.apko(repository, tag)
.show_config(config_file)
)@func()
async example(repository: string, tag: string, configFile: File): Promise<string> {
return dag
.apko(repository, tag)
.showConfig(configFile)
}showPackages() 🔗
ShowPackages displays the packages and versions that would be installed by the configuration. This is useful for understanding what will be included in the final image.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| configFile | File ! | - | configFile is the Apko YAML configuration file to analyze |
Example
dagger -m github.com/hampusctl/daggerverse/apko@1cf54efa2b1c06819bb1fe1def0a9d3b03245e7f call \
--repository string --tag string show-packages --config-file file:pathfunc (m *MyModule) Example(ctx context.Context, repository string, tag string, configFile *dagger.File) string {
return dag.
Apko(repository, tag).
ShowPackages(ctx, configFile)
}@function
async def example(repository: str, tag: str, config_file: dagger.File) -> str:
return await (
dag.apko(repository, tag)
.show_packages(config_file)
)@func()
async example(repository: string, tag: string, configFile: File): Promise<string> {
return dag
.apko(repository, tag)
.showPackages(configFile)
}