repo-cloner/Makefile

42 lines
1012 B
Makefile

default: buildall
VOLUME ?= cloner-test
TAGOWNER = valicek1
TAGMAIN = repo-cloner
TAGBASE= $(TAGOWNER)/$(TAGMAIN)
buildall: mirror creator launcher
# Mirrorer - root of repo
mirror:
docker build -t $(TAGBASE)-mirror .
run-mirror: mirror
docker run -v $(VOLUME):/data -it --rm $(TAGBASE)-mirror
# Creator - ./creator-image dir
creator:
docker build -t $(TAGBASE)-creator ./creator-image
run-creator: creator
docker run -v /var/run/docker.sock:/var/run/docker.sock -it --rm $(TAGBASE)-creator
# Launcher - ./launcher-image
launcher:
docker build -t $(TAGBASE)-launcher ./launcher-image
run-launcher: launcher
docker run -e JOBS=4 -v /var/run/docker.sock:/var/run/docker.sock -it --rm $(TAGBASE)-launcher
run-launcher-detached: launcher
docker run -e JOBS=8 -v /var/run/docker.sock:/var/run/docker.sock -itd --rm $(TAGBASE)-launcher
# wizzard
wizzard: mirror run-creator
# CI Detector
detector:
docker build -t cloner-mirror-dev .
docker run -it --rm -v tester-gitt:/data cloner-mirror-dev