Run rancher server on ECS to include advertise-address variable

I’m running rancher server on ECS with HA mode. However i need to pass an OS environment variable to each container to include “–advertise-address”, it’s not possible to set that up from the ECS since it’s a static string , can anyone suggest how to pass it via CMD or Entry Point ?