1
0
mirror of https://github.com/rancher/os.git synced 2025-09-13 05:33:34 +00:00
Files
os/Makefile

31 lines
656 B
Makefile
Raw Normal View History

2021-06-05 17:31:50 -07:00
.DEFAULT_GOAL := iso
REPO?=ibuildthecloud/test
LABEL?=latest
2021-06-25 11:01:35 -07:00
IMAGE=${REPO}:${LABEL}
2021-06-05 17:31:50 -07:00
TOOLS=${IMAGE}-tools
.PHONY: build
build:
2021-06-25 11:01:35 -07:00
docker build \
--build-arg CACHEBUST="${CACHEBUST}" \
--build-arg OS_LABEL=${LABEL} \
--build-arg OS_REPO=${REPO} \
-t ${IMAGE} .
2021-06-05 17:31:50 -07:00
.PHONY: push
push: build
docker push ${IMAGE}
.PHONY: tools
tools:
docker build -t ${TOOLS} --target tools .
.PHONY: iso
iso: tools
2021-06-05 17:31:50 -07:00
mkdir -p build
rm -f build/iso-container
docker run -it --cidfile=build/iso-container ${TOOLS} makeiso ${IMAGE}
2021-06-05 17:31:50 -07:00
docker cp $$(cat build/iso-container):/output.iso build/output.iso
docker rm -fv $$(cat build/iso-container)
rm -f build/iso-container