Skip to content

xenoncolt/docker-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub watchers GitHub Repo stars GitHub last commit

Preview

Docker Stats Preview

Installation Guide

Requirements

Setup

  1. Clone the repository:

    git clone https://github.com/xenoncolt/docker-stats.git
    
  2. Install the dependencies:

    npm install
    
  3. Rename the example.env file to .env:

    TOKEN=YOUR_TOKEN_GOES_HERE
  4. Replace the Token with valid Token. You can get your discord bot token from Discord Developer Portal

  5. Rename the example.config.json file to config.json

    {
     "dockerSockPath": "path/file/docker.sock",
     "channelId": "CHANNEL_ID"
    }
  6. 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 your docker.sock file then follow Docker Sock

  7. Start the bot:

    node .
    

Docker Sock

Default path

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
    

Search File Path

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

Contributing

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.

License

Click to expand

MIT

Contact

Click to expand

If you have any questions, comments, or concerns, please contact me on Discord: Xenon Colt#8969

Acknowledgements

Click to expand

About

A Discord stats bot which will give docker stats in discord

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published