forked from veepee-oss/influxdb-relay
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile.docker
34 lines (23 loc) · 957 Bytes
/
Makefile.docker
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
REPO_VERSION=$(shell git describe --abbrev=0 --tag)
IMAGE_VERSION=$(REPO_VERSION)
DOCKER_FILE?=./
NETWORK_NAME?=host
REGISTRY=tonimoreno
DATE=$(shell date +%Y%m%d%H%M%S )
.PHONY: all clean-image clean build-image build push force-build-image force-build run
all: build
clean-image:
docker rmi $(REGISTRY)/influxdb-srelay:$(REPO_VERSION)
clean: clean-image
build-image:
docker build -t $(REGISTRY)/influxdb-srelay:$(IMAGE_VERSION) $(DOCKER_FILE)
docker build -t $(REGISTRY)/influxdb-srelay:latest $(DOCKER_FILE)
build: build-image
push:
docker push $(REGISTRY)/influxdb-srelay:$(IMAGE_VERSION)
docker push $(REGISTRY)/influxdb-srelay:latest
force-build-image:
docker rmi -f $(REGISTRY)/influxdb-srelay:$(IMAGE_VERSION)
docker rmi -f $(REGISTRY)/influxdb-srelay:latest
docker build --no-cache -t $(REGISTRY)/influxdb-srelay:$(IMAGE_VERSION) $(DOCKER_FILE)
docker build --no-cache -t $(REGISTRY)/influxdb-srelay:latest $(DOCKER_FILE)