mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2026-04-04 14:51:01 +02:00
this commit takes the relevant repro steps from the wsl image, and wraps breaking changes to only affect the :repro image testing reproducability is not yet included, so we can discuss the approach first
24 lines
913 B
Makefile
24 lines
913 B
Makefile
OCITOOL=podman # or docker
|
|
BUILDDIR=$(shell pwd)/build
|
|
OUTPUTDIR=$(shell pwd)/output
|
|
ARCHIVE_SNAPSHOT=$(shell date -d "$(awk -F. '{print $1"-"$2"-"$3}' <<< "$IMAGE_VERSION") -1 day" +"%Y/%m/%d")
|
|
SOURCE_DATE_EPOCH=$(shell date -u -d "$(echo "$ARCHIVE_SNAPSHOT")" +"%s")
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf $(BUILDDIR) $(OUTPUTDIR)
|
|
|
|
.PRECIOUS: $(OUTPUTDIR)/%.tar.zst
|
|
$(OUTPUTDIR)/%.tar.zst:
|
|
scripts/make-rootfs.sh $(*) $(BUILDDIR) $(OUTPUTDIR) $(ARCHIVE_SNAPSHOT) $(SOURCE_DATE_EPOCH)
|
|
|
|
.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-repro image-base image-base-devel image-multilib-devel
|
|
image-%: $(OUTPUTDIR)/Dockerfile.%
|
|
${OCITOOL} build -f $(OUTPUTDIR)/Dockerfile.$(*) -t archlinux/archlinux:$(*) $(OUTPUTDIR)
|