[HELP] Missing Container in "List of Docker Containers"
What happened? I wan't to use the "Pick from Docker Container" / "List of Docker Containers" feature but my Containers are not showing up with the exeption of Portainer.
Describe what have you tried I have not really a clue actually how the list is updated from the docker sock(which i assume that this is the source of the list)
Describe the networking setup you are using I have Zoraxy and the other Containers on a MacVlan and only portainer lives on the default network bridge. Maybe this is already the problem.
The socket is indeed required for the Docker list functionality to work, however I do not know how Zoraxy reads from it.
I have Zoraxy and the other Containers on a MacVlan and only portainer lives on the default network bridge. Maybe this is already the problem.
I'm not sure how the network settings for the containers could affect their visibility. Could you test this further by creating some other container(s) on other networks?
Jea looks like that feature works only when the other containers are in the bridge network, but when the containers are in host mode or macvlan then you can't use that feature.
I did some research on this as well, and it appears that containers running in network modes other than bridge have an empty Ports array. The current logic introduced with PR #395 filters them out because it relies on iterating over container.Ports:
// src/web/snippet/dockerContainersList.html - line 129
containers.forEach((container) => {
container.Ports.forEach((portObject) => {
// ...
});
});
The detection of the container's address currently relies on the container.Ports array, which therefore does not work for network modes like host or macvlan-networks:
// if port is not exposed, use container's name and let docker handle the routing
// BUT this will only work if the container is on the same network as Zoraxy
const targetAddress = portObject.IP || name;
...
While I don't really know how this could be implemented in detail, a possible fix is to check whether container.Ports is empty before trying to iterate and using some kind of fallback logic:
containers.forEach((container) => {
if (Array.isArray(container.Ports) && container.Ports.length > 0) {
container.Ports.forEach((portObject) => {
// ... current logic works
});
} else {
// TODO: implement fallback logic for containers in non-bridge networks
}
});
Sometimes is would be already good enough too pick the container for filling out the ip host mode would be 127.0.0.1 macvlan ip can be read i guess. and the port needs to be filled out manually then. would be enough in my opinion
Hello,
I've same problem. How can I fix that?
thank you