Hi Robert,
I'm not security expert and I'm quite new in docker, but I think password in Docker container which will be in clear text saved somewhere should not be a problem, as far as you do not save this password to image or git and etc...
I think best way for you is to use docker secret and generate then config file for Kamailio using this docker secrets and then start Kamailio and for all of this you need to write some kind of Entrypoint script. Here is example how something similar do Homer Sipcapture, they set environment variables in docker-compose and then generate config file based on this, but you can use probably docker secrets instead of environment variables:
I found one more interesting link regarding docker secrets:
With kind regards,