Also, instead of hardcoded IP addresses to use for communication, you should look into network aliases for Docker containers. Docker has an internal DNS service which allows for you to reference a Docker container's IP address by either it's container name or network alias. This allows for you to not care about what IP address it is given.
So the idea would be that I don't have to know on the spot which IP addresses are taken. I'll read the documentation on that, thank you.
Not sure if you have fixed the problem but this docker compose file will communicate between the wordpress and the maria db containers with no additional setup
Also, instead of hardcoded IP addresses to use for communication, you should look into network aliases for Docker containers. Docker has an internal DNS service which allows for you to reference a Docker container's IP address by either it's container name or network alias. This allows for you to not care about what IP address it is given.
So the idea would be that I don't have to know on the spot which IP addresses are taken. I'll read the documentation on that, thank you.
More replies More replies
You should be able to use any subnet on the bridge as long as the subnet isn't used on another interface on the host.
Thanks for the quick answer. I'll double check if that is the case.
More replies
Not sure if you have fixed the problem but this docker compose file will communicate between the wordpress and the maria db containers with no additional setup