xterm.js based terminal emulator to bridge to docker exec
An Angular 4 front end assembled with angular cli
An Express server
A terminal application
The front end uses xterm.js to serve up a terminal
this connects via a websocket to the express server
The server conects via a pseudo tty to a node app called sash (Swiss Army Shell)
This shell is based on commander.js which provides
an easily extensible mechanism to do CLI
Currently the commands implemented are
docker ps
docker exec <container|name> <command>
I built this to do a docker exec
without having access to the docker host so it will run as a docker container
Simply run docker run -d -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock jeremymarshall/angular4-express-dist
and connect to it on port 3000
There is a security risk as this exposes the docker daemon and you can exec to the container running the service. But this is a proof of concept
The CI is a bit hand cranked at the moment