Is there a way to send command to a started exec with dockerode docker?

40 Views Asked by At
const docker = new Dockerode()

const exec = docker.getExec("id")

const execStream = await exec.start({
    hijack: true,
    stdin: true,
    Tty: true,
})

// This will throw EPIPE error
execStream.write("echo test\n")

When I write into the exec stream it will just throw EPIPE error

Is there any way to write command to an already running shell?

Maybe dockerode is not up to date? is there a way with docker remote api directly?

0

There are 0 best solutions below