diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1925bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +*.orig +/.idea diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1af633c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +ADD archlinux.tar.xz / +CMD ["/usr/bin/bash"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3b93d40 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +rootfs: + $(eval TMPDIR := $(shell mktemp -d)) + pacstrap -C rootfs/etc/pacman.conf -c -d -G -M $(TMPDIR) $(shell cat packages) + cp -rvp --backup --suffix=.pacnew rootfs/* $(TMPDIR)/ + arch-chroot $(TMPDIR) locale-gen + arch-chroot $(TMPDIR) pacman-key --init + arch-chroot $(TMPDIR) pacman-key --populate archlinux + tar --numeric-owner --xattrs --acls --exclude-from=exclude -C $(TMPDIR) -c . -Jvf archlinux.tar.xz + rm -rf $(TMPDIR) + +docker-image: rootfs + docker build -t pierres/archlinux . + +.PHONY: rootfs docker-image diff --git a/exclude b/exclude new file mode 100644 index 0000000..e56fc11 --- /dev/null +++ b/exclude @@ -0,0 +1,13 @@ +.dockerenv +.dockerinit +etc/hostname +etc/machine-id +etc/pacman.d/gnupg/openpgp-revocs.d/* +etc/pacman.d/gnupg/private-keys-v1.d/* +etc/pacman.d/gnupg/pubring.gpg~ +etc/pacman.d/gnupg/S.gpg-agent* +root/* +tmp/* +var/cache/pacman/pkg/* +var/lib/pacman/sync/* +var/tmp/* diff --git a/packages b/packages new file mode 100644 index 0000000..044c253 --- /dev/null +++ b/packages @@ -0,0 +1,14 @@ +diffutils +gettext +grep +inetutils +iproute2 +iputils +pacman +procps-ng +psmisc +sed +tar +util-linux +which +gzip diff --git a/rootfs/etc/locale.conf b/rootfs/etc/locale.conf new file mode 100644 index 0000000..01ec548 --- /dev/null +++ b/rootfs/etc/locale.conf @@ -0,0 +1 @@ +LANG=en_US.UTF-8 diff --git a/rootfs/etc/locale.gen b/rootfs/etc/locale.gen new file mode 100644 index 0000000..a66d814 --- /dev/null +++ b/rootfs/etc/locale.gen @@ -0,0 +1 @@ +en_US.UTF-8 UTF-8 diff --git a/rootfs/etc/pacman.conf b/rootfs/etc/pacman.conf new file mode 100644 index 0000000..4a79cbd --- /dev/null +++ b/rootfs/etc/pacman.conf @@ -0,0 +1,14 @@ +[options] +CacheDir = /tmp/pacman/pkg +Architecture = auto +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +[community] +Include = /etc/pacman.d/mirrorlist diff --git a/rootfs/etc/pacman.d/mirrorlist b/rootfs/etc/pacman.d/mirrorlist new file mode 100644 index 0000000..e766561 --- /dev/null +++ b/rootfs/etc/pacman.d/mirrorlist @@ -0,0 +1 @@ +Server = http://mirror.leaseweb.net/archlinux/$repo/os/$arch