-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
socketPath
issue with node:http
#6055
Comments
went over to just using http.request and that still doesnt work in bun. So I'm wondering if socketPath as an option just didn't get implemented. import http from 'node:http';
async function getDockerContainers(): Promise<Container[]> {
const options = {
socketPath: '/var/run/docker.sock',
method: 'GET',
path: '/containers/json',
};
const data = await new Promise<Container[]>((resolve, reject) => {
const req = http.request(options, res => {
console.log(res);
let rawData = '';
res.on('data', chunk => {
rawData += chunk;
});
res.on('end', () => {
resolve(JSON.parse(rawData));
});
});
req.end();
});
const containers = data;
return containers;
} |
Electroid
added
bug
Something isn't working
node.js
Compatibility with Node.js APIs
and removed
node.js
Compatibility with Node.js APIs
labels
Sep 25, 2023
the |
Duplicate of #2853? |
Any update on this? Can't use dockerode |
+1, for dockerode |
+1 for dockerode |
please stop bumping this to leave a +1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Building a docker extension and am using bun.serve which is working great when the front end wants to talk to the backend. But I want to initiate some UNIX socket requests and am having some issues doing that. What would be the best way to go about it?
Originally reported on Discord:
UNIX socket requests in BUN
The text was updated successfully, but these errors were encountered: