您好,我有此代码用于附加带有GOT的特定容器并检索日志流(根据 docker文档)
const got = require("got");
(async () => {
const stream = await got('unix:/var/run/docker.sock:/containers/efbb049e620f/attach', {
method: 'post',
searchParam: {
stream: true,
stdin: true,
stdout: true,
stderr: true,
},
isStream: true
});
stream.on('data', console.log);
})();
但是当我运行此代码时,我在控制台中看不到任何日志,我该如何解决这个问题?