diff --git a/Makefile b/Makefile index 37bf8ea..7e3173f 100644 --- a/Makefile +++ b/Makefile @@ -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)