https://github.com/geekmasher/wicket-discord-docker-bot
Wicket - The Discord Docker Bot to link your Docker deployments to Discord
https://github.com/geekmasher/wicket-discord-docker-bot
Last synced: 5 months ago
JSON representation
Wicket - The Discord Docker Bot to link your Docker deployments to Discord
- Host: GitHub
- URL: https://github.com/geekmasher/wicket-discord-docker-bot
- Owner: GeekMasher
- License: mit
- Created: 2021-07-24T13:47:01.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-11T19:30:58.000Z (over 1 year ago)
- Last Synced: 2025-10-10T12:46:09.790Z (10 months ago)
- Language: Python
- Size: 548 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wicket-discord-docker-bot
Wicket - The Discord Docker Bot to link your Docker deployments to Discord
This bot was created to make it easier for a Discord user to list, start, and stop Docker containers primarily for gaming servers.
The name [Wicket (Wicket Wystri Warrick) comes from the Star Wars Ewok character](https://starwars.fandom.com/wiki/Wicket_Wystri_Warrick).
### Quick start
Create a `.env` file and add the following keys and their values:
```env
# Discord Bot/App token
DISCORD_TOKEN=ABCDEFG
DISCORD_ADMINS=MyUser#1234,MyOtherUser#4321
# [optional] Docker socket
DOCKER_HOST=/var/run/docker.sock
```
Start up the Docker container using the `.env` file.
```bash
docker run -d --env-file=.env --name wicket \
ghcr.io/geekmasher/wicket-discord-docker-bot:main
```
## Setup
There are three core parts to setting up the bot; configuration file, Discord token, and Docker socket.
### Configuration file
This isn't needed and is optional but gives administrators better control over how the bot is used.
```yml
domain: domain.example.com
# Discord servers
servers:
example:
name: Example Server Name
admins:
- MyUser#1234
docker-labels:
- com.example.services.type=gaming
```
### Discord Token
To communicate to and from Discord you'll need an Application Discord Token to pass into the Bot.
This can be set as the environment variable `DISCORD_TOKEN`:
```
DISCORD_TOKEN=ABCDEFG
```
This can also be passed in manually using the `--token` argument.
```bash
pipenv run python -m wicket --token $MY_DISCORD_TOKEN
```
### Docker Socket
To connect to the Doker daemon you'll need access to the Docker socket on the local or remote machine.
This is done by connecting to the local system Docker enviroment using a number of methods including the `DOCKER_HOST` environment variable.
```env
# Local Unix Socket
DOCKER_HOST=/var/run/docker.sock
# Remote Socket
DOCKER_HOST=ssh://user@1.1.1.1
```
## Security
### Docket Socket
The Docker socket is extremely important to protect as if an attacker has access to the socket they would have unrestricted access to the Docker host.
Read the following documentation on the subject:
- [Docker security](https://docs.docker.com/engine/security/)
- [Protect the Docker daemon socket](https://docs.docker.com/engine/security/protect-access/)