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.
2019-11-13 05:24:58 +00:00
|
|
|
APPNAME := docker-linux-vm
|
|
|
|
IMAGENAME := sneak/$(APPNAME)
|
|
|
|
BUILDTIMEFILENAME := $(shell date -u '+%Y%m%d-%H%M%SZ')
|
2019-11-13 01:08:07 +00:00
|
|
|
|
2019-11-13 05:24:58 +00:00
|
|
|
default: build-docker-image
|
2019-11-13 05:20:55 +00:00
|
|
|
|
|
|
|
run:
|
2019-11-13 05:24:58 +00:00
|
|
|
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)
|