-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (26 loc) · 677 Bytes
/
Makefile
File metadata and controls
30 lines (26 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.DEFAULT_GOAL := iso
REPO?=ibuildthecloud/test
LABEL?=latest
IMAGE=${REPO}:${LABEL}
TOOLS=${IMAGE}-tools
.PHONY: build
build:
docker build \
--build-arg CACHEBUST="${CACHEBUST}" \
--build-arg OS_LABEL=${LABEL} \
--build-arg OS_REPO=${REPO} \
-t ${IMAGE} .
.PHONY: push
push: build
docker push ${IMAGE}
.PHONY: tools
tools:
docker build -t ${TOOLS} --target tools .
.PHONY: iso
iso: tools
mkdir -p build
rm -f build/iso-container
docker run -v /var/run:/var/run -it --cidfile=build/iso-container ${TOOLS} makeiso ${IMAGE}
docker cp $$(cat build/iso-container):/output.iso build/output.iso
docker rm -fv $$(cat build/iso-container)
rm -f build/iso-container