dockerode
dockerode copied to clipboard
[SUPPORT] Getting logs from a running container
Hi , i have three rest APIs , one to create a container and return container id , second one to exec a command and the third one to stream logs when container id is passed ,
GET setup/:image_name GET run/:container_id GET logs/:container_id
for the third API i am using docker.getContainer -> container.logs -> container.modem.demuxStream and am passing a writeable nodejs stream at stdout and stderr for sending back the logs.
I'm somehow not able to access the logs , but , if the writeable stream is passed during exec to container.modem.demuxStream , everything works fine.
How can i access logs after exec from a running container, given the container id?