Run-script-before-required fails

My answer that you quoted:

if you don’t want to reuse something already mapped.

This was never suggested, but you might have misread it as “script inside the container”.
“just give Duplicati its path inside the container” means map it into the container, and give Duplicati the inside-the-container path to wherever you placed it. Duplicati can then see it.

You map things into the container so they can be referenced by path inside the container.

I think we’re in huge agreement. That’s what I had said in your quoted text of

There is a whole chapter there with extensive examples which describe more.
If you have specific questions, please ask, but please see documentation too.

EDIT:

Documentation is for generic Duplicati. It does not get into Docker-only issues.

I used the search box at top right to type in

docker script on the host

Handshake between docker-duplicati and host popped up, and there are others.
Or maybe there’s some way for script to reach outside the container sufficiently.
Another question is whether there are programs you need to run from the script.
Trying to run host executables sounds a bit iffy to me, but I’m no Docker wizard.
Sometimes a web search or a specialty forum can turn up answers to questions.