module
0.0.0-20240406130809-b063179f6fa0
Repository: https://github.com/030/dip.git
Documentation: pkg.go.dev
# README
DIP
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 [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.
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
docker run utrecht/dip:4.2.3 dip image --name=grafana/grafana --regex=^7\.5\.7$
will return:
7.5.7
updateDockerfile
Use the --updateDockerfile
to check and update the image that is defined in
the FROM
inside a Dockerfile.
golang alpine builder
dip image --name=golang --regex="^([0-9]+\.){2}[0-9]-alpine([0-9]+\.)[0-9]{2}$" --updateDockerfile
quay
dip image --name=prometheus/prometheus --regex="^v2(\.[0-9]+){2}$" --quayIo