apko
Build container images from apk packages.
Installation
dagger install github.com/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e
Entrypoint
Return Type
Apko !
Arguments
Name | Type | Description |
---|---|---|
container | Container | Custom container to use as a base container. |
withoutCache | Boolean | Disable mounting a default cache volume. |
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
func (m *myModule) example() *Apko {
return dag.
Apko()
}
@function
def example() -> dag.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 | Enum | - | Sharing mode of the cache volume. |
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
with-cache --cache VOLUME_NAME
func (m *myModule) example(cache *CacheVolume) *Apko {
return dag.
Apko().
WithCache(cache)
}
@function
def example(cache: dagger.CacheVolume) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
with-registry-auth --address string --username string --secret env:MYSECRET
func (m *myModule) example(address string, username string, secret *Secret) *Apko {
return dag.
Apko().
WithRegistryAuth(address, username, secret)
}
@function
def example(address: str, username: str, secret: dagger.Secret) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
without-registry-auth --address string
func (m *myModule) example(address string) *Apko {
return dag.
Apko().
WithoutRegistryAuth(address)
}
@function
def example(address: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
build --config file:path --tag string
func (m *myModule) example(config *File, tag string) *ApkoBuildResult {
return dag.
Apko().
Build(config, tag)
}
@function
def example(config: dagger.File, tag: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
publish --config file:path --tag string
func (m *myModule) example(ctx context.Context, config *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
wolfi
func (m *myModule) example() *ApkoConfig {
return dag.
Apko().
Wolfi()
}
@function
def example() -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
alpine
func (m *myModule) example() *ApkoConfig {
return dag.
Apko().
Alpine()
}
@function
def example() -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
preset --name string
func (m *myModule) example(name string) *ApkoConfig {
return dag.
Apko().
Preset(name)
}
@function
def example(name: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path
func (m *myModule) example(file *File) *ApkoConfig {
return dag.
Apko().
Config(file)
}
@function
def example(file: dagger.File) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
build --tag string \
file
func (m *myModule) example(file *File, tag string) *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
build --tag string \
tag
func (m *myModule) example(ctx context.Context, file *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
build --tag string \
as-container
func (m *myModule) example(file *File, tag string) *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
file
func (m *myModule) example(file *File) *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
repositories
func (m *myModule) example(ctx context.Context, file *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
keyrings
func (m *myModule) example(ctx context.Context, file *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
archs
func (m *myModule) example(ctx context.Context, file *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
packages
func (m *myModule) example(ctx context.Context, file *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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
with-repository --url string
func (m *myModule) example(file *File, url string) *ApkoConfig {
return dag.
Apko().
Config(file).
WithRepository(url)
}
@function
def example(file: dagger.File, url: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
with-keyring --url string
func (m *myModule) example(file *File, url string) *ApkoConfig {
return dag.
Apko().
Config(file).
WithKeyring(url)
}
@function
def example(file: dagger.File, url: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
with-arch --arch string
func (m *myModule) example(file *File, arch string) *ApkoConfig {
return dag.
Apko().
Config(file).
WithArch(arch)
}
@function
def example(file: dagger.File, arch: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
with-package --name string
func (m *myModule) example(file *File, name string) *ApkoConfig {
return dag.
Apko().
Config(file).
WithPackage(name)
}
@function
def example(file: dagger.File, name: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
with-packages --pkgs string1 --pkgs string2
func (m *myModule) example(file *File, pkgs []string) *ApkoConfig {
return dag.
Apko().
Config(file).
WithPackages(pkgs)
}
@function
def example(file: dagger.File, pkgs: List[str]) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
build --tag string
func (m *myModule) example(file *File, tag string) *ApkoBuildResult {
return dag.
Apko().
Config(file).
Build(tag)
}
@function
def example(file: dagger.File, tag: str) -> dag.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/jedevc/daggerverse-sagikazarmark/apko@617169024c618abcce1cccd5d32285eca93a3f6e call \
config --file file:path \
container
func (m *myModule) example(file *File) *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()
}