Dagger
Search

apko

Build container images from apk packages.

Installation

dagger install github.com/felipepimentel/daggerverse/essentials/apko@v0.0.0

Entrypoint

Return Type
Apko !
Arguments
NameTypeDefault ValueDescription
containerContainer -Custom container to use as a base container.
withoutCacheBoolean -Disable mounting a default cache volume.
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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
NameTypeDefault ValueDescription
cacheCacheVolume !-No description provided
sourceDirectory -Identifier of the directory to use as the cache volume's root.
sharingEnum -Sharing mode of the cache volume.
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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
NameTypeDefault ValueDescription
addressString !-No description provided
usernameString !-No description provided
secretSecret !-No description provided
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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
NameTypeDefault ValueDescription
addressString !-No description provided
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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
NameTypeDefault ValueDescription
configFile !-Configuration file.
tagString !-Image tag.
lockfileFile -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.
buildDateString -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.
offlineBoolean -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.
vcsBoolean trueDetect and embed VCS URLs.
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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
NameTypeDefault ValueDescription
configFile !-Configuration file.
tagString !-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.
buildDateString -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.
offlineBoolean -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.
vcsBoolean trueDetect and embed VCS URLs.
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 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)
}

BuildResult 🔗

file() 🔗

Return Type
File !
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/apko@36e606fe6b7d1c9561dc60db82ab31614b838754 call \
 build --config file:path --tag string \
 file
func (m *myModule) example(config *File, tag string) *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 \
 tag
func (m *myModule) example(ctx context.Context, config *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-container
func (m *myModule) example(config *File, tag string) *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()
}