{"id":15638223,"url":"https://github.com/supereagle/dockertty","last_synced_at":"2025-04-13T13:04:28.172Z","repository":{"id":98807959,"uuid":"90332253","full_name":"supereagle/dockertty","owner":"supereagle","description":"Terminal over web for remote docker container","archived":false,"fork":false,"pushed_at":"2017-07-29T15:47:47.000Z","size":3707,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T13:04:12.339Z","etag":null,"topics":["docker","dockertty","gotty","tty"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supereagle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-05T03:12:57.000Z","updated_at":"2025-03-14T01:56:58.000Z","dependencies_parsed_at":"2023-05-25T13:15:43.804Z","dependency_job_id":null,"html_url":"https://github.com/supereagle/dockertty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supereagle%2Fdockertty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supereagle%2Fdockertty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supereagle%2Fdockertty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supereagle%2Fdockertty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supereagle","download_url":"https://codeload.github.com/supereagle/dockertty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717247,"owners_count":21150389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","dockertty","gotty","tty"],"created_at":"2024-10-03T11:20:32.563Z","updated_at":"2025-04-13T13:04:28.139Z","avatar_url":"https://github.com/supereagle.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![](https://raw.githubusercontent.com/yudai/gotty/master/resources/favicon.png) DockerTTY - Terminal over web for remote docker container\n\nDockerTTY is a simple command line tool that provides terminal over web for remote docker container.\n\nDockerTTY is based on the work of [GoTTY v1.0.0](https://github.com/yudai/gotty), but with following features:\n- Provides terminal over web for remote docker container\n- Allow to run command in the container like `docker exec -it ${containerId} sh`\n- Do not leave legacy processes in container\n\n# Installation\n\nIf you have a Go language environment, you can install DockerTTY with the `go get` command.\n\n```sh\n$ go get github.com/supereagle/dockertty\n```\n\n# Usage\n\n```\nUsage: dockertty [options] \u003ccommand\u003e [\u003carguments...\u003e]\n```\n\nRunning `dockertty` will start a web server. Open the URL with the specified container id on your web browser, DockerTTY will run `docker exec -it ${containerId} sh`, then you can run command on your terminal as if you are running them in the container.\n\nBy default, DockerTTY starts a web server at port 8080, and permits clients to write to the TTY.\n\n## Options\n\n```\n--address, -a                                                IP address to listen [$GOTTY_ADDRESS]\n--port, -p \"8080\"                                            Port number to listen [$GOTTY_PORT]\n--permit-write, -w                                           Permit clients to write to the TTY (BE CAREFUL) [$GOTTY_PERMIT_WRITE]\n--credential, -c                                             Credential for Basic Authentication (ex: user:pass, default disabled) [$GOTTY_CREDENTIAL]\n--random-url, -r                                             Add a random string to the URL [$GOTTY_RANDOM_URL]\n--random-url-length \"8\"                                      Random URL length [$GOTTY_RANDOM_URL_LENGTH]\n--tls, -t                                                    Enable TLS/SSL [$GOTTY_TLS]\n--tls-crt \"~/.gotty.crt\"                                     TLS/SSL certificate file path [$GOTTY_TLS_CRT]\n--tls-key \"~/.gotty.key\"                                     TLS/SSL key file path [$GOTTY_TLS_KEY]\n--tls-ca-crt \"~/.gotty.ca.crt\"                               TLS/SSL CA certificate file for client certifications [$GOTTY_TLS_CA_CRT]\n--index                                                      Custom index.html file [$GOTTY_INDEX]\n--title-format \"GoTTY - {{ .Command }} ({{ .Hostname }})\"    Title format of browser window [$GOTTY_TITLE_FORMAT]\n--reconnect                                                  Enable reconnection [$GOTTY_RECONNECT]\n--reconnect-time \"10\"                                        Time to reconnect [$GOTTY_RECONNECT_TIME]\n--timeout \"0\"                                                Timeout seconds for waiting a client (0 to disable) [$GOTTY_TIMEOUT]\n--max-connection \"0\"                                         Set the maximum number of simultaneous connections (0 to disable)\n--once                                                       Accept only one client and exit on disconnection [$GOTTY_ONCE]\n--permit-arguments                                           Permit clients to send command line arguments in URL (e.g. http://example.com:8080/?arg=AAA\u0026arg=BBB) [$GOTTY_PERMIT_ARGUMENTS]\n--close-signal \"1\"                                           Signal sent to the command process when gotty close it (default: SIGHUP) [$GOTTY_CLOSE_SIGNAL]\n--config \"~/.gotty\"                                          Config file path [$GOTTY_CONFIG]\n--version, -v                                                print the version\n```\n\n\u003e For more detailed usage, please refer to [GoTTY Usage](https://github.com/yudai/gotty#usage).\n\n## Advanced Usage\n\nTo login and exec command in containers in [Kubernetes](https://kubernetes.io/) cluster, DockerTTY can be deployed as an agent on every Kubernetes nodes through [Daemonset](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/).\n\n```yaml\napiVersion: extensions/v1beta1\nkind: DaemonSet\nmetadata:\n  labels:\n    app: dockertty-agent\n  name: dockertty-agent\nspec:\n  updateStrategy:\n    type: RollingUpdate\n  template:\n    metadata:\n      labels:\n        app: dockertty-agent\n    spec:\n      restartPolicy: Always\n      hostNetwork: true\n      containers:\n      - image: ${DOCKERTTY_AGENT_IMAGE}\n        name: dockertty-agent\n        resources:\n          limits:\n            cpu: 800m\n            memory: 1Gi\n          requests:\n            cpu: 400m\n            memory: 500Mi\n        ports:\n          - name: agent-port\n            hostPort: 8080\n            containerPort: 8080\n        volumeMounts:\n        - mountPath: /var/run/docker.sock\n          name: dockersock\n        - mountPath: /usr/bin/docker\n          name: dockerclient\n        - mountPath: /usr/lib64/libltdl.so.7\n          name: libltdl\n      volumes:\n      - hostPath:\n          path: /var/run/docker.sock\n        name: dockersock\n      - hostPath:\n          path: /usr/bin/docker\n        name: dockerclient\n      - hostPath:\n          path: /usr/lib64/libltdl.so.7.3.0\n        name: libltdl\n```\n\n# Clients\n\n## Web Browser\n\nOpen the URL like `http://localhost:8080?containerId=c28` in web browser.\n\n## GoTTY Client\n\n[GoTTY Client](https://github.com/moul/gotty-client) is a terminal client for GoTTY. It can also be used as a terminal client for DockerTTY.\n\n```sh\n$ ./gotty-client http://localhost:8080?containerId=c28\n```\n\n## Architecture\n\nGoTTY uses [hterm](https://groups.google.com/a/chromium.org/forum/#!forum/chromium-hterm) to run a JavaScript based terminal on web browsers. GoTTY itself provides a websocket server that simply relays output from the TTY to clients and receives input from clients and forwards it to the TTY. This hterm + websocket idea is inspired by [Wetty](https://github.com/krishnasrinivas/wetty).\n\n# License\n\nThe MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupereagle%2Fdockertty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupereagle%2Fdockertty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupereagle%2Fdockertty/lists"}