docker-browser-console
Forward input/output from docker containers to your browser
npm install docker-browser-console
To quickly try out a demo clone this repo and
npm install
npm run demo
Browser usage
First browserify the following code to bundle.js
to create a terminal in your browser
var docker =var websocket =// create a stream for any docker image// use docker({style:false}) to disable default styling// all other options are forwarded to the term.js instancevar terminal =// connect to a docker-browser-console serverterminal// append the terminal to a DOM elementterminal
You can add that to an index.html
page by doing
Server usage
Then create a server that will host our docker containers
var ws =var websocket =var docker =var server = port:10000server
Now simply run the server and open index.html
in your browser.
You should be able to see a terminal running my dev image
License
MIT