mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-05 19:47:37 +09:00
Add Dockerfile for building kilo from upstream main branch source with patch support, CNI plugins, and iptables-wrapper. Update Makefile with `image:` target for building the patched image and an updated `update:` target that pins the upstream commit SHA. Signed-off-by: Arsolitt <arsolitt@gmail.com>
23 lines
770 B
Makefile
23 lines
770 B
Makefile
export NAME=kilo
|
|
export NAMESPACE=cozy-$(NAME)
|
|
|
|
include ../../../hack/common-envs.mk
|
|
include ../../../hack/package.mk
|
|
|
|
update:
|
|
sha=$$(git ls-remote https://github.com/squat/kilo refs/heads/main | awk '{print $$1}') && \
|
|
sed -i "/ARG VERSION/ s|=.*|=$${sha}|g" images/kilo/Dockerfile
|
|
|
|
image:
|
|
docker buildx build images/kilo \
|
|
--tag $(REGISTRY)/kilo:$(call settag,$(TAG)) \
|
|
--cache-from type=registry,ref=$(REGISTRY)/kilo:latest \
|
|
--cache-to type=inline \
|
|
--metadata-file images/kilo.json \
|
|
$(BUILDX_ARGS)
|
|
REPOSITORY="$(REGISTRY)/kilo" \
|
|
yq -i '.kilo.image.repository = strenv(REPOSITORY)' values.yaml
|
|
TAG=$(TAG)@$$(yq e '."containerimage.digest"' images/kilo.json -o json -r) \
|
|
yq -i '.kilo.image.tag = strenv(TAG)' values.yaml
|
|
rm -f images/kilo.json
|