5 Usage
Foster Hangdaan edited this page 2024-10-23 07:43:59 -04:00

Usage

This document shows how to use Arch Packaging Container to build Arch Linux packages.

Prerequisites

  • Install an OCI-compliant container management tool: Podman or Docker. The examples will be using Podman.
  • Existing PKGBUILD file for use by makepkg. This will be stored in ./pkg/PKGBUILD in the examples.

Running the Container

  1. Create the build folder and grant write permission to all:

    mkdir build
    chmod 777 build
    
  2. Run the container:

    podman run --rm -v ./pkg:/pkg:ro -v ./build:/build code.fosterhangdaan.com/foster/arch-packaging-container:latest
    

    When the build is finished, the compressed package will be stored in build/packages.

Rust

Example for a Rust build environment.

  1. Create a volume to store Rust crates:

    podman volume create cargo
    
  2. Run the container:

    podman run --rm -v ./pkg:/pkg:ro -v ./build:/build -v cargo:/home/builder/.cargo code.fosterhangdaan.com/foster/arch-packaging-container:latest