apocas / docker-modem

Docker Remote API network stack driver.
Apache License 2.0
234 stars 112 forks source link

allow custome http/s agent #103

Closed heleon19 closed 5 years ago

heleon19 commented 5 years ago

I have many requests to the docker deamon. Now the number of TCP connections is increasing very fast. For me there are now several thousand connections, which are no longer used, but are not cleaned up by the OS yet. That's why I want to use my own agent for the http request. With this change I only have a few connections left to the Docker Daemon.

Now I can define the agent as follows: const docker = new Docker({ "protocol": "http", "host": "127.0.0.1", "port": "2375", "agent": new http.Agent({ "keepAlive": true, "maxSockets": 10, "keepAliveMsecs": 10000 }) });

heleon19 commented 5 years ago

Any news on that topic?

pimartin commented 5 years ago

This simple change would allow the use of Docker through SSH (combined, for example, with an agent from ssh2) while providing a lot of customization options that other solutions like #102 might not. It's a great feature, I hope this PR gets accepted.

apocas commented 5 years ago

👍