-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
30 lines (22 loc) · 907 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
all: clean extension install
ORG=mochoa
JUPYTER_IMAGE_NAME=jupyter/scipy-notebook
VERSION=22.4
MINOR=2
IMAGE_NAME=$(ORG)/jupyter-docker-extension
TAGGED_IMAGE_NAME=$(IMAGE_NAME):$(VERSION).${MINOR}
clean:
-docker extension rm $(IMAGE_NAME)
-docker rmi $(TAGGED_IMAGE_NAME)
extension:
docker buildx build -t $(TAGGED_IMAGE_NAME) --build-arg VERSION=$(VERSION) --build-arg JUPYTER_IMAGE_NAME=$(JUPYTER_IMAGE_NAME) .
install:
docker extension install -f $(TAGGED_IMAGE_NAME)
validate: extension
docker extension validate $(TAGGED_IMAGE_NAME)
update: extension
docker extension update $(TAGGED_IMAGE_NAME)
multiarch:
docker buildx create --name=buildx-multi-arch --driver=docker-container --driver-opt=network=host
build:
docker buildx build --push --builder=buildx-multi-arch --platform=linux/amd64,linux/arm64 --build-arg JUPYTER_IMAGE_NAME=$(JUPYTER_IMAGE_NAME) --tag=$(TAGGED_IMAGE_NAME) .