mag37/dockcheck

By mag37

Updated 8 days ago

CLI tool to automate docker image updates. Containerized from https://github.com/mag37/dockcheck

Image
Integration & delivery
Monitoring & observability
1

3.6K

mag37/dockcheck repository overview

Containerized version of dockcheck aimed at running unattended for notifications and/or automatic updates.

See dockcheck at GitHub for more info, options, changelog etc.

example.gif

Compose example 1 - with a config file

Make a dockcheck.config with parameters from default.config and mount it to the container. Set up the env variables for cron.

---
## Main compose file example to use with setting configuration
## with the `dockcheck.config` just as you would non-containerized
services:
  dockcheck:
    container_name: dockcheck
    hostname: dockerHostXYZ # The name that will be used in notifications
    # build: . # To build locally from the cloned/edited repo - good for testing
    image: mag37/dockcheck:latest
    restart: unless-stopped
    environment:
      # Set up cron schedules and corresponding dockcheck options, examples below
      CRON_SCHEDULE: "0 */3 * * *" # Run every three hours
      DOCKCHECK_ARGS: "-mniI -x 10 -e container1" # Send notification + extra options
      CRON_SCHEDULE_1: "30 1 * * *" # Run nightly at 1:30
      DOCKCHECK_ARGS_1: "-milap" # Send notification, update labeled containers, prune
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock # Beware - full access
      - ./dockcheck.config:/app/dockcheck.config # Define your notifications and settings
      # Volume mappings to your Docker project directories, can be multiple paths
      # Has to match 1:1 outside on host and inside the container
      - /path/to/projects/docker:/path/to/projects/docker:ro
      # Optional volume to enable displaying releasenote urls,
      # can alternatively reference the `./notify_templates/urls.list`
      # - ./urls.list/:/app/urls.list
Compose example 2 - with only env vars

Alternatively you can run the compose file without the dockcheck.config and just configure everything through env-vars. Use the default.config as variable reference.

Example with XMPP notification template setup, backups toggled and excluding 2 containers:

---
## Alternative compose file to use without `dockcheck.config` 
## And instead use environment variables to configure 
## See the `default.config` for available variables/settings
services:
  dockcheck:
    container_name: dockcheck
    hostname: dockerHostXYZ # The name that will be used in notifications
    image: mag37/dockcheck:latest
    restart: unless-stopped
    environment:
      # Notification setup:
      NOTIFY_CHANNELS: "xmpp"
      XMPP_SOURCE_JID: "[email protected]"
      XMPP_SOURCE_PWD: "Your-Safe-Password123"
      XMPP_DEST_JID: "[email protected]"
      # Extra configs:
      BackupForDays: "5"
      Exclude: "containerone,containertwo"
      # Crontab setup:
      CRON_SCHEDULE: "0 */3 * * *"
      DOCKCHECK_ARGS: "-mniI -x 10"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock # Beware - Full access
      - /path/to/projects/docker:/path/to/projects/docker:ro # Match path 1:1

Tag summary

Content type

Image

Digest

sha256:410079866

Size

57.9 MB

Last updated

8 days ago

docker pull mag37/dockcheck