Public Repository

Last pushed: 2 months ago
Short Description
Unofficial Arch Linux images
Full Description

Unofficial Arch Linux images

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.

Tags

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.

Arch Linux tags

  • latest, base, devel, makepkg (aliases for x86_64)
  • x86_64-latest, x86_64-base, x86_64-devel, x86_64-makepkg
  • i686-latest, i686-base, i686-devel, i686-makepkg

When 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.)

Arch Linux ARM tags

  • arm-latest, arm-base, arm-devel, arm-makepkg
  • armv6-latest, armv6-base, armv6-devel, armv6-makepkg
  • armv7-latest, armv7-base, armv7-devel, armv7-makepkg
  • aarch64-latest, aarch64-base, aarch64-devel, aarch64-makepkg

The 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.

Examples

Building packages

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.

Adding a local repository

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

Creating a shared package cache

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 ...
Docker Pull Command
Owner
stephank

Comments (0)