When using docker exceptions similar to:
can sometimes occur.
This was caused by the docker repository code calling out to the search service while holding an active component transaction. If the search service needed to check permissions (in order to filter results) then that could involve a nested transaction to a different database and lead to the above exception.
The solution was to temporarily pause the component transaction when calling out to the search service.