Docker Image Patrol (DIP) is a tool that returns the latest version of a docker image using a regular expression.
Docker Image Patrol (DIP) keeps docker images up-to-date.
Keep Docker Images Up To Date (KDIUTD)
sudo snap install kdiutd
Usage:
dip [flags]
dip [command]
Available Commands:
help Help about any command
image A brief description of your command
Flags:
--configCredHome string config and cred file home directory (default is $HOME/.dip)
--debug debugging mode
-h, --help help for dip
-v, --version version for dip
Use "dip [command] --help" for more information about a command.
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.
dip image --name=alpine --regex="(\d+\.){2}\d"
dip image --name=minio/minio --regex="RELEASE\.2019.*"
dip image --name=sonatype/nexus3 --regex="(\d+\.){2}\d"
dip image --name=nginx --regex=".*(\d+\.){2}\d-alpine$"
dip image --name=sonarqube --regex=".*-community$"
dip image --name=traefik --regex="^v(\d+\.){1,2}\d+$"
dip image --name=ubuntu --regex="^xenial.*"
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.
dip image --name=golang --regex="([0-9]+\.){2}[0-9]+$" --dockerfile
dip image --name=adoptopenjdk --regex="14.*-jre-hotspot-bionic" --dockerfile
docker run utrecht/dip:4.2.3 dip image --name=grafana/grafana --regex=^7\.5\.7$
will return:
7.5.7
Use the --updateDockerfile
to check and update the image that is defined in
the FROM
inside a Dockerfile.
dip image --name=golang --regex="^([0-9]+\.){2}[0-9]-alpine([0-9]+\.)[0-9]{2}$" --updateDockerfile
dip image --name=prometheus/prometheus --regex="^v2(\.[0-9]+){2}$" --quayIo