[yugabyted] How to ACTUALLY set the master address?

Hi, I’m trying to run Yugabyte in Docker but I’m having a lot of trouble getting it to work reliably (more details here).

I’m trying to tell yugabyted which specific master address to use, but it is not working.
I’m starting it with this command: bin/yugabyted start --background=false --advertise_address "$$(hostname -i)" --master_flags "master_addresses=yugabyte:7100" --tserver_flags "tserver_master_addrs=yugabyte:7100"

But this is what ends up showing in the config file:
"current_masters": ",172.19.0.2:7100",
…which seems to completely break the database (unable to connect with ysqlsh), even though the IP is correct.

If I remove --master_flags and --tserver_flags and manually edit the config file to:
"current_masters": "yugabyte:7100",
…it works as intented, even if the container’s IP changes (which was my original issue), however, I don’t want to rely on the config file because it seems to be dynamic (I’ve seen that field automatically set to yugabyte:7100,172.19.0.2:7100 before), so I would like it to specify the exact hostname that is to be used.