Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow custome http/s agent #103

Merged
merged 2 commits into from
Sep 17, 2019
Merged

allow custome http/s agent #103

merged 2 commits into from
Sep 17, 2019

Conversation

heleon19
Copy link

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
Copy link
Author

Any news on that topic?

@pimartin
Copy link

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
Copy link
Owner

apocas commented Sep 17, 2019

👍

@apocas apocas merged commit e92e594 into apocas:master Sep 17, 2019
@apocas apocas mentioned this pull request Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants