Commit 592e77d8 authored by Pierre Schmitz's avatar Pierre Schmitz
Browse files

Move image to archlinux organization on dockerhub

parent d227b73c
DOCKER_USER:=pierres
DOCKER_IMAGE:=archlinux
DOCKER_ORGANIZATION=archlinux
DOCKER_IMAGE:=base
rootfs:
$(eval TMPDIR := $(shell mktemp -d))
......@@ -12,22 +13,22 @@ rootfs:
rm -rf $(TMPDIR)
docker-image: rootfs
docker build -t $(DOCKER_USER)/$(DOCKER_IMAGE) .
docker build -t $(DOCKER_ORGANIZATION)/$(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 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"
# Ensure that the image does not include a private key
! docker run --rm $(DOCKER_USER)/$(DOCKER_IMAGE) pacman-key --lsign-key pierre@archlinux.de
! docker run --rm $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE) pacman-key --lsign-key pierre@archlinux.de
ci-test:
docker run --rm --privileged --tmpfs=/tmp:exec --tmpfs=/run/shm -v /run/docker.sock:/run/docker.sock \
-v $(PWD):/app -w /app $(DOCKER_USER)/$(DOCKER_IMAGE) \
-v $(PWD):/app -w /app $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE) \
sh -c 'pacman -Syu --noconfirm make devtools docker && make docker-image-test'
docker-push: docker-image-test
docker login -u $(DOCKER_USER)
docker push $(DOCKER_USER)/$(DOCKER_IMAGE)
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE)
.PHONY: rootfs docker-image docker-image-test ci-test docker-push
......@@ -5,7 +5,7 @@ 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*
etc/pacman.d/gnupg/S.*
root/*
tmp/*
var/cache/pacman/pkg/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment