Closes #63. Using `zstd -T0 -8` instead of `gz -T0 -9` results in a larger rootfs file, but requires significantly less time and memory: ``` zstd -3 115M 1.60user 0.18system 0:00.32elapsed 557%CPU (0avgtext+0avgdata 130212maxresident)k zstd -6 107M 5.03user 0.24system 0:00.72elapsed 729%CPU (0avgtext+0avgdata 149660maxresident)k zstd -7 106M 7.33user 0.29system 0:01.04elapsed 728%CPU (0avgtext+0avgdata 174368maxresident)k zstd -8 105M 8.45user 0.27system 0:01.23elapsed 707%CPU (0avgtext+0avgdata 173008maxresident)k zstd -9 104M 9.35user 0.37system 0:01.42elapsed 683%CPU (0avgtext+0avgdata 335920maxresident)k zstd -13 104M 30.57user 0.31system 0:04.76elapsed 648%CPU (0avgtext+0avgdata 498740maxresident)k zstd -19 91M 132.06user 0.53system 0:21.98elapsed 603%CPU (0avgtext+0avgdata 1106328maxresident)k xz -9 81M 105.71user 0.58system 0:58.24elapsed 182%CPU (0avgtext+0avgdata 2006964maxresident)k ``` Additionally this drops bash from the build Dockerfile, since `SHELL` is not OCI compliant.
Arch Linux Docker Image
Arch Linux provides Docker images both in the official DockerHub library (docker pull library/archlinux:latest) and in our own repository (docker pull archlinux/archlinux:latest).
Images in the official library are updated weekly while our own repository is updated daily.
Two versions of the image are provided: base (approx. 160MB) and base-devel (approx. 240MB), containing the respective meta package / package group. Both are available as tags with latest pointing to base. Additionally, images are tagged with their date and build job number, f.e. base-devel-20201118.0.9436.
While the images are regularly kept up to date it is strongly recommended running pacman -Syu right after starting a container due to the rolling release nature of Arch Linux.
Principles
- Provide the Arch experience in a Docker image
- Provide the simplest but complete image to
baseandbase-develon a regular basis pacmanneeds to work out of the box- All installed packages have to be kept unmodified
⚠️⚠️⚠️ NOTE: For Security Reasons, these images strip the pacman lsign key.
This is because the same key would be spread to all containers of the same
image, allowing for malicious actors to inject packages (via, for example,
a man-in-the-middle). In order to create an lsign-key run `pacman-key
--init` on the first execution, but be careful to not redistribute that
key.⚠️⚠️⚠️
Building your own image
This repository contains all scripts and files needed to create a Docker image for Arch Linux.
Dependencies
Install the following Arch Linux packages:
- make
- devtools
- docker
- fakechroot
- fakeroot
Make sure your user can directly interact with Docker (i.e. docker info works).
Usage
Run make docker-image-base to build the archlinux:base image with the
base meta package installed. You can also run make docker-image-base-devel to
build the image archlinux:base-devel which additionally has the base-devel group installed.
Pipeline
Daily builds
Daily images are build with scheduled GitLab CI using our own runner infrastructure. Initially root filesystem archives are constructed and provided in our package registry. The released multi-stage Dockerfile downloads those archives and verifies their integrity before unpacking it into a Docker image layer. Images are built using kaniko to avoid using privileged Docker containers, which also publishes them to our DockerHub repository.
Weekly releases
Weekly releases to the official DockerHub library use the same pipeline as daily builds. Updates are provided as automatic pull requests to the official-images library, whose GitHub pipeline will build the images using our provided rootfs archives and Dockerfiles.
Development
Changes in Git feature branches are built and tested using the pipeline as well. Development images are uploaded to our GitLab Container Registry.