mirror of
https://github.com/luzifer-docker/archlinux.git
synced 2024-11-08 15:30:09 +00:00
Fix permissions and add basic image test
This commit is contained in:
parent
fd90632ef2
commit
9a19fbb335
1 changed files with 8 additions and 3 deletions
11
Makefile
11
Makefile
|
@ -4,7 +4,7 @@ DOCKER_IMAGE := 'archlinux'
|
||||||
rootfs:
|
rootfs:
|
||||||
$(eval TMPDIR := $(shell mktemp -d))
|
$(eval TMPDIR := $(shell mktemp -d))
|
||||||
pacstrap -C /usr/share/devtools/pacman-extra.conf -c -d -G -M $(TMPDIR) $(shell cat packages)
|
pacstrap -C /usr/share/devtools/pacman-extra.conf -c -d -G -M $(TMPDIR) $(shell cat packages)
|
||||||
cp -rp --backup --suffix=.pacnew rootfs/* $(TMPDIR)/
|
cp --recursive --preserve=timestamps --backup --suffix=.pacnew rootfs/* $(TMPDIR)/
|
||||||
arch-chroot $(TMPDIR) locale-gen
|
arch-chroot $(TMPDIR) locale-gen
|
||||||
arch-chroot $(TMPDIR) pacman-key --init
|
arch-chroot $(TMPDIR) pacman-key --init
|
||||||
arch-chroot $(TMPDIR) pacman-key --populate archlinux
|
arch-chroot $(TMPDIR) pacman-key --populate archlinux
|
||||||
|
@ -14,8 +14,13 @@ rootfs:
|
||||||
docker-image: rootfs
|
docker-image: rootfs
|
||||||
docker build -t $(DOCKER_USER)/$(DOCKER_IMAGE) .
|
docker build -t $(DOCKER_USER)/$(DOCKER_IMAGE) .
|
||||||
|
|
||||||
docker-push: docker-image
|
docker-image-test: docker-image
|
||||||
|
# FIXME: /etc/mtab is hidden by docker so the stricter -Qkk fails
|
||||||
|
docker run --rm $(DOCKER_USER)/$(DOCKER_IMAGE) sh -c "/usr/bin/pacman -Sy && /usr/bin/pacman -Qqk"
|
||||||
|
docker run --rm $(DOCKER_USER)/$(DOCKER_IMAGE) sh -c "/usr/bin/pacman -Syu --noconfirm docker && docker -v"
|
||||||
|
|
||||||
|
docker-push: docker-image-test
|
||||||
docker login -u $(DOCKER_USER)
|
docker login -u $(DOCKER_USER)
|
||||||
docker push $(DOCKER_USER)/$(DOCKER_IMAGE)
|
docker push $(DOCKER_USER)/$(DOCKER_IMAGE)
|
||||||
|
|
||||||
.PHONY: rootfs docker-image docker-push
|
.PHONY: rootfs docker-image docker-image-test docker-push
|
||||||
|
|
Loading…
Reference in a new issue