Skip to content

[SUPPORT] Getting logs from a running container #672

Description

@sbodapati-de

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions