March 19, 20251 yr All my started dockers get their own IP address, like 172.17.0.5 or something. Network type is `bridge`, which is obviously the default, so it must not be terrible at least. All good and well, but there's a problem with this. I can't know if they are guaranteed. So I've got a MariaDB docker that, of course, I need access to from other dockers. So I configure those dockers to connect to 172.17.0.5 as the database host. Now, if that 172.17.0.5 was guaranteed, it would be fine. But it doesn't seem to be guaranteed, nor configurable. I had it change on me when reinstalling a docker, which makes me sceptic about what happens when a docker gets updated. I haven't had an update for that one yet, so I don't know what'll happen. If only I could force the IP address of a docker to be statically whatever I need it to be, I would feel more confident to use that IP address in configs of other dockers that need access to it. I have tried to use `localhost` as the database host, but that doesn't work, and causes dockers to try to connect to themselves, instead of the MariaDB docker. I haven't tried yet to use a name, rather than an IP address, perhaps unraid has a mechanism to resolve a name to one of those internal IP addresses. But I don't know if this mechanism is there in the first place, and even if it is, I don't know what it expects. Now, I'm sure one docker connecting to another is not an otherworldly scenario. Am I even doing it correctly in the first place? Edited March 19, 20251 yr by thany
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.