-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
21 lines (16 loc) · 655 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"
# The following is for local builds only, it is not used by the CI/CD pipeline
all: image-base image-base-devel
image-%: $(OUTPUTDIR)/Dockerfile.%
${OCITOOL} build -f $(OUTPUTDIR)/Dockerfile.$(*) -t loongcr.lcpu.dev/lcpu/archlinux:$(*) $(OUTPUTDIR)