1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-07-15 04:14:47 +02:00
docker-mailserver/docs/content/advanced/maintenance/update-and-cleanup.md

1.1 KiB

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.

A docker-compose example:

services:
  watchtower:
    restart: always
    image: v2tec/watchtower:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

For more details see the manual


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.

A docker-compose example:

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