Containers open and close with every script run and then they're deleted. Never reopened.
Do you run the scripts as a specific user inside the container then? I was under the impression that running untrusted code in Docker as UID 0 was not yet safe.