The point of this is to separate dockerfiles and build them on top of each other wherever possible. Then we can build them interdependently with makefiles!
12 lines
373 B
Makefile
12 lines
373 B
Makefile
#.PHONY: built/%.sentinel
|
|
|
|
docker_src = /devel/docker
|
|
${docker_src}/built/%.sentinel: ${docker_src}/%.dockerfile
|
|
grep -e '^FROM' "$*".dockerfile | awk '{print $$2}' \
|
|
| tr : _ | xargs -I{} $(MAKE) ${docker_src}/built/{}.sentinel;
|
|
cd ${docker_src}; docker build -f $< --tag $* .;
|
|
touch $@;
|
|
|
|
${docker_src}/built/debian_10.sentinel:
|
|
docker pull "debian:10" && touch $@;
|