forked from osminogin/docker-electrum-daemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 909 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ELECTRUM_VERSION = $(strip $(shell cat VERSION))
ELECTRUM_CHECKSUM_SHA512 = $(strip $(shell cat CHECKSUM_SHA512))
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
DOCKER_IMAGE ?= osminogin/electrum-daemon
DOCKER_TAG = $(ELECTRUM_VERSION)
# Build Docker image
build: docker_build docker_tag output
# Build and push Docker image
release: docker_tag docker_push output
default: docker_build output
docker_build:
@docker build \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VERSION=$(ELECTRUM_VERSION) \
--build-arg CHECKSUM_SHA512=$(ELECTRUM_CHECKSUM_SHA512) \
--build-arg VCS_REF=$(GIT_COMMIT) \
-t $(DOCKER_IMAGE):$(DOCKER_TAG) .
docker_tag:
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest
docker_push:
docker push $(DOCKER_IMAGE):latest
docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
output:
@echo Docker Image: $(DOCKER_IMAGE):$(DOCKER_TAG)