dip

module
Version: v0.0.0-...-20ca852 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2021 License: MIT

README

DIP

GoDoc Widget Go Report Card Build Status DevOps SE Questions Docker Pulls Issues Pull requests Total downloads License Repository Size Contributors Commit activity Last commit Release date Latest Production Release Version codecov GolangCI BCH compliance Chocolatey Snap

Docker Image Patrol (DIP) keeps docker images up-to-date.

Installation

Keep Docker Images Up To Date (KDIUTD)

sudo snap install kdiutd

Usage

Usage:
  dip image [flags]

Flags:
      --dockerfile     Check whether the image that resides in the Dockerfile is outdated
  -h, --help           help for image
  -n, --name string    Name of the Docker image to be checked whether it is up to date
  -r, --regex string   Regex for finding the latest image tag
      --sendSlackMsg   Send message to Slack

Global Flags:
      --configCredHome string   config and cred file home directory (default is $HOME/.dip)
      --debug                   debugging mode

k8s

Create a ~/.dip/config.yml file:

dip_images:
  docker.io/alpine: 3\.[0-9]+\.[0-9]+
  elastic/elasticsearch: 7\.[0-9]+\.[0-9]+
  fluent/fluentd-kubernetes-daemonset: v.*-debian-elasticsearch7-.*
  grafana/grafana: 7\.[0-9]+\.[0-9]+
  docker.io/kibana: 7\.[0-9]+\.[0-9]+
  kubernetesui/dashboard: v2\.[0-9]+\.[0-9]+
  kubernetesui/metrics-scraper: v1\.[0-9]+\.[0-9]+
  docker.io/mongo: 4\.[0-9]+\.[0-9]+
  docker.io/postgres: 13\.[0-9]+\.[0-9]+
  prom/alertmanager: v0\.[0-9]+\.[0-9]+
  prom/prometheus: v2\.[0-9]+\.[0-9]+
  prom/pushgateway: v1\.[0-9]+\.[0-9]+
  sonatype/nexus3: 3\.[0-9]+\.[0-9]+

and create a ~/.dip/creds.yml file:

slack_channel_id: someSlackChannelID
slack_token: some-token

or for k8s:

apiVersion: v1
kind: ConfigMap
metadata:
  name: dip
  namespace: dip
data:
  config.yml: |-
    ---
    dip_images:
      docker.io/alpine: 3\.[0-9]+\.[0-9]+
      elastic/elasticsearch: 7\.[0-9]+\.[0-9]+

and

apiVersion: v1
kind: Secret
metadata:
  name: dip
  namespace: dip
stringData:
  creds.yml: |-
    ---
    slack_channel_id: some-id
    slack_token: some-token

Note: follow these steps to create a Slack Token.

latest

alpine
dip image --name=alpine --regex="(\d+\.){2}\d"
minio
dip image --name=minio/minio --regex="RELEASE\.2019.*"
nexus
dip image --name=sonatype/nexus3 --regex="(\d+\.){2}\d"
nginx
dip image --name=nginx --regex=".*(\d+\.){2}\d-alpine$"
sonarqube
dip image --name=sonarqube --regex=".*-community$"
traefik
dip image --name=traefik --regex="^v(\d+\.){1,2}\d+$"
ubuntu
dip image --name=ubuntu --regex="^xenial.*"

dockerfile

Use -dockerfile to check whether the image that is defined in the FROM should be updated. If the command is run in the Continuous Integration (CI), the pipeline will fail as an exit 1 is returned if an image is outdated.

golang
dip image --name=golang --regex="([0-9]+\.){2}[0-9]+$" --dockerfile
adoptopenjdk
dip image --name=adoptopenjdk --regex="14.*-jre-hotspot-bionic" --dockerfile

docker

dockeri.co

docker run utrecht/dip:4.0.2 dip image --name=grafana/grafana --regex=^7\.5\.7$

will return:

7.5.7

Directories

Path Synopsis
cmd
dip
pkg
internal
k8s

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL