How can I create a web terminal to access the host from a Docker container?

0
12
Asked By TechieTurtle83 On

I'm looking to set up a web terminal, similar to ttyd, that lets me access the host terminal through a Docker container. I'm planning to manage authentication and access control through a reverse proxy. Ideally, if a user is an admin, they should be able to access the host system shell. I've enjoyed making this setup work, but it feels a bit hacky. Am I overlooking any straightforward tools for this? Any other suggestions would be appreciated!

4 Answers

Answered By DockerDude42 On

I don’t really get why you'd want to do this. If you're using privileged mode with host PID and network namespaces, you’ve really taken down the security walls that containers offer. What you're creating isn't exactly a host terminal, but it gets close. You might as well just run whatever you need directly on the host instead of forcing Docker into this role.

Answered By LoneWolf93 On

I hear you, but the goal was to have a simple way to start a container for web access. It might not be worth the potential risks involved.

Answered By GuacFan78 On

You could try Guacamole; it offers similar functionality. But be warned, it’s pretty large and comes with a lot of configurations.

Answered By CodeCrafter22 On

If you're looking for something lightweight and easy to set up, check out Termix on GitHub. It might just fit your needs!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.