forked from jaegertracing/jaeger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (28 loc) · 1.22 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
VERSION := 1.0.0
ROOT_IMAGE ?= alpine:3.16
CERT_IMAGE := $(ROOT_IMAGE)
GOLANG_IMAGE := golang:1.19-alpine
DOCKER_REGISTRY ?= localhost:5000
BASE_IMAGE ?= $(DOCKER_REGISTRY)/baseimg_alpine:latest
DEBUG_IMAGE ?= $(DOCKER_REGISTRY)/debugimg_alpine:latest
PLATFORMS ?= linux/amd64,linux/s390x,linux/ppc64le,linux/arm64
create-baseimg-debugimg: create-baseimg create-debugimg
create-baseimg: prepare-docker-buildx
docker buildx build -t $(BASE_IMAGE) --push \
--build-arg root_image=$(ROOT_IMAGE) \
--build-arg cert_image=$(CERT_IMAGE) \
--platform=$(PLATFORMS) \
docker/base
create-debugimg: prepare-docker-buildx
docker buildx build -t $(DEBUG_IMAGE) --push \
--build-arg golang_image=$(GOLANG_IMAGE) \
--platform=$(PLATFORMS) \
docker/debug
.PHONY: prepare-docker-buildx
prepare-docker-buildx:
docker buildx inspect jaeger-build > /dev/null || docker buildx create --use --name=jaeger-build --buildkitd-flags="--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host" --driver-opt="network=host"
docker inspect registry > /dev/null || docker run --rm -d -p 5000:5000 --name registry registry:2
.PHONY: clean-docker-buildx
clean-docker-buildx:
docker buildx rm jaeger-build
docker rm -f registry