I find it pretty strange and unusual that this is such a complicated task. This is probably the first time in hundreds of open source image deployments where I'm asked to change hard-coded settings inside the image instead of simply mapping ports in docker.
I question if Fusca above actually deployed the service with the settings posted. This doesn't work for me, but neither do the other suggestions here unfortunately. The mariadb container still reports publishing to 3306 in the logs, and redmine fails to connect if i simply map the ports and provide the new port in the redmine env vars.
Unfortunately I happen to run more than one service per machine, and this port happens to already be taken!
I see a red flag like this and immediately start seeking other solutions -- if something this important and simple is missing, what else will i run into later?