the first way is to build and run on your host.
go get github.com/jizhilong/goexec
goexec -w
# open http://<hostip>:8000/?container=<containerid> in your browser
another way is to run goexec inside a container.
docker run -td --net host -v /var/run/docker.sock:/var/run/docker.sock jizhilong/goexec goexec -w -p 8000
# open http://<hostip>:8000/?container=<containerid> in your browser
goexec is a command line tool based on gotty, it works by converting docker-daemon's exec websocket to gotty-protocol.