Can I run a script outside of container?

As for sudo, it can be configured in docker images as well, although it usually doesn’t make sense, so the question is not if you can run a script in a container but where you need to run it.