Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

Bumps [ajv]( to 6.12.6 and updates ancestor dependency [uglifyjs-webpack-plugin]( These dependencies need to be updated together.

Updates `ajv` from 5.5.2 to 6.12.6
- [Release notes](
- [Commits](ajv-validator/ajv@v5.5.2...v6.12.6)

Updates `uglifyjs-webpack-plugin` from 1.1.2 to 1.3.0
- [Release notes](
- [Changelog](
- [Commits](webpack-contrib/uglifyjs-webpack-plugin@v1.1.2...v1.3.0)

- dependency-name: ajv
  dependency-type: indirect
- dependency-name: uglifyjs-webpack-plugin
  dependency-type: direct:development

Signed-off-by: dependabot[bot] <>

Signed-off-by: dependabot[bot] <>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]>

Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Container web TTY

Go Report Card Master Build Status GoDoc license Docker Pulls MicroBadger Size GitHub release Github All Releases


Tired of typing docker ps | grep xxx && docker exec -ti xxxx sh ? Try me!

Although I like terminal, I still want a better tool to get into the containers to do some debugging or checking. So I build this container-web-tty. It can help you get into the container and execute commands via a web-tty, based on yudai/gotty with some changes.

Both docker and kubectl are supported.


Of cause you can run it by downloading the binary, but thare are some Copy-and-Paste ways.

Using docker

You can start container-web-tty inside a container by mounting docker.sock:

docker run -dti --restart always --name container-web-tty \
    -p 8080:8080 \
    -v /var/run/docker.sock:/var/run/docker.sock \

# tail logs
docker logs -f container-web-tty

Using kubernetes

Or you can mount the kubernetes config file:

docker run -dti --restart always --name container-web-tty \
    -p 8080:8080 \
    -e WEB_TTY_BACKEND=kube \
    -e WEB_TTY_KUBE_CONFIG=/kube.config \
    -v ~/.kube/config:/kube.config \

Using local <-> remote (gRPC)

You can deploy container-web-tty in remote servers, and connect to it via a local container-web-tty. They use gRPC for communication.

This is useful when you cannot get the remote servers or there are more than one server that you need to connect to.


Host and both running:

docker run -dti --restart always --name container-web-tty \
    -p 8080:8080 \
    -p 8090:8090 \
    -e WEB_TTY_GRPC_PORT=8090 \
    -e WEB_TTY_GRPC_AUTH=96ssW0rd \
    -v /var/run/docker.sock:/var/run/docker.sock \


  • You can disable the HTTP server by setting WEB_TTY_PORT=-1
  • The WEB_TTY_GRPC_AUTH must be the same between all hosts


docker run -dti --restart always --name container-web-tty \
    -p 8080:8080 \
    -e WEB_TTY_BACKEND=grpc \
    -e WEB_TTY_GRPC_AUTH=96ssW0rd \

Now you will see all the containers of all the servers via http://localhost:8080

Keyboard Shortcuts (Linux)

  • Cut the word before the cursor Ctrl+w => You cannot do it for now (I'll working on it for Ctrl+Backspace, but I know little about js)
  • Copy: Ctrl+Shift+c => Ctrl+Insert
  • Paste: Ctrl+Shift+v => Shift+Insert


  • it works
  • docker backend
  • kubectl backend
  • beautiful index
  • support docker ps options
  • start|stop|restart container(docker backend only)
  • proxy mode (client -> server's containers)
  • auth(only in proxy mode)
  • TTY timeout (idle timeout)
  • history audit (just cat the history logs after enable this feature)
  • real time sharing (like screen sharing)
  • container logs (click the container name)
  • exec arguments (append an extra "?cmd=xxx" argument in URL)
  • connect to gRPC servers via HTTP/Socks5 proxy

Audit exec history and container outputs

docker run -dti --restart always --name container-web-tty \
    -p 8080:8080 \
    -e WEB_TTY_AUDIT=true \
    -v `pwd`/container-audit:/audit \
    -v /var/run/docker.sock:/var/run/docker.sock \

After you exec some commands, you will see the inputs and outputs under the container-audit directory, you can use cat or tail -f to see the changes.

Real-time sharing

You can always share the container's inputs and outputs with others via the exec link, just share the /exec/<exec-ID> to them!


docker run -dti --restart always --name container-web-tty \
    -p 8080:8080 \
    -v /var/run/docker.sock:/var/run/docker.sock \

By enabling this feature, once you exec into the container, you can share your process with others, that means anyone got the shareable link would type the command to the tty you are working on. You can edit the same file, type the same code, in the same TTY! Just share the exec link to your friend!


   --addr value                 server binding address (default: "")
   --audit-dir value            container audit log dir path (default: "audit")
   --backend value, -b value    backend type, 'docker' or 'kube' or 'grpc'(remote) (default: "docker")
   --control-all, --ctl-a       enable container control (default: false)
   --control-restart, --ctl-r   enable container restart (default: false)
   --control-start, --ctl-s     enable container start   (default: false)
   --control-stop, --ctl-t      enable container stop    (default: false)
   --debug, -d                  debug mode (log-level=debug enable pprof) (default: false)
   --docker-host value          docker host path (default: "/var/run/docker.sock")
   --docker-ps value            docker ps options
   --enable-audit, --audit      enable audit the container outputs (default: false)
   --enable-collaborate, --clb  collaborate on the same TTY process (default: false)
   --grpc-auth value            grpc auth token (default: "password")
   --grpc-port value            grpc server port, -1 for disable the grpc server (default: -1)
   --grpc-proxy value           grpc proxy address, in the format of or socks5://
   --grpc-servers value         upstream servers, for proxy mode(grpc address and port), use comma for split
   --help, -h                   show help (default: false)
   --idle-time value            time out of an idle connection
   --kube-config value          kube config path (default: "/home/mr/.kube/config")
   --port value, -p value       HTTP server port, -1 for disable the HTTP server (default: 8080)
   --version, -v                print the version (default: false)


List the containers on your machine:


It will execute /bin/sh if there is no /bin/bash inside the container:


Run custom command:

Get container logs: