1
0
mirror of https://github.com/containers/skopeo.git synced 2025-05-06 06:56:57 +00:00

Merge pull request from edsantiago/wait_for_registry

start_registry: wait for registry to be ready
This commit is contained in:
Miloslav Trmač 2019-06-13 18:48:59 +02:00 committed by GitHub
commit 524f6c0682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,6 +310,18 @@ start_registry() {
fi
$PODMAN run -d --name $name "${reg_args[@]}" registry:2
# Wait for registry to actually come up
timeout=10
while [[ $timeout -ge 1 ]]; do
if curl localhost:$port/; then
return
fi
timeout=$(expr $timeout - 1)
sleep 1
done
die "Timed out waiting for registry container to respond on :$port"
}
# END helpers for starting/stopping registries