apko
Build container images from apk packages.
Installation
dagger install github.com/felipepimentel/daggerverse/essentials/apko@v0.0.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/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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 | Enum | - | Sharing mode of the cache volume. |
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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)
}BuildResult 🔗
file() 🔗
Return Type
File ! Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 call \
build --config file:path --tag string \
filefunc (m *MyModule) Example(config *dagger.File, tag string) *dagger.File {
return dag.
Apko().
Build(config, tag).
File()
}@function
def example(config: dagger.File, tag: str) -> dagger.File:
return (
dag.apko()
.build(config, tag)
.file()
)@func()
example(config: File, tag: string): File {
return dag
.apko()
.build(config, tag)
.file()
}tag() 🔗
Return Type
String ! Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 call \
build --config file:path --tag string \
tagfunc (m *MyModule) Example(ctx context.Context, config *dagger.File, tag string) string {
return dag.
Apko().
Build(config, tag).
Tag(ctx)
}@function
async def example(config: dagger.File, tag: str) -> str:
return await (
dag.apko()
.build(config, tag)
.tag()
)@func()
async example(config: File, tag: string): Promise<string> {
return dag
.apko()
.build(config, tag)
.tag()
}asContainer() 🔗
Import the image into a container.
Return Type
Container ! Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 call \
build --config file:path --tag string \
as-containerfunc (m *MyModule) Example(config *dagger.File, tag string) *dagger.Container {
return dag.
Apko().
Build(config, tag).
AsContainer()
}@function
def example(config: dagger.File, tag: str) -> dagger.Container:
return (
dag.apko()
.build(config, tag)
.as_container()
)@func()
example(config: File, tag: string): Container {
return dag
.apko()
.build(config, tag)
.asContainer()
}