Incoming requests are directed to the appropriate container based on metadata about the request (such as the hostname, or particular headers, or the request path, etc). Using a dynamic proxy is nice because you only need a single ip address and port. There are several ways to address this particular problem. I googled this a lot and haven't been able to find any solution A NIC with several IPs assigned can handle all ports on each IP, as the port belongs to TCP and UDP. ![]() I have a limited understanding of this, but from what I read, they shouldn’t conflict. It sounds a bit like docker can not share the same port even when it belongs to several IPs on the host. Unfortunately, this throws a bunch of errors when I run docker-compose up -d ERROR: for grafana Cannot start service grafana: driver failed programming external connectivity on endpoint grafana (b70ca36d6f0953ca16e046c7af561a638ce2fe537417600e6c7f7796fbf228c0): Error starting userland proxy: listen tcp4 10.0.0.50Recreating 922d1912d260_nodered … errorĮRROR: for 922d1912d260_nodered Cannot start service nodered: driver failed programming external connectivity on endpoint nodered (6676c921fc83a1a521db50bce6ef128ec7811b4dae4d69cf0597b9f118199bfc): Error starting userland proxy: listen tcp4 10.0.0.51:80: bind: address already in useĮRROR: for grafana Cannot start service grafana: driver failed programming external connectivity on endpoint grafana (b70ca36d6f0953ca16e046c7af561a638ce2fe537417600e6c7f7796fbf228c0): Error starting userland proxy: listen tcp4 10.0.0.50:80: bind: address already in useĮRROR: for nodered Cannot start service nodered: driver failed programming external connectivity on endpoint nodered (6676c921fc83a1a521db50bce6ef128ec7811b4dae4d69cf0597b9f118199bfc): Error starting userland proxy: listen tcp4 10.0.0.51:80: bind: address already in useĮRROR: Encountered errors while bringing up the project. Inet6 fe80::185a:8f0e:78b0:a110/64 scope linkĪnd then in docker-compose.yml I have (only relevant part): grafana: Inet 10.0.0.52/24 scope global secondary eth0 Inet 10.0.0.51/24 scope global secondary eth0 Inet 10.0.0.50/24 scope global secondary eth0 So, for example, I have on the host eth0: mtu 1500 qdisc mq state UP group default qlen 1000 So the next idea I had was to create several IPs on the host, then use the syntax “host_IP:port:container_port” to map as necessary. I thought this should have worked, but it didn’t. However, the port mapping is only one, and I don’t understand how it works when a container is connected to 2 networks. Port mapping doesn’t help here because of the reason below.Īnother issue with this is that, as the containers also communicate to each other and there is a lot of existing configuration there, with IPs and ports, I have to connect them to 2 networks, a bridge for the inter-container communication, and an ipvlan for the outside communication. ![]() But they still don’t solve the issue of remembering the ports, as the containers keep their current one. The first thing I tried was to use ipvlan and macvlan networks. Unfortunately, this is where the trouble shows. ![]() For this to work I need, among others, the containers to listen to port 80. So I thought I would solve this via DNS, as I already have pi-hole running in a container nicely as both a DNS and a DHCP server. And I do this from several devices in the network and sometimes several browsers on each device (I have my reasons :) ) so creating bookmarks isn’t an option. Obviously, that means I always have to remember the ports of each of those services, which has become tiresome after a while. The issue is, the stack contains a few services with website, which I access from the network. It’s been going nicely for about a year now, but now I want to bring it to the next level. I have docker stack running on a Raspberry Pi with docker-compose.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |