This repository has been archived on 2020-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
docker-linux-vm/Makefile

28 lines
730 B
Makefile

APPNAME := docker-linux-vm
IMAGENAME := sneak/$(APPNAME)
BUILDTIMEFILENAME := $(shell date -u '+%Y%m%d-%H%M%SZ')
default: build-docker-image
run:
docker run -ti $(IMAGENAME)
dist: build-docker-image
-mkdir -p ./output
docker save $(IMAGENAME) | bzip2 > output/$(BUILDTIMEFILENAME).$(APPNAME).tbz2
hub: upload-docker-image
build-docker-image:
docker build -t $(IMAGENAME) .
upload-docker-image: build-docker-image
docker tag $(IMAGENAME) $(IMAGENAME):$(BUILDTIMETAG)
docker push $(IMAGENAME):$(BUILDTIMETAG)
ci-upload-images:
docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_SHA1)
docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_BRANCH)
docker push $(IMAGENAME):$(CIRCLE_SHA1)
docker push $(IMAGENAME):$(CIRCLE_BRANCH)