Add Makefile targets to build rootfs tarballs and Docker images with cleaning support
This commit is contained in:
parent
4be5504641
commit
31979b86c3
1 changed files with 20 additions and 0 deletions
20
Makefile
Normal file
20
Makefile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
OCITOOL=docker
|
||||||
|
BUILDDIR=$(shell pwd)/build
|
||||||
|
OUTPUTDIR=$(shell pwd)/output
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf $(BUILDDIR) $(OUTPUTDIR)
|
||||||
|
|
||||||
|
.PRECIOUS: $(OUTPUTDIR)/%.tar.zst
|
||||||
|
$(OUTPUTDIR)/%.tar.zst:
|
||||||
|
scripts/make-rootfs.sh $(*) $(BUILDDIR) $(OUTPUTDIR)
|
||||||
|
|
||||||
|
.PRECIOUS: $(OUTPUTDIR)/Dockerfile.%
|
||||||
|
$(OUTPUTDIR)/Dockerfile.%: $(OUTPUTDIR)/%.tar.zst
|
||||||
|
scripts/make-dockerfile.sh "$(*).tar.zst" $(*) $(OUTPUTDIR) "true" "Dev"
|
||||||
|
|
||||||
|
|
||||||
|
all: image-base image-base-devel image-multilib-devel
|
||||||
|
image-%: $(OUTPUTDIR)/Dockerfile.%
|
||||||
|
${OCITOOL} build -f $(OUTPUTDIR)/Dockerfile.$(*) -t parchlinux/parchlinux:$(*) $(OUTPUTDIR)
|
Loading…
Add table
Add a link
Reference in a new issue