-
-
Notifications
You must be signed in to change notification settings - Fork 464
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
Specifying socketPath but Dockerode is using HTTP. (bun.js) #747
Comments
An into the same problem ... not sure how that would happen. Maybe a permission thing? |
Maybe it matters: my Docker daemon version is 1.24, this is my test code: import Docker from 'dockerode';
const docker = new Docker({ socketPath: '/var/run/docker.sock' }); The error:
Debug info:
|
Investigating |
I can't reproduce that :( |
running into same problem. using bun v1.0.7 on mac |
This seems to be a problem with bun. See oven-sh/bun#6055 |
Now I can reproduce it using bun (forgot mocha was evoking node) :) |
Temporary solution I'm using: Run this command: socat TCP-LISTEN:3000,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock Use it like this: new Dockerode({protocol: 'http', host: 'localhost', port: 3000}) |
Hello, is there any fix for this issue to get linux socket to work? |
There is a pull request, but no response yet. |
@recanman it looks like they merged another pull request that should fix it Should be safe to close this issue |
Great, thank you! |
I am using |
Same issue with Deno 1.43.6, dockerode 4.0.2, with: import Docker from 'npm:dockerode'
const docker = new Docker({socketPath: '/var/run/docker.sock'})
const images = await docker.listImages()
console.log( images ) Got: error: Uncaught (in promise) TypeError: error sending request for url (http://localhost/images/json): error trying to connect: tcp connect error: Connection refused (os error 111)
at async node:http:397:21 |
I'm also getting the same issue with Deno 2. I think it's related due to the fact that it's the same issue as what bun had, and other deno users will be able to find this and not waste time debugging why it's happening |
same issue with deno 2. is there an issue yet? couldnt find it if there is |
Same issue with Deno v2.1.4. |
Hi, I'm initializing dockerode like this:
but when I use it, it gives the following error:
I am using Bun.
The text was updated successfully, but these errors were encountered: