Add initial implementation

This commit is contained in:
Pierre Schmitz 2017-04-08 18:10:19 +02:00
parent af420fab5a
commit f5bf444d43
9 changed files with 64 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*~
*.orig
/.idea

3
Dockerfile Normal file
View file

@ -0,0 +1,3 @@
FROM scratch
ADD archlinux.tar.xz /
CMD ["/usr/bin/bash"]

14
Makefile Normal file
View file

@ -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

13
exclude Normal file
View file

@ -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/*

14
packages Normal file
View file

@ -0,0 +1,14 @@
diffutils
gettext
grep
inetutils
iproute2
iputils
pacman
procps-ng
psmisc
sed
tar
util-linux
which
gzip

1
rootfs/etc/locale.conf Normal file
View file

@ -0,0 +1 @@
LANG=en_US.UTF-8

1
rootfs/etc/locale.gen Normal file
View file

@ -0,0 +1 @@
en_US.UTF-8 UTF-8

14
rootfs/etc/pacman.conf Normal file
View file

@ -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

View file

@ -0,0 +1 @@
Server = http://mirror.leaseweb.net/archlinux/$repo/os/$arch