2019-02-14 17:32:04 +00:00
|
|
|
DOCKER_ORGANIZATION=luzifer
|
|
|
|
DOCKER_IMAGE:=archlinux
|
|
|
|
|
2020-08-30 12:20:10 +00:00
|
|
|
default: seed
|
2019-02-14 17:32:04 +00:00
|
|
|
default: docker-image_minimal
|
2020-08-30 12:20:10 +00:00
|
|
|
default: docker-image-test_latest
|
|
|
|
default: docker-push_latest
|
2019-02-14 17:32:04 +00:00
|
|
|
|
|
|
|
jenkins: docker-image_minimal
|
|
|
|
jenkins: docker-image-test_latest
|
|
|
|
jenkins: docker-push_latest
|
|
|
|
|
|
|
|
jenkins: docker-image_base
|
|
|
|
jenkins: docker-image-test_base
|
|
|
|
jenkins: docker-push_base
|
|
|
|
|
|
|
|
jenkins: docker-image_base-devel
|
|
|
|
jenkins: docker-image-test_base-devel
|
|
|
|
jenkins: docker-push_base-devel
|
|
|
|
|
|
|
|
rootfs_minimal:
|
2019-02-14 18:06:50 +00:00
|
|
|
docker run --rm -i -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" \
|
2019-02-14 18:06:11 +00:00
|
|
|
--privileged --tmpfs=/tmp:exec --tmpfs=/run/shm \
|
|
|
|
$(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest \
|
|
|
|
sh -c 'pacman -Sy --noconfirm devtools tar && bash mkroots.sh'
|
2019-02-14 17:32:04 +00:00
|
|
|
|
|
|
|
rootfs_%:
|
2019-02-14 18:06:50 +00:00
|
|
|
docker run --rm -i -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" \
|
2019-02-14 18:06:11 +00:00
|
|
|
--privileged --tmpfs=/tmp:exec --tmpfs=/run/shm \
|
|
|
|
$(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest \
|
|
|
|
sh -c 'pacman -Sy --noconfirm devtools tar && bash mkroots.sh $*'
|
2019-02-14 17:32:04 +00:00
|
|
|
|
|
|
|
docker-image_minimal: rootfs_minimal
|
|
|
|
docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest .
|
|
|
|
|
|
|
|
docker-image_%:
|
|
|
|
$(MAKE) rootfs_$*
|
|
|
|
docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* .
|
|
|
|
|
|
|
|
docker-image-test_%:
|
2017-04-15 19:14:45 +00:00
|
|
|
# FIXME: /etc/mtab is hidden by docker so the stricter -Qkk fails
|
2019-02-14 17:32:04 +00:00
|
|
|
docker run --rm $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* sh -c "/usr/bin/pacman -Sy && /usr/bin/pacman -Qqk"
|
|
|
|
docker run --rm $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* sh -c "/usr/bin/pacman -Syu --noconfirm docker && docker -v"
|
2017-04-23 13:11:34 +00:00
|
|
|
# Ensure that the image does not include a private key
|
2019-02-14 17:32:04 +00:00
|
|
|
! docker run --rm $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* pacman-key --lsign-key pierre@archlinux.de
|
|
|
|
docker run --rm $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* sh -c "/usr/bin/id -u http"
|
|
|
|
docker run --rm $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$* sh -c "/usr/bin/pacman -Syu --noconfirm grep && locale | grep -q UTF-8"
|
|
|
|
|
|
|
|
docker-push_%:
|
|
|
|
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):$*
|
2017-04-08 16:10:19 +00:00
|
|
|
|
2019-02-14 18:06:11 +00:00
|
|
|
# Special build target to locally build the first minimal image
|
2020-08-30 12:20:10 +00:00
|
|
|
seed: test_archlinux
|
2019-02-14 18:06:11 +00:00
|
|
|
bash mkroots.sh
|
|
|
|
docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE):latest .
|
2020-08-30 12:20:10 +00:00
|
|
|
|
|
|
|
test_archlinux:
|
|
|
|
which pacstrap
|
2019-02-14 18:06:11 +00:00
|
|
|
|
2017-04-23 14:48:06 +00:00
|
|
|
.PHONY: rootfs docker-image docker-image-test ci-test docker-push
|