forked from amancevice/docker-superset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (53 loc) · 1.61 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
REPO := txn2/superset
STAGES := build dist final
NODE_VERSION := 12
PYTHON_VERSION := 3.8
SUPERSET_VERSION := 1.0.1
.PHONY: default clean clobber edge latest push
default: latest
.docker:
mkdir -p $@
.docker/$(SUPERSET_VERSION)-dist: .docker/$(SUPERSET_VERSION)-build
.docker/$(SUPERSET_VERSION)-final: .docker/$(SUPERSET_VERSION)-dist
.docker/$(SUPERSET_VERSION)-%: | .docker
docker build \
--build-arg NODE_VERSION=$(NODE_VERSION) \
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
--build-arg SUPERSET_VERSION=$(SUPERSET_VERSION) \
--iidfile $@ \
--tag $(REPO):$(SUPERSET_VERSION)-$* \
--target $* \
.
.docker/edge-dist: .docker/edge-build
.docker/edge-final: .docker/edge-dist
.docker/edge-%: | .docker
docker build \
--build-arg NODE_VERSION=$(NODE_VERSION) \
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
--build-arg SUPERSET_VERSION=master \
--iidfile $@ \
--tag $(REPO):edge-$* \
--target $* \
.
.docker/edge: .docker/edge-final
.docker/latest .docker/$(SUPERSET_VERSION): .docker/$(SUPERSET_VERSION)-final
.docker/%:
docker tag $$(cat $<) $(REPO):$*
cp $< $@
clean:
rm -rf .docker
clobber: clean
docker image ls $(REPO) --quiet | uniq | xargs docker image rm --force
demo: .docker/$(SUPERSET_VERSION)
docker run --detach \
--name superset-$(SUPERSET_VERSION) \
--publish 8088:8088 \
$$(cat $<)
docker exec -it superset-$(SUPERSET_VERSION) superset-demo
docker logs -f superset-$(SUPERSET_VERSION)
edge: .docker/edge
latest: .docker/latest .docker/$(SUPERSET_VERSION)
push:
-docker push $(REPO):$(SUPERSET_VERSION)
-docker push $(REPO):latest
-docker push $(REPO):edge