forked from amancevice/docker-superset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (34 loc) · 1003 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
33
34
35
36
37
38
39
40
41
42
43
REPO := superset
PYTHON_VERSION := 3.8
SUPERSET_VERSION := 2.1.0rc3
build: requirements-dev.txt
docker build \
--platform linux/amd64 \
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
--build-arg SUPERSET_VERSION=$(SUPERSET_VERSION) \
--tag $(REPO) \
--tag $(REPO):$(SUPERSET_VERSION) \
.
clean:
docker image ls --quiet $(REPO) | uniq | xargs docker image rm --force
edge: requirements-dev.txt
docker build \
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
--build-arg SUPERSET_VERSION=master \
--file Dockerfile.edge \
--tag $(REPO):edge \
.
push:
docker tag $(REPO):$(SUPERSET_VERSION) ghcr.io/idinsight/$(REPO):$(SUPERSET_VERSION)
docker push ghcr.io/idinsight/$(REPO):$(SUPERSET_VERSION)
.PHONY: build clean demo edge push
requirements-dev.txt: requirements.txt
pipenv requirements --dev > $@
requirements.txt: Pipfile.lock
pipenv requirements > $@
Pipfile.lock: Pipfile | .venv
pipenv lock
touch .venv
.venv:
mkdir -p $@
pipenv --python $(PYTHON_VERSION)