I've had to do exactly that.
In my situation, I want to run database provisioning (setting up user accounts for example), but also do database schema migrations.
I've 'solved' it by having a separate container app job. This container app runs once before the rest of the deployment.
Challenge is, now I have to much more orchestration of my deployment. (first deploy / run the container with the new initialization scripts, then deploy the actual app once it's completed successfully). I've been told you could do something similar with container initialization jobs, but haven't had a chance to look into that too much.