APK Foundry: getting started

  1. Ensure all dependencies mentioned in the README are present.

  2. Run make quickstart. This will configure APK Foundry and build the two static binaries that are needed inside the container. It accepts these configuration options:


    Path to the non-setuid bwrap(1) binary. It can be an absolute path or a command name that is resolved using $PATH. The default is bwrap.nosuid.


    Default apk architecture name to use if none is given when bootstrapping containers. The default value is x86_64 so you'll probably need to change this.

    For example:

    make quickstart BWRAP=/path/to/bwrap.nosuid DEFAULT_ARCH=ppc64

    These options are baked into APK Foundry.

  3. Add mappings to /etc/subuid and /etc/subgid for this user. See subuid(5) and subgid(5). You will need 65536 UIDs and GIDs, and they must start at the same base sub-ID (this may be changed in a future version). For example:

  4. Create a site configuration file in $AF_CONFIG with a name like config.ini. $AF_CONFIG defaults to $XDG_CONFIG_HOME/apkfoundry if not set. $XDG_CONFIG_HOME defaults to $HOME/.config if not set.

    Here you record what the base sub-ID is from the previous step:

    subid = 100000

    If your machine is 64-bit and can support 32-bit environments as well, you should also configure here what arguments with which setarch(8) needs to be called to support that. For example, if the machine is a 64-bit x86 machine and can support 32-bit x86 environments:

    pmmx = i586

    This will configure APK Foundry to start all containers for the pmmx APK architecture with setarch i586.

    For more information on site setings, see the annotated example site configuration file.

  5. Optionally, create $AF_CONFIG/abuild/abuild.conf so that you can set $JOBS. For example:

    export JOBS=2
    export MAKEFLAGS=-j$JOBS

    This will be installed along with the rest of $AF_CONFIG/abuild into each container's $ABUILD_USERDIR. See the configuration guide for more information.

  6. Configure your project to support APK Foundry. See the configution guide for details.

  7. Add /path/to/apkfoundry to your $PYTHONPATH.

  8. Add /path/to/apkfoundry/bin to your $PATH.

  9. Explore!