mirror of
https://github.com/containers/skopeo.git
synced 2025-06-23 21:38:02 +00:00
Merge pull request #677 from edsantiago/wait_for_registry
start_registry: wait for registry to be ready
This commit is contained in:
commit
524f6c0682
@ -310,6 +310,18 @@ start_registry() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
$PODMAN run -d --name $name "${reg_args[@]}" registry:2
|
$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
|
# END helpers for starting/stopping registries
|
||||||
|
Loading…
Reference in New Issue
Block a user