podman command never returns when hook configured with either prestart/poststart for this corresponding hook handler
/usr/local/bin/podman-hook-prestart
#!/bin/bash
input="-"
CONTAINER_CONFIG=$(cat "$input")
CONTAINER_ID=$(echo "$CONTAINER_CONFIG" | jq -r ".id")
# Get the name of the container using podman inspect
CONTAINER_NAME=$(sudo podman inspect "$CONTAINER_ID" | jq -r '.[0].Name')
# Update the container state with the container name annotation
UPDATED_CONFIG=$(echo "$CONTAINER_CONFIG" | jq ".annotations += {\"container_name\": \"${CONTAINER_NAME}\"}")
echo "$UPDATED_CONFIG"
Podman holds a lock for the critical container sections such as executing hooks so if you call another podman command from within that tries to take the same lock it will deadlock.
podman command never returns when hook configured with either prestart/poststart for this corresponding hook handler
/usr/local/bin/podman-hook-prestart