Open lioncui opened 8 years ago
i want know too
It shouldn't be that hard. All you need to do is to pipe streams correctly: input from the webapp to stdin of container and stdout/err output from container to webapp. It will be pretty tricky to interpret terminal escape sequences correctly. There could be a lib for that.
By piping streams I mean: https://github.com/d11wtq/dockerpty/blob/master/dockerpty/__init__.py#L20 in your case, these streams will likely be some buffers filled by thread within your webapp where the thread will receive input from client's browser via websockets.
My $ .02
I hope pass through the web access container tty, which part of the code i need to care about it ? Or there is any open source project to reference ?