Options - chainguard-dev/apko

This document provides a reference for various options that can be used in apko’s YAML specification.

contents

The contents section defines sources and packages that will be included in the image.

repositories

A list of apk repositories for this image. Supports either Alpine or Wolfi apk repositories.

Example:

contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main

packages

A list containing all packages that should be installed as part of a given image’s requirements. It is not recommended to mix Alpine apks with Wolfi apks.

Example:

contents:
packages:
- alpine-base

entrypoint

This section defines an entry point command for your image.

command

The command that should be executed as entry point for this image.

Example:

entrypoint:
command: /usr/bin/php81

archs

The architectures to build. This top-level directive expects a list with all architectures that should be a target for the build. By default, apko will try to build for all architectures that are currently supported.

Example:

archs:
- x86_64
- aarch64

environment

This section defines environment variables that will be set for this image.

Example:

environment:
PATH: /usr/sbin:/sbin:/usr/bin:/bin
myVAR: "test"

accounts

This section defines users and groups that should be added to this image.

groups

A list with the groups that should be present in this image.

Example:

accounts:
groups:
- groupname: nonroot
gid: 65532

users

A list with the user accounts that should be present in this image.

Example:

accounts:
users:
- username: nonroot
uid: 65532

run-as

The default user to run the entrypoint command.

Example:

accounts:
run-as: nonroot

For more information, see the apko YAML Reference and the options.yaml file in the apko repository.