4 ms·
It looks like they run an SSH server inside a Docker container defined by this Dockerfile [1]. This uses the ForceCommand directive in the sshd_config file to e
by jamessb 3y ago
It looks like they run an SSH server inside a Docker container defined by this Dockerfile [1]. This uses the ForceCommand directive in the sshd_config file to ensure that a specific command is run when a user connects (rather than the user connecting directly to a shell).
Depending on whether the user connects as the `playground` or `tutorial1` user they interact with a bash script that is either [2] or [3]; these run lnav, using the timeout command to limit how long users are connected for, and to kill the lnav process if it gets stuck.
[1]: https://github.com/tstack/lnav/blob/master/demo/Dockerfile https://github.com/tstack/lnav/blob/master/demo/Dockerfile
[2]: https://github.com/tstack/lnav/blob/master/docs/tutorials/playground/run.sh https://github.com/tstack/lnav/blob/master/docs/tutorials/pl...
[3]: https://github.com/tstack/lnav/blob/master/docs/tutorials/tutorial1/run.sh https://github.com/tstack/lnav/blob/master/docs/tutorials/tu...
- tstack 3y agoYep, exactly this. I wrote a short blog post[1] announcing the playground, but didn't go into much detail. All this stuff just runs on the free-tier of fly.io since it doesn't get much traffic. [1] - https://lnav.org/2022/09/01/playground.html https://lnav.org/2022/09/01/playground.html
- hiAndrewQuinn 3y agoAh! I was about to write you an email to ask some further questions, but then I saw you replied here on HN. This is excellent, thanks for doing such a good job with your ChangeBlog.
- hiAndrewQuinn 3y agoMuch appreciate the detective work you did on my behalf, James. I put the pieces together from the previous commenter but didn't get a chance to poke around the source code itself yesterday.