This repository contains unofficial Docker images of Arch Linux and Arch Linux ARM for all available platforms.
The images aim to be as plain and no-thrills as possible, what you'd get from
pacstrap. This does not mean they are small, however. The latest image
weights in at about 100 MB, which is twice ubuntu:latest at the time of
writing.
However, these images can make very convenient prototype, test and build environments in combination with Docker tooling, even on non-Linux platforms.
The images are available on Docker Hub as stephank/archlinux. Source for the build process is in the GitHub repo stephank/docker-archlinux.
Builds run daily on hardware sponsored by Angry Bytes.
Each architecture is built in 4 variants:
latest: Installation of coreutils, bash and pacman.
base: Derived from latest, a full installation of base.
devel: Derived from base, a full installation of base base-devel.
makepkg: Derived from devel, an environment for building packages.
latest, base, devel, makepkg (aliases for x86_64)x86_64-latest, x86_64-base, x86_64-devel, x86_64-makepkgi686-latest, i686-base, i686-devel, i686-makepkgWhen running the i686 images on a x86_64 host, note that the system still
reports x86_64 (e.g. in uname -m), and tools attempting autodetection may
thus fail. (The default pacman.conf is setup correctly, however.)
arm-latest, arm-base, arm-devel, arm-makepkgarmv6-latest, armv6-base, armv6-devel, armv6-makepkgarmv7-latest, armv7-base, armv7-devel, armv7-makepkgaarch64-latest, aarch64-base, aarch64-devel, aarch64-makepkgThe ARM images contain QEMU static binaries for userland emulation on a x86_64 host, so the images work on systems with binfmt setup in Debian-style. (This includes Docker for Mac and Docker for Windows.)
The QEMU static binaries are extracted from the qemu-user-static package in Debian sid.
In a directory with a PKGBUILD file, run:
docker run --rm -v "$PWD":/build stephank/archlinux:makepkg
The makepkg images expect the build directory to be mounted as /build. The
actual makepkg tool is invoked as makepkg --noconfirm -s. Any additional
arguments passed to the image are added after the default arguments.
Before the build starts, PGP keys in the PKGBUILD validpgpkeys array are
fetched from public keyservers, and the package database is refreshed.
The makepkg images have an additional repository configured:
[makepkg]
Server=file:///repo/
SigLevel=Never
When building packages that are interdependent, add them to a repo makepkg
and mount it at /repo to allow them to build.
mkdir repo/
cp mydep/mydep-1.0.0-1-x86_64.pkg.tar.xz repo/
repo-add repo/makepkg.db.tar.gz repo/*.pkg.tar.xz
docker run --rm \
-v "$PWD/repo":/repo:ro \
-v "$PWD/myproject":/build \
stephank/archlinux:makepkg
Pacman downloads can be shared between different containers to save on
bandwidth. Simply create a writable mount at /var/cache/pacman/pkg, for
example:
docker volume create --name pacman-pkg
docker run -v pacman-pkg:/var/cache/pacman/pkg ...
Content type
Image
Digest
Size
124.1 MB
Last updated
over 9 years ago
docker pull stephank/archlinux