This is Arch Linux Docker base image build setup that employs the bootstrap tarball distributed by distro authors.
It's meant to provide an easy to use solution for building Arch Linux Docker images on non-Arch Linux hosts (and as an unprivileged user if your Docker instance allows that, but please mind there are good reasons why it shouldn't), which is not possible with the currently recommended method.
git clonethis repository.
cdto a directory where you have cloned it.
archlinux-bootstrap-date-architecture.tar.gzarchive there, preferably the newest one (or expect a longer
pacman -Syurun at
docker build, and, if your tarball is relatively old, some incompatibilities to manifest; Arch changes fast). From my experience, https://archive.archlinux.org/iso/ is a very fast mirror, but you may want to choose your preferred one on https://www.archlinux.org/download/.
./tar_fix.py --input=archlinux-bootstrap-date-architecture.tar.gz --output=bootstrap.tar.gz. This will remove input tarball's top-level directory from all its component paths, and save that in the output tarball. As a result its content starts at
i686/, and so will the filesystem of the Docker image.
tar_fix.pyneeds Python 3.5. It will fail with Python 2, and even with 3.4, like in issue #1.
Make sure you have my
bootstrap.tar.gzin one directory.
Build the image with a command like
docker build --build-arg architecture=x86_64 --tag archlinux-x86_64-base .. Mind the dot! Use
--build-arg architecture=i686if you are building from an i686