Hits : 5658

Instructions to build a tiny compressed archlinux (latest) docker image

[ If you want to download archlinux image: https://hub.docker.com/r/archlinux/base ]

Installation


basic installation

# mkdir -pv /archlinux/var/lib/pacman
# pacman --root /archlinux/ -Sy base --noconfirm

# sed -i -e 's/#\(.*otenet\)/\1/g' /archlinux/etc/pacman.d/mirrorlist
# sed -i -e 's/^SigLevel.*/SigLevel = Never/g' /archlinux/etc/pacman.conf

Clean up 


remove unnecessary files

# pacman -Rncs linux --root /archlinux/ --noconfirm
# pacman -Rncs man-db --root /archlinux/ --noconfirm
# pacman -Rncs man-pages --root /archlinux/ --noconfirm 

# rm -rf /archlinux/usr/share/locale
# rm -rf /archlinux/usr/share/man

Archive


# cd /archlinux/

# tar Jcf a .

# du -h a
54M	a


Import to Docker



# docker import - archlinux:latest < a


# docker run -t -i archlinux:latest bash 
[root@9adf2e774846 /]#