2023-02-12 12:53:42 +00:00
|
|
|
SHELL := bash
|
|
|
|
CPU_CORES := $(shell N=$$(nproc); echo $$(( $$N > 4 ? 4 : $$N )))
|
|
|
|
|
|
|
|
BAKE_FILES = \
|
|
|
|
docker-bake.json \
|
|
|
|
docker-bake.api.json \
|
|
|
|
docker-bake.front.json
|
|
|
|
|
|
|
|
docker-bake.%.json:
|
|
|
|
./scripts/build_metadata.py --format bake --bake-target $* --bake-image docker.io/funkwhale/$* > $@
|
|
|
|
|
2023-06-13 10:40:38 +00:00
|
|
|
docker-metadata: $(BAKE_FILES)
|
|
|
|
|
|
|
|
docker-build: docker-metadata
|
2023-02-12 12:53:42 +00:00
|
|
|
docker buildx bake $(foreach FILE,$(BAKE_FILES), --file $(FILE)) --print $(BUILD_ARGS)
|
|
|
|
docker buildx bake $(foreach FILE,$(BAKE_FILES), --file $(FILE)) $(BUILD_ARGS)
|
2023-06-13 10:40:38 +00:00
|
|
|
|
|
|
|
build-metadata:
|
|
|
|
./scripts/build_metadata.py --format env | tee build_metadata.env
|