prasmussen / glot-run

API for running code inside docker containers

Home Page:https://run.glot.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retrieve container stdout

Dmunch04 opened this issue · comments

Hi!

I was wondering how exactly you're retrieving the Docker container stdout? Do you just read the log file? Because I can't really seem to find where you do that.

Thanks in advance!

I use the docker api. In this project I'm using the /containers/:id/attach endpoint to send stdin and read stdout/stderr.
These days I would recommend using the websocket endpoint instead. It should be easier to use: https://docs.docker.com/engine/api/v1.40/#operation/ContainerAttachWebsocket