Skip to content

Commit 01ec497

Browse files
committed
chore: relax start check of unregistry container
1 parent 360d0d2 commit 01ec497

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

docker-pussh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,20 +224,14 @@ run_unregistry() {
224224
--user root:root \
225225
${UNREGISTRY_IMAGE}" 2>&1);
226226
then
227-
# Wait a moment for the container to start
228-
sleep 1
229-
230-
# Verify the container is actually running and healthy
231-
if ssh "${SSH_ARGS[@]}" "${REMOTE_SUDO} docker ps --filter name=${UNREGISTRY_CONTAINER} --filter status=running --quiet" | grep -q .; then
232-
return 0
233-
fi
227+
return 0
234228
fi
235229

236230
# Remove the container that failed to start if it was created.
237231
# shellcheck disable=SC2029
238232
ssh "${SSH_ARGS[@]}" "${REMOTE_SUDO} docker rm -f ${UNREGISTRY_CONTAINER}" >/dev/null 2>&1 || true
239233
# Check if the error is due to port binding.
240-
if ! echo "${output}" | grep -q --ignore-case "bind.*${UNREGISTRY_PORT}"; then
234+
if ! echo "${output}" | grep -q --ignore-case "bind"; then
241235
error "Failed to start unregistry container:\n${output}"
242236
fi
243237
done

0 commit comments

Comments
 (0)