mirror of
https://github.com/luzifer-docker/archlinux.git
synced 2024-12-20 11:01:23 +00:00
Add task to push local image
This commit is contained in:
parent
4a03bbb541
commit
fd90632ef2
3 changed files with 13 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
*~
|
*~
|
||||||
*.orig
|
*.orig
|
||||||
/.idea
|
/.idea
|
||||||
|
/archlinux.tar
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
FROM scratch
|
FROM scratch
|
||||||
ADD archlinux.tar.xz /
|
ADD archlinux.tar /
|
||||||
CMD ["/usr/bin/bash"]
|
CMD ["/usr/bin/bash"]
|
||||||
|
|
15
Makefile
15
Makefile
|
@ -1,14 +1,21 @@
|
||||||
|
DOCKER_USER := 'pierres'
|
||||||
|
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 -rvp --backup --suffix=.pacnew rootfs/* $(TMPDIR)/
|
cp -rp --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
|
||||||
tar --numeric-owner --xattrs --acls --exclude-from=exclude -C $(TMPDIR) -c . -Jvf archlinux.tar.xz
|
tar --numeric-owner --xattrs --acls --exclude-from=exclude -C $(TMPDIR) -c . -f archlinux.tar
|
||||||
rm -rf $(TMPDIR)
|
rm -rf $(TMPDIR)
|
||||||
|
|
||||||
docker-image: rootfs
|
docker-image: rootfs
|
||||||
docker build -t pierres/archlinux .
|
docker build -t $(DOCKER_USER)/$(DOCKER_IMAGE) .
|
||||||
|
|
||||||
.PHONY: rootfs docker-image
|
docker-push: docker-image
|
||||||
|
docker login -u $(DOCKER_USER)
|
||||||
|
docker push $(DOCKER_USER)/$(DOCKER_IMAGE)
|
||||||
|
|
||||||
|
.PHONY: rootfs docker-image docker-push
|
||||||
|
|
Loading…
Reference in a new issue