Created
November 2, 2017 15:00
-
-
Save alexandrnikitin/d59a88a27e7b824920054eebd0b1e56a to your computer and use it in GitHub Desktop.
Revisions
-
alexandrnikitin created this gist
Nov 2, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ NS = docker.repo.com REPO = image/name VERSION ?= v0.1.0 NAME = dsp-pricing-data-distribution-build INSTANCE = default .PHONY: build push shell run start stop rm tag_latest release build: docker build -t $(NS)/$(REPO):$(VERSION) . push: docker push $(NS)/$(REPO):$(VERSION) docker push $(NS)/$(REPO):latest shell: docker run --rm --name $(NAME)-$(INSTANCE) -i -t $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION) /bin/bash run: docker run --rm --name $(NAME)-$(INSTANCE) $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION) $(CMD) start: docker run -d --name $(NAME)-$(INSTANCE) $(PORTS) $(VOLUMES) $(ENV) $(NS)/$(REPO):$(VERSION) stop: docker stop $(NAME)-$(INSTANCE) rm: docker rm $(NAME)-$(INSTANCE) tag_latest: docker tag $(NS)/$(REPO):$(VERSION) $(NS)/$(REPO):latest release: build tag_latest make push -e VERSION=$(VERSION)