From de2d7abc509204b0c0c93cc20cca57294e8e10e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Sun, 7 Jan 2018 14:03:46 +0100 Subject: [PATCH] added documentation --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3ba5cc..e289e4a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ -# docker-scripts +Scripts for Docker Swarm Administration +======================================= -scripts for docker administration \ No newline at end of file +All scripts are documentd. For more details on any script, just call it with option `--help`. + +docker-prune +------------ + +Cleanup docker. Removes all docker container that are not running, +then removes all unused docker images. In docker and especially docker swarm, when a service is restarted, the terminated and no more used containers still remain. Also unused images are never removed, even though they are probably outdated. + +By default, this script removes all terminted containers and all unused images, that are older than one day. You can easily install it into the daily cron job using option `--install`. + +docker-template +--------------- + +To create docker swarm yaml files from a template file by filling in special values. I use it to quickly create a new wordpress service, since I run many wordpress pages. The template just sets the name the external port and automatically generates new strong passwords for the mysql database. This way, I setup a new wordpress instance within some seconds. + +docker-deploy +------------- + +Just deploys a docker swarm stack from a yaml compose file. It saves me some typing. It scans the file for the volume pathes and creates them if they do not exist yet. Instead of the two commands `mkdir -p /var/volumes/my-service` and `docker stack deploy --compose-file my-service.yaml my-service`, I have to type only `docker-deploy my-service`. Yes, I am lazy. + +docker-update +------------- + +Script to update all or some images within declared in a yaml file. Use it to update the docker image of all or some services in your already deployed docker swarm stack.