Version 1.0.2 has been released!
just a little project i'm working on that allows you to view and manage your docker containers from discord.
- Added Auto Update when restarting/starting. Check here to see how to enable it!
- Added delete to
/docker execute
- Executing Docker Commands (
/docker execute
) (start, stop, restart, pause, unpause) - Listing all docker containers and sorts them into Online & Offline. (
/list
) - Docker Image Management + Image Pruning (
/docker images
|/docker prune
)
- Web Interface (possibly, not 100% sure if I can make this right now)
You must have Docker & Python installed and running.
To run this, first clone this repository:
sudo git clone https://github.com/xdFNLeaks/managebot.git
After you have cloned this repo, open config.json
and edit it to your liking.
token
= Your discord bot token. (Discord Developer Portal)timezone_offset
= Your timezone offset. (List of UTC offsets - Wikipedia)guild_ids
= Your server ID. (Tutorial)allowed_user_ids
= The ID of the bot admin. (Tutorial)type
= The Rich Presence type (Playing ..., Watching ...) - Currently available: Playing, Watching, Listening.message
= The message that shows up aftertype
(Playing {message}, Watching {message})
Now is time to run the bot! Please see below.
sudo docker run -d \
--name=managebot \
--restart=unless-stopped \
--privileged \
-v /your/path/to/managebot:/your/path/to/managebot \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /your/path/to/managebot \
python:3.11 \
/bin/bash -c "apt-get update -y && apt-get install git && apt-get install -y docker.io && python3 -m pip install -U py-cord --pre && git checkout -- bot.py && python3 bot.py"
sudo docker run -d \
--name=managebot \
--restart=unless-stopped \
--privileged \
-v /your/path/to/managebot:/your/path/to/managebot \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /your/path/to/managebot \
python:3.11 \
/bin/bash -c "apt-get update -y && apt-get install -y docker.io && python3 -m pip install -U py-cord --pre && python3 bot.py"
Edit /your/path/to/managebot to wherever you put managebot.
The first run of managebot usually takes around 2 minutes (depending on your internet speeds). This is just for the first run.
Once your discord bot comes online. You are free to begin using commands.
The most simple way to start, stop or restart managebot is directly from the command line.
Start
sudo docker start managebot
Stop
sudo docker stop managebot
Restart
sudo docker restart managebot
Please report any issues you have with the bot in the Issues tab!