40 lines
890 B
Makefile
40 lines
890 B
Makefile
default: buildall
|
|
|
|
VOLUME ?= cloner-test
|
|
GLOBALVOL ?= cloner-global
|
|
TAGOWNER = valicek1
|
|
TAGMAIN = repo-cloner
|
|
TAGBASE= $(TAGOWNER)/$(TAGMAIN)
|
|
|
|
|
|
buildall: mirror creator launcher
|
|
|
|
cloner:
|
|
docker build -t $(TAGBASE) .
|
|
|
|
run: cloner
|
|
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE)
|
|
|
|
run-once: cloner
|
|
docker run -v $(GLOBALVOL):/data -it --rm --user=executor $(TAGBASE) /usr/local/bin/cron-command
|
|
|
|
run-bash: cloner
|
|
docker run -v $(GLOBALVOL):/data -it --rm $(TAGBASE) /bin/bash
|
|
|
|
|
|
# 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
|
|
|
|
# wizzard
|
|
# auth dir could be executable (to list)
|
|
wizzard: mirror run-creator
|
|
|
|
# CI Detector
|
|
detector:
|
|
docker build -t cloner-mirror-dev .
|
|
docker run -it --rm -v tester-gitt:/data cloner-mirror-dev
|