teledock

command module
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

README

Teledock

Golang Quality Gate Status GitHub go.mod Go version Go Report Card Docker Pulls

Teledock: A simple telegram bot that allows a telegram's user to control a docker service.

Features

  • List containers
  • Start / Stop containers
  • Inspect containers
  • List stacks
  • See logs
  • List images

Build

go build

Running it

Requirements
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 ready to use. You'll only need to mount the docker socket as a volume and set the environment variables (see how). Example:

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 file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL