dockerized-workstation/Makefile

21 lines
500 B
Makefile
Raw Normal View History

REMOTEHOST := root@las2.bounce
2019-01-11 07:04:02 +00:00
IMAGENAME := sneak/dockerized-workstation
2019-01-23 16:26:12 +00:00
YYYYMMDD := $(shell date +%Y%m%d)
2019-01-11 06:22:53 +00:00
default: remote-build
build:
2019-01-23 16:26:12 +00:00
docker build -t $(IMAGENAME):$(YYYYMMDD) .
2019-01-11 06:22:53 +00:00
upload:
rsync -avP --delete ./ $(REMOTEHOST):dockerized-workstation/
2019-01-11 06:22:53 +00:00
remote-build: upload
ssh -t $(REMOTEHOST) "cd dockerized-workstation && make build"
2019-01-11 07:04:02 +00:00
2019-01-23 16:26:12 +00:00
publish:
ssh -t $(REMOTEHOST) "cd dockerized-workstation && docker push $(IMAGENAME):$(YYYYMMDD)"
2019-01-11 07:04:02 +00:00
tryout:
ssh -t $(REMOTEHOST) "docker run -ti $(IMAGENAME)"