python script/docker to clean Slack Files
- Github repo: alexwitherspoon/clean-slack
- Dockerhub repo: alexwitherspoon/clean-slack
Runs a python scrypt to clean slack files after N days (30 by default)
Install to /opt
cd /opt
git clone https://github.com/alexwitherspoon/clean-slack.git
Install via crontab -e
*/15 * * * * cd /opt/clean-slack && git stash && git pull && chmod +x /opt/clean-slack/clean-slack.py && python /opt/clean-slack/clean-slack.py
- Debian Stable
- curl
- python
Include the following at the top of your project.
FROM alexwitherspoon:clean-slack
Follow these instructions here: https://github.com/alexwitherspoon/clean-slack/blob/master/clean-slack.conf.example
The file inside the container to edit is at:
/opt/clean-slack/clean-slack.conf
Modify "//clean-slack.conf" to point to your config file on the docker host. An example config is found here: https://github.com/alexwitherspoon/clean-slack/blob/master/clean-slack.conf.example
docker pull alexwitherspoon/clean-slack
docker run --name clean-slack -d --restart=always -v /<local>/clean-slack.conf:/opt/clean-slack/clean-slack.conf alexwitherspoon/clean-slack
Docker exec.
docker exec -i -t clean-slack env TERM=xterm bash -l
Show all running docker instances
docker ps -a
When you've found the bear's container id, run this:
docker kill <container-id>
docker rm <container-id>
docker rmi <container-id>