[Feat Request] Be able to add remote docker server thru docker API (port 2375/2376)
It will be awesome if we can add external docker server thru docker API (ports 2375 or 2376) like Portainer or Dozzle
I agree or be able to connect to multiple remote docker hosts.
+1 to this idea
greatly appreciated +1
I've made a small modification to the python_on_whales docker client I'm using in the backend.
Unfortunately I don't have a proper remote docker host to test this on,
But according to python_on_whales docs, it should work as expected.
Use the new loolzzz/docking-station:dev tag
and add the following to /app/config/settings.yml file:
server:
...
python_on_whales__docker_client_config:
# https://gabrieldemarmiesse.github.io/python-on-whales/docker_client/
host: unix:///var/run/docker.sock # or whatever else docker host you want here
Let me know if this works so I can move this to the main branch.
CC
@edersong @bryceprutsos @princejosuah @Nickous
Unfortunately it doesn't work for me with for example host: tcp://192.168.1.42:2375
Hi, doesn't work for me either. Here are the relevant logs from the container:
[SERVER] ValidationError: 1 validation error for AppSettings
[SERVER] server.python_on_whales__docker_client_config
[SERVER] Input should be a valid dictionary [type=dict_type,
[SERVER] input_value=['host=tcp://REMOTE_IP:2375'], input_type=list]
[SERVER] For further information visit https://errors.pydantic.dev/2.9/v/dict_type
[SERVER] NODE_ENV=production fastapi run src/app/api/main.py --port 3001 exited with code 1
I'm not a dev, but the error seems linked to the way the remote host is declared. I've checked the python_on_whales docs on DockerClient, and apparently host is expecting a string value.
A bit lost, but I hope this helps.
I have no error message in the logs?!
I checked again with another installation and now it's working
Thanks for your work
next question, how to add multiple hosts?
It doesn't work with another line of host: tcp://192.168.1.x:2375 or host: tcp://192.168.1.x:2375, tcp://192.168.1.x:2375