kurikube / container-with-xterm

container-with-xterm runs sshd inside the container and expose shell with "xterm.js".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

container-with-xterm

Quick Description

It does

container-with-xterm runs sshd inside the container and expose shell with "xterm.js".

It does not

  • secure anything
  • limit anything

future work

see GitHub project

How to run

  1. build container
docker build -t container-with-xterm .
  1. run it
$ docker run -it -p 3000:3000 --rm container-with-xterm 

> container-with-xterm@0.0.1 start /
> NODE_ENV=prod node app.js

Node.js is listening to PORT:3000
  1. open your brouser http://localhost:3000

terminal

  1. to stop, press Ctrl-C on the terminal you used in step 2.

How it works

These components are running in one container.

[Browser with Terminal(xterm.js)] <---WebSocket(socket.io)---> [Server(Express.js with Socket.io)] ---ssh(ssh2.js)---> sshd

prerequisites

  • Docker

usage

run in dev mode

npm run dev

run in release mode

npm start

build container

docker build -t container-with-xterm .

License

MIT

About

container-with-xterm runs sshd inside the container and expose shell with "xterm.js".

License:MIT License


Languages

Language:JavaScript 66.9%Language:Dockerfile 19.8%Language:HTML 10.5%Language:Shell 2.8%