However it does not work and I get this errors in the log:
s6-rc: info: service legacy-services successfully started
2023-09-19 11:25:33.743 ERROR (Thread-5) [pychromecast.socket_client] [Bedroom Display(192.168.20.56):8009] Failed to connect to service ServiceInfo(type='mdns', data='google-nest-hub-220015da2323da5406e50407810f2d2f._googlecast._tcp.local.'), retrying in 5.0s
2023-09-19 11:25:33.744 ERROR (Thread-4) [pychromecast.socket_client] [Kitchen Display(192.168.20.133):8009] Failed to connect to service ServiceInfo(type='mdns', data='google-nest-hub-aa53b3b5b0e6426d7024a349b9ea910e._googlecast._tcp.local.'), retrying in 5.0s
2023-09-19 11:25:33.745 ERROR (Thread-6) [pychromecast.socket_client] [Office Display(192.168.20.145):8009] Failed to connect to service ServiceInfo(type='mdns', data='google-nest-hub-c975dce30eed835d290ed2de9ae283fa._googlecast._tcp.local.'), retrying in 5.0s
2023-09-19 11:25:35.690 ERROR (MainThread) [homeassistant.components.homeassistant_alerts] Error requesting homeassistant_alerts data: Cannot connect to host alerts.home-assistant.io:443 ssl:default [Try again]
The errors means nothing in regards to container IP. Just says HA cannot connect to some devices but ip may be what you want.
Since you use portainer you can confirm the container IP in portainer ui.
Your subnet is also wrong. I Can not remember what it shoukd be for /32 ip range but at least something like 255.255.255.255. Sure you dont want /24 and 255.255.255.0?