simple bash script that:
- stops all running containers
- removes all containers
- removes all volumes
- (disabled by default) removes all images
#!/bin/bash
docker ps -a -q | grep -q . && docker stop $(docker ps -a -q) || echo "no containers running"
docker ps -a -q | grep -q . && docker rm $(docker ps -a -q) || echo "no containers present"
docker volume ls -q | grep -q . && docker volume rm $(docker volume ls -q) || echo "no volumes present"
# docker images -q | grep -q . && docker rmi $(docker images -q) || echo "no images present"
simple bash script to puts links into /usr/local/bin/
#!/bin/bash
REPO_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
ln -sf $REPO_DIR/scripts/* /usr/local/bin/
nuclear clean out of all docker state files, so use with care
#!/bin/bash
sudo service docker stop
sudo rm -r /var/lib/docker
sudo service docker start
shorthand for upgrading packages in ubuntu
#!/bin/bash
sudo apt update
sudo apt -yy dist-upgrade
sudo apt -yy autoremove
shorthand for refreshing repo from remote (useful when using multiple computers)
#!/bin/bash
rm -r node_modules
git pull
npm install