From 2a93f85b2d0b0689c52d77d30b9c33471e197ea3 Mon Sep 17 00:00:00 2001 From: Johan Smits Date: Fri, 28 Jul 2017 18:44:22 +0200 Subject: [PATCH] Create a new tutorial how to automatic update and cleanup old docker images --- .../maintenance/update-and-cleanup.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/content/advanced/maintenance/update-and-cleanup.md diff --git a/docs/content/advanced/maintenance/update-and-cleanup.md b/docs/content/advanced/maintenance/update-and-cleanup.md new file mode 100644 index 00000000..8529c961 --- /dev/null +++ b/docs/content/advanced/maintenance/update-and-cleanup.md @@ -0,0 +1,37 @@ +# Automatic update + +Docker images are handy but it can get a a hassle to keep them updated. Also when a repository is automated you want to get these images when they get out. + +There is a nice docker image that solves this issue and can be very helpful. The image is: [v2tec/watchtower](https://hub.docker.com/r/v2tec/watchtower/). + +A docker-compose example: +```yaml +services: + watchtower: + restart: always + image: v2tec/watchtower:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock +``` + +For more details see the [manual](https://github.com/v2tec/watchtower/blob/master/README.md) + + +*** + + +# Automatic cleanup + +When you are pulling new images in automaticly it is nice to have them cleaned as well. There is also a docker images for this (from Spotify). The image is: [spotify/docker-gc](https://hub.docker.com/r/spotify/docker-gc/). + +A docker-compose example: +```yaml +services: + docker-gc: + restart: always + image: spotify/docker-gc:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock +``` + +For more details see the [manual](https://github.com/spotify/docker-gc/blob/master/README.md) \ No newline at end of file