I am trying to get the real time stdout from a command I am running in a docker container. However, I need to do this from a remote command run from another host.
When I am on the docker host I can run my docker command with
-it and get the real time output I need. However, I have this constraint where I have to run the command remotely making the previous solution useless. I cannot use
-t because it runs a pseudo terminal based on $TERM which doesn't exist with the remote command because there is no terminal at all.
I have also tried running the docker command with
-d to run it in the background and
docker logs -f <container> but the output is still given all at once at the end of the process.
Any solutions or advice is appreciated and correct me if this belongs on another stack.