apko
Build container images from apk packages.
Installation
dagger install github.com/sagikazarmark/daggerverse/apko@v0.1.0Entrypoint
Return Type
Apko !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | Custom container to use as a base container. |
| withoutCache | Boolean | - | Disable mounting a default cache volume. |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 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
Apko 🔗
withCache() 🔗
Mount a cache volume for apk cache.
Return Type
Apko !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cache | CacheVolume ! | - | No description provided |
| source | Directory | - | Identifier of the directory to use as the cache volume's root. |
| sharing | Scalar | - | Sharing mode of the cache volume. |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
with-cache --cache VOLUME_NAMEfunc (m *MyModule) Example(cache *dagger.CacheVolume) *dagger.Apko {
return dag.
Apko().
WithCache(cache)
}@function
def example(cache: dagger.CacheVolume) -> dagger.Apko:
return (
dag.apko()
.with_cache(cache)
)@func()
example(cache: CacheVolume): Apko {
return dag
.apko()
.withCache(cache)
}withRegistryAuth() 🔗
Add credentials for a registry.
Return Type
Apko !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| address | String ! | - | No description provided |
| username | String ! | - | No description provided |
| secret | Secret ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
with-registry-auth --address string --username string --secret env:MYSECRETfunc (m *MyModule) Example(address string, username string, secret *dagger.Secret) *dagger.Apko {
return dag.
Apko().
WithRegistryAuth(address, username, secret)
}@function
def example(address: str, username: str, secret: dagger.Secret) -> dagger.Apko:
return (
dag.apko()
.with_registry_auth(address, username, secret)
)@func()
example(address: string, username: string, secret: Secret): Apko {
return dag
.apko()
.withRegistryAuth(address, username, secret)
}withoutRegistryAuth() 🔗
Removes credentials for a registry.
Return Type
Apko !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| address | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
without-registry-auth --address stringfunc (m *MyModule) Example(address string) *dagger.Apko {
return dag.
Apko().
WithoutRegistryAuth(address)
}@function
def example(address: str) -> dagger.Apko:
return (
dag.apko()
.without_registry_auth(address)
)@func()
example(address: string): Apko {
return dag
.apko()
.withoutRegistryAuth(address)
}build() 🔗
Build an image from a YAML configuration file.
Return Type
BuildResult !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| config | File ! | - | Configuration file. |
| tag | String ! | - | Image tag. |
| lockfile | File | - | A .lock.json file (e.g. produced by apko lock) that constraints versions of packages to the listed ones. |
| annotations | [String ! ] | - | OCI annotations to add. Separate with colon (key:value). |
| arch | [String ! ] | - | Architectures to build for (e.g., x86_64,ppc64le,arm64) -- default is all, unless specified in config. Can also use 'host' to indicate arch of host this is running on. |
| buildDate | String | - | Date used for the timestamps of the files inside the image in RFC3339 format. |
| keyringAppend | [String ! ] | - | Path to extra keys to include in the keyring. |
| offline | Boolean | - | Do not use network to fetch packages (cache must be pre-populated). |
| packageAppend | [String ! ] | - | Extra packages to include. |
| repositoryAppend | [String ! ] | - | Path to extra repositories to include. |
| vcs | Boolean | true | Detect and embed VCS URLs. |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
build --config file:path --tag stringfunc (m *MyModule) Example(config *dagger.File, tag string) *dagger.ApkoBuildResult {
return dag.
Apko().
Build(config, tag)
}@function
def example(config: dagger.File, tag: str) -> dagger.ApkoBuildResult:
return (
dag.apko()
.build(config, tag)
)@func()
example(config: File, tag: string): ApkoBuildResult {
return dag
.apko()
.build(config, tag)
}publish() 🔗
Publish a built image from a YAML configuration file.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| config | File ! | - | Configuration file. |
| tag | String ! | - | Image tag. |
| annotations | [String ! ] | - | OCI annotations to add. Separate with colon (key:value). |
| arch | [String ! ] | - | Architectures to build for (e.g., x86_64,ppc64le,arm64) -- default is all, unless specified in config. Can also use 'host' to indicate arch of host this is running on. |
| buildDate | String | - | Date used for the timestamps of the files inside the image in RFC3339 format. |
| keyringAppend | [String ! ] | - | Path to extra keys to include in the keyring. |
| offline | Boolean | - | Do not use network to fetch packages (cache must be pre-populated). |
| packageAppend | [String ! ] | - | Extra packages to include. |
| repositoryAppend | [String ! ] | - | Path to extra repositories to include. |
| vcs | Boolean | true | Detect and embed VCS URLs. |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
publish --config file:path --tag stringfunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag string) {
return dag.
Apko().
Publish(ctx, config, tag)
}@function
async def example(config: dagger.File, tag: str) -> None:
return await (
dag.apko()
.publish(config, tag)
)@func()
async example(config: File, tag: string): Promise<void> {
return dag
.apko()
.publish(config, tag)
}wolfi() 🔗
Load the Wolfi base configuration.
Return Type
Config ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
wolfifunc (m *MyModule) Example() *dagger.ApkoConfig {
return dag.
Apko().
Wolfi()
}@function
def example() -> dagger.ApkoConfig:
return (
dag.apko()
.wolfi()
)@func()
example(): ApkoConfig {
return dag
.apko()
.wolfi()
}alpine() 🔗
Load the Alpine base configuration.
Return Type
Config ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
alpinefunc (m *MyModule) Example() *dagger.ApkoConfig {
return dag.
Apko().
Alpine()
}@function
def example() -> dagger.ApkoConfig:
return (
dag.apko()
.alpine()
)@func()
example(): ApkoConfig {
return dag
.apko()
.alpine()
}preset() 🔗
Load a configuration preset.
Return Type
Config !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
preset --name stringfunc (m *MyModule) Example(name string) *dagger.ApkoConfig {
return dag.
Apko().
Preset(name)
}@function
def example(name: str) -> dagger.ApkoConfig:
return (
dag.apko()
.preset(name)
)@func()
example(name: string): ApkoConfig {
return dag
.apko()
.preset(name)
}config() 🔗
Load a configuration file.
Return Type
Config !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:pathfunc (m *MyModule) Example(file *dagger.File) *dagger.ApkoConfig {
return dag.
Apko().
Config(file)
}@function
def example(file: dagger.File) -> dagger.ApkoConfig:
return (
dag.apko()
.config(file)
)@func()
example(file: File): ApkoConfig {
return dag
.apko()
.config(file)
}BuildResult 🔗
file() 🔗
Return Type
File ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
build --tag string \
filefunc (m *MyModule) Example(file *dagger.File, tag string) *dagger.File {
return dag.
Apko().
Config(file).
Build(tag).
File()
}@function
def example(file: dagger.File, tag: str) -> dagger.File:
return (
dag.apko()
.config(file)
.build(tag)
.file()
)@func()
example(file: File, tag: string): File {
return dag
.apko()
.config(file)
.build(tag)
.file()
}tag() 🔗
Return Type
String ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
build --tag string \
tagfunc (m *MyModule) Example(ctx context.Context, file *dagger.File, tag string) string {
return dag.
Apko().
Config(file).
Build(tag).
Tag(ctx)
}@function
async def example(file: dagger.File, tag: str) -> str:
return await (
dag.apko()
.config(file)
.build(tag)
.tag()
)@func()
async example(file: File, tag: string): Promise<string> {
return dag
.apko()
.config(file)
.build(tag)
.tag()
}asContainer() 🔗
Import the image into a container.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
build --tag string \
as-containerfunc (m *MyModule) Example(file *dagger.File, tag string) *dagger.Container {
return dag.
Apko().
Config(file).
Build(tag).
AsContainer()
}@function
def example(file: dagger.File, tag: str) -> dagger.Container:
return (
dag.apko()
.config(file)
.build(tag)
.as_container()
)@func()
example(file: File, tag: string): Container {
return dag
.apko()
.config(file)
.build(tag)
.asContainer()
}Config 🔗
file() 🔗
Return Type
File ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
filefunc (m *MyModule) Example(file *dagger.File) *dagger.File {
return dag.
Apko().
Config(file).
File()
}@function
def example(file: dagger.File) -> dagger.File:
return (
dag.apko()
.config(file)
.file()
)@func()
example(file: File): File {
return dag
.apko()
.config(file)
.file()
}repositories() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
repositoriesfunc (m *MyModule) Example(ctx context.Context, file *dagger.File) []string {
return dag.
Apko().
Config(file).
Repositories(ctx)
}@function
async def example(file: dagger.File) -> List[str]:
return await (
dag.apko()
.config(file)
.repositories()
)@func()
async example(file: File): Promise<string[]> {
return dag
.apko()
.config(file)
.repositories()
}keyrings() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
keyringsfunc (m *MyModule) Example(ctx context.Context, file *dagger.File) []string {
return dag.
Apko().
Config(file).
Keyrings(ctx)
}@function
async def example(file: dagger.File) -> List[str]:
return await (
dag.apko()
.config(file)
.keyrings()
)@func()
async example(file: File): Promise<string[]> {
return dag
.apko()
.config(file)
.keyrings()
}archs() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
archsfunc (m *MyModule) Example(ctx context.Context, file *dagger.File) []string {
return dag.
Apko().
Config(file).
Archs(ctx)
}@function
async def example(file: dagger.File) -> List[str]:
return await (
dag.apko()
.config(file)
.archs()
)@func()
async example(file: File): Promise<string[]> {
return dag
.apko()
.config(file)
.archs()
}packages() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
packagesfunc (m *MyModule) Example(ctx context.Context, file *dagger.File) []string {
return dag.
Apko().
Config(file).
Packages(ctx)
}@function
async def example(file: dagger.File) -> List[str]:
return await (
dag.apko()
.config(file)
.packages()
)@func()
async example(file: File): Promise<string[]> {
return dag
.apko()
.config(file)
.packages()
}withRepository() 🔗
Add a repository to the configuration.
Return Type
Config !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| url | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
with-repository --url stringfunc (m *MyModule) Example(file *dagger.File, url string) *dagger.ApkoConfig {
return dag.
Apko().
Config(file).
WithRepository(url)
}@function
def example(file: dagger.File, url: str) -> dagger.ApkoConfig:
return (
dag.apko()
.config(file)
.with_repository(url)
)@func()
example(file: File, url: string): ApkoConfig {
return dag
.apko()
.config(file)
.withRepository(url)
}withKeyring() 🔗
Add a keyring to the configuration.
Return Type
Config !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| url | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
with-keyring --url stringfunc (m *MyModule) Example(file *dagger.File, url string) *dagger.ApkoConfig {
return dag.
Apko().
Config(file).
WithKeyring(url)
}@function
def example(file: dagger.File, url: str) -> dagger.ApkoConfig:
return (
dag.apko()
.config(file)
.with_keyring(url)
)@func()
example(file: File, url: string): ApkoConfig {
return dag
.apko()
.config(file)
.withKeyring(url)
}withArch() 🔗
Add an arch to the configuration.
Return Type
Config !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| arch | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
with-arch --arch stringfunc (m *MyModule) Example(file *dagger.File, arch string) *dagger.ApkoConfig {
return dag.
Apko().
Config(file).
WithArch(arch)
}@function
def example(file: dagger.File, arch: str) -> dagger.ApkoConfig:
return (
dag.apko()
.config(file)
.with_arch(arch)
)@func()
example(file: File, arch: string): ApkoConfig {
return dag
.apko()
.config(file)
.withArch(arch)
}withPackage() 🔗
Add a package to the configuration.
Return Type
Config !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
with-package --name stringfunc (m *MyModule) Example(file *dagger.File, name string) *dagger.ApkoConfig {
return dag.
Apko().
Config(file).
WithPackage(name)
}@function
def example(file: dagger.File, name: str) -> dagger.ApkoConfig:
return (
dag.apko()
.config(file)
.with_package(name)
)@func()
example(file: File, name: string): ApkoConfig {
return dag
.apko()
.config(file)
.withPackage(name)
}withPackages() 🔗
Add a list of packages to the configuration.
Return Type
Config !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pkgs | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
with-packages --pkgs string1 --pkgs string2func (m *MyModule) Example(file *dagger.File, pkgs []string) *dagger.ApkoConfig {
return dag.
Apko().
Config(file).
WithPackages(pkgs)
}@function
def example(file: dagger.File, pkgs: List[str]) -> dagger.ApkoConfig:
return (
dag.apko()
.config(file)
.with_packages(pkgs)
)@func()
example(file: File, pkgs: string[]): ApkoConfig {
return dag
.apko()
.config(file)
.withPackages(pkgs)
}build() 🔗
Build an image from configuration.
Return Type
BuildResult !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tag | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
build --tag stringfunc (m *MyModule) Example(file *dagger.File, tag string) *dagger.ApkoBuildResult {
return dag.
Apko().
Config(file).
Build(tag)
}@function
def example(file: dagger.File, tag: str) -> dagger.ApkoBuildResult:
return (
dag.apko()
.config(file)
.build(tag)
)@func()
example(file: File, tag: string): ApkoBuildResult {
return dag
.apko()
.config(file)
.build(tag)
}container() 🔗
Build a container from configuration.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/apko@cc545d11b4306aeebff3a25ee6e3067cd5266418 call \
config --file file:path \
containerfunc (m *MyModule) Example(file *dagger.File) *dagger.Container {
return dag.
Apko().
Config(file).
Container()
}@function
def example(file: dagger.File) -> dagger.Container:
return (
dag.apko()
.config(file)
.container()
)@func()
example(file: File): Container {
return dag
.apko()
.config(file)
.container()
}