Makefile: start the stopped build registry instead of waiting for it forever

After a reboot the registry container exists but is stopped; docker
inspect succeeded, nothing started it, and the readiness loop never ended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Виталий Чефанов
2026-09-24 17:36:40 +03:00
co-authored by Claude Opus 5.5
parent 3cdc2583ee
commit f24eaa3f23
+4 -1
View File
@@ -57,10 +57,13 @@ base_images.yml:
base-images: base_images.yml
# The container survives a reboot stopped, so it is started, not only created.
build-registry:
@docker inspect cluster-map-build-registry >/dev/null 2>&1 || \
docker run -d --name cluster-map-build-registry -p 127.0.0.1:5555:5000 -v cluster-map-build-registry:/var/lib/registry registry:2 >/dev/null
@until curl -sf http://$(BUILD_REGISTRY)/v2/ >/dev/null; do sleep 1; done
@docker start cluster-map-build-registry >/dev/null
@for i in $$(seq 30); do curl -sf http://$(BUILD_REGISTRY)/v2/ >/dev/null && exit 0; sleep 1; done; \
echo "build registry on $(BUILD_REGISTRY) did not come up" >&2; exit 1
build: base_images.yml build-registry
@test -n "$(VERSION)" || (echo "VERSION is required, e.g. VERSION=v0.7.0" && exit 1)