Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrmarble/teledock
Telegram bot to control docker
https://github.com/mrmarble/teledock
bot docker docker-compose hacktoberfest portainer telegram
Last synced: about 1 month ago
JSON representation
Telegram bot to control docker
- Host: GitHub
- URL: https://github.com/mrmarble/teledock
- Owner: MrMarble
- License: gpl-3.0
- Created: 2020-07-24T22:33:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T23:48:35.000Z (almost 2 years ago)
- Last Synced: 2024-11-13T14:59:10.987Z (about 1 month ago)
- Topics: bot, docker, docker-compose, hacktoberfest, portainer, telegram
- Language: Go
- Homepage:
- Size: 342 KB
- Stars: 62
- Watchers: 3
- Forks: 6
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Teledock
[![Golang](https://github.com/MrMarble/teledock/actions/workflows/golang.yml/badge.svg)](https://github.com/MrMarble/teledock/actions/workflows/golang.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=MrMarble_teledock&metric=alert_status)](https://sonarcloud.io/dashboard?id=MrMarble_teledock)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/mrmarble/teledock)
[![Go Report Card](https://goreportcard.com/badge/github.com/MrMarble/teledock)](https://goreportcard.com/report/github.com/MrMarble/teledock)
![Docker Pulls](https://img.shields.io/docker/pulls/mrmarble/teledock)**Teledock**: A simple telegram bot that allows a telegram's user to control a docker service.
## Features
- [x] List containers
- [x] Start / Stop containers
- [x] Inspect containers
- [x] List stacks
- [x] See logs
- [x] List images## Build
```bash
go build
```## Running it
### Requirements
- [Docker](https://docker.com) (Obviously)
### Configuration environment variables
- `TELEDOCK_TOKEN`: Telegram token. See https://core.telegram.org/bots
- `TELEDOCK_SUPERADMINS`: Comma separated list of Telegram user ids, only users listed here will have access to the bot.## Docker
To simplify the management of the bot there is a [Docker image](https://hub.docker.com/r/mrmarble/teledock) ready to use. You'll only need to mount the docker socket as a volume and set the environment variables ([see how](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)). Example:
```bash
docker pull mrmarble/teledock # Only needed the first time or to update
docker run -d -v /var/run/docker.sock:/var/run/docker.sock \
--name teledock \
--env TELEDOCK_TOKEN=bot_token \
--env TELEDOCK_SUPERADMINS=tg_userid \
mrmarble/teledock
```## TODO
- [ ] Create container
- [ ] Run command inside container
- [ ] Warn the user if tries to stop the bot## Suggestions / Contribution
I made teledock because I need it but if you want to use it and there's something missing or not quite right, feel free to create an issue or a pull request if you know how to fix it yourself
## License
This project is licensed under the GPL 3.0 License. See the [LICENSE](LICENSE)
file for details.