-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 673 Bytes
/
Makefile
File metadata and controls
32 lines (27 loc) · 673 Bytes
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
REGISTRY ?= ayaan49
VERSION ?= latest
PLATFORM ?= linux/amd64,linux/arm64
BUILD ?= $(shell date +%Y%m%d%H%M%S)
BUILDKIT_HOST = tcp://buildkitd:1234
.PHONY: builder client api
builder:
docker buildx create \
--name imagebuilder \
--driver=remote \
$(BUILDKIT_HOST) \
--driver-opt=cacert=/certs/ca.pem,cert=/certs/cert.pem,key=/certs/key.pem \
--bootstrap --use || true
client: builder
docker buildx build \
--platform $(PLATFORM) \
-f client/Dockerfile \
-t $(REGISTRY)/client:$(VERSION) \
client/ \
--push
api: builder
docker buildx build \
--platform $(PLATFORM) \
-f api/Dockerfile \
-t $(REGISTRY)/api:$(VERSION) \
api/ \
--push