97 MB Arch Linux, ArchAssault, BlackArch, BBQLinux Image
3.0K
On Docker hub archlinux-tiny on Github docker-archlinux-tiny
97 MB Arch Linux base container. The goal of this was to build an extremely small Arch Linux base without giving up any functionality. I used Les Aker's dock0/arch as a foundation. I also added some amazing repos like ArchAssault, BlackArch and BBQLinux.
The goal was to maintain complete functionality so I did not swap out coreutils for busybox. But you could swap out a few things for the busybox version of them and reduce the size down another 20 MB or so.
As an example this is a search for chrome with the above repos installed:

The biggest win was the removal of Perl at 40MB. Perl is needed for two things on the base Arch Linux install OpenSSL (it shouldn't be honestly since it isn't really used other than for one small thing on Windows) Some other distros have already fixed this [issue] (https://github.com/NixOS/nixpkgs/issues/6763) like NixOS Also, see this thread and this. And for texinfo (8 MB) which we patched out with a fake stub.
As well as aggressively cleaning of info, doc and man pages as well as stripping out the non English international stuff.
This is slimmed down as much as possible while still having full pacman functionality to install any package needed. This is ment to be more of the lowest possible base to build upon. Try out one of my other Arch Linux versions if you want something more.
Where it might break is all but the English locales have been removed, as well as any terminfo configs that are not xterm based. Do not expect any info, documents or manual pages to exist locally either as those have been purged as well.
I am currently experimenting with the removal of zoneinfo and i18n and no problems so far.
Anything you install with pacman should just install fine but if you want to install something from the AUR you are going to need to install dev tools first like make, gcc, autoconf etc.
To save on space the pacman databases are purged. You need run pacman -Sy at least once before using pacman.
RUN pacman -Sy
Most of the time pacman will install packages and dependencies just fine. Sometimes though it will say "error: command failed to execute correctly " with a command not found message. That means you need to install a dependency.
For example the git package uses groupadd and useradd which are both in the shadow package but you may not know that so to find it you can use the pkgfile tool. This will show you which package to install. In this case you would install the shadow package before installing git.
$ pacman -S pkgfile && pkgfile --update
$ pkgfile useradd
core/shadow
extra/bash-completion
This image has a user docker with the password docker. You will most likely want to change the password. Just add this line to your Dockerfile.
RUN echo -e "docker\nyournewpassword" | passwd docker
The mirrors are optimized for US West If you want it for your area just add this to the top of your Dockerfile.
RUN pacman -S reflector --noconfirm && \
reflector --verbose -l 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist && \
pacman -Rs reflector --noconfirm
Included is cower and package-query for interacting with the AUR. You might want another one like yaourt. To install that just:
RUN pacman -S --noconfirm yaourt
The different repositories have a lot of really nice packages. To get a list just run package-query like this.
package-query -Sl archassault

Content type
Image
Digest
sha256:88dd5e725…
Size
90.7 MB
Last updated
over 9 years ago
docker pull yantis/archlinux-tiny