-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vladimir Osintsev
committed
Jan 22, 2018
1 parent
1af721b
commit 20e5378
Showing
3 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
ELECTRUM_VERSION = $(strip $(shell cat VERSION)) | ||
|
||
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD)) | ||
|
||
DOCKER_IMAGE ?= osminogin/electrum-daemon | ||
DOCKER_TAG = $(ELECTRUM_VERSION) | ||
|
||
default: docker_build | ||
# Build Docker image | ||
build: docker_build output | ||
|
||
# Build and push Docker image | ||
release: docker_build docker_push output | ||
|
||
default: docker_build output | ||
|
||
docker_build: | ||
@docker build \ | ||
--build-arg VERSION=$(ELECTRUM_VERSION) \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
-t $(DOCKER_IMAGE):$(DOCKER_TAG) . | ||
--build-arg VERSION=$(ELECTRUM_VERSION) \ | ||
--build-arg VCS_REF=$(GIT_COMMIT) \ | ||
-t $(IMAGE_NAME) . | ||
|
||
docker_push: | ||
docker tag $(IMAGE_NAME) $(DOCKER_IMAGE):latest | ||
docker push $(IMAGE_NAME) | ||
docker push $(DOCKER_IMAGE):latest | ||
|
||
output: | ||
@echo Docker Image: $(DOCKER_IMAGE):$(DOCKER_TAG) |
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
make | ||
make release |