forked from blacktop/docker-kibana-alpine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (20 loc) · 855 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
REPO=blacktop
NAME=kibana
BUILD ?= 5.4
LATEST ?= 5.4
all: build size test
build:
cd $(BUILD); docker build -t $(REPO)/$(NAME):$(BUILD) .
size: build
ifeq "$(BUILD)" "$(LATEST)"
sed -i.bu 's/docker%20image-.*-blue/docker%20image-$(shell docker images --format "{{.Size}}" $(REPO)/$(NAME):$(BUILD)| cut -d' ' -f1)-blue/' README.md
sed -i.bu '/latest/ s/[0-9.]\{3,5\}MB/$(shell docker images --format "{{.Size}}" $(REPO)/$(NAME):$(BUILD))/' README.md
endif
sed -i.bu '/$(BUILD)/ s/[0-9.]\{3,5\}MB/$(shell docker images --format "{{.Size}}" $(REPO)/$(NAME):$(BUILD))/' README.md
tags:
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" $(REPO)/$(NAME)
test:
docker run --rm $(REPO)/$(NAME):$(BUILD)
run:
docker run -d --name krun --link esrun:elasticsearch -p 5601:5601 $(REPO)/$(NAME):$(BUILD)
.PHONY: build size tags test run