-
Clone the repository:
git clone https://github.com/xenoncolt/docker-stats.git
-
Install the dependencies:
npm install
-
Rename the
example.env
file to.env
:TOKEN=YOUR_TOKEN_GOES_HERE
-
Replace the Token with valid Token. You can get your discord bot token from Discord Developer Portal
-
Rename the
example.config.json
file toconfig.json
{ "dockerSockPath": "path/file/docker.sock", "channelId": "CHANNEL_ID" }
-
Replace the Channel ID with the ID of the channel you want the bot to post stats to. And also replace your
docker.sock
file path. If you don't know where is yourdocker.sock
file then follow Docker Sock -
Start the bot:
node .
You can check if there exist or not by running this cmd in terminal:
- On Linux:
ls -l $HOME/.docker/desktop/docker.sock
- On Windows:
ls -l C:\ProgramData\docker\docker.sock
If the file don't exist there then search the file using this cmd
- On Linux:
sudo find / -type s -name "docker.sock"
- On Windows:
dir /s docker.sock
Now copy the path and replace in config.json
with /path/file/docker.sock
Click to expand
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
Click to expand
Click to expand
If you have any questions, comments, or concerns, please contact me on Discord: Xenon Colt#8969