Docker based ArchLinux build environment.
This image provides a build environment for ArchLinux packages. It is based
on the official archlinux:base-devel image, and can be used for example to
work on packages without having to install dependencies on the host system.
It can handle dependencies coming both from the official repositories and
from AUR, as well as importing PGP keys listed in validpgpkeys .
Run the image with the folder containing your PKGBUILD file mounted on the
container's /pkg folder:
docker run --rm -v "$(pwd):/pkg" mdeous/pkgbuilder [build|makepkg] [ARGS]-
build: the container will install all the build dependencies usingyay, and will then build the package usingmakepkg --clean --cleanbuild --force --noconfirm. Any additional arguments will be added to the call tomakepkg. The resulting built package will be stored alongside thePKGBUILDfile. -
makepkg: the container will runmakepkgdirectly and pass all remaining arguments to it. This can be useful to runmakepkgcommands that don't require dependencies to be installed, like for example to show the package.SRCINFOcontent, or to compute dependencies checksums. -
If neither
buildnormakepkgis passed, the container will run thebuildcommand and pass all additional arguments to it.
At the end of the execution, the built package will be analyzed with
namcap and display the results.
Additionally, the .SRCINFO file for the package can be automatically
generated with the built package by passing a SRCINFO=1 environment
variable to the container.
To avoid having to type that long command line to run the container every time, the following shell alias can be used:
alias pkgbuilder='docker run --rm --name="pkgbuilder-$(basename ${PWD})" -v "${PWD}":/pkg mdeous/pkgbuilder:latest'