You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

28 lines
730B

  1. APPNAME := docker-linux-vm
  2. IMAGENAME := sneak/$(APPNAME)
  3. BUILDTIMEFILENAME := $(shell date -u '+%Y%m%d-%H%M%SZ')
  4. default: build-docker-image
  5. run:
  6. docker run -ti $(IMAGENAME)
  7. dist: build-docker-image
  8. -mkdir -p ./output
  9. docker save $(IMAGENAME) | bzip2 > output/$(BUILDTIMEFILENAME).$(APPNAME).tbz2
  10. hub: upload-docker-image
  11. build-docker-image:
  12. docker build -t $(IMAGENAME) .
  13. upload-docker-image: build-docker-image
  14. docker tag $(IMAGENAME) $(IMAGENAME):$(BUILDTIMETAG)
  15. docker push $(IMAGENAME):$(BUILDTIMETAG)
  16. ci-upload-images:
  17. docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_SHA1)
  18. docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_BRANCH)
  19. docker push $(IMAGENAME):$(CIRCLE_SHA1)
  20. docker push $(IMAGENAME):$(CIRCLE_BRANCH)