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)