Problem with MYSQL connection in container?

Hi there, I need some help:

This simple docker config is running fine on my local machine (no rancher): https://gist.github.com/solars/e54685a719ec06973898e0bf00d0f52e
but I keep getting the can’t connect to MYSQL error within rancher

Does anyone know why?

Thank you very much,
Christoph

can anyone help me maybe?