Skip to content
Keep docker images up-to-date
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
testing
.travis.yml
CNAME
LICENSE
README.md
_config.yml
go.mod
go.sum
main.go

README.md

DIP

GoDoc Widget Go Report Card Build Status DevOps SE Questions

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

Usage

Usage of dip:
  -debug
        Whether debug mode should be enabled
  -image string
        The origin of the image, e.g. nginx:1.17.5-alpine
  -registry string
        To what destination the image should be transferred, e.g. quay.io/some-org
exit status 2

Absent

Check whether a docker-image resides in a docker-registry:

dip -image nginx:1.17.5-alpine -registry quay.io/some-org/

An exit 0 will be returned if the image is absent and an exit 1 is applicable if it already exists to prevent that the tag gets overwritten.

or by using regex:

go run main.go -image ubuntu -registry quay.io/some-org/ -latest "xenial-\d.*"

latest

nexus

go run main.go -image sonatype/nexus3 -latest "(\d+\.){2}\d"

nginx

go run main.go -image nginx -latest ".*(\d+\.){2}\d-alpine$"

sonarqube

go run main.go -image sonarqube -latest ".*-community$"

traefik

go run main.go -image traefik -latest "^v(\d+\.){1,2}\d+$"

ubuntu

go run main.go -image ubuntu -latest "xenial-\d.*"

preserve

It it possible to preserve images from dockerhub in a private registry:

go run main.go -image ubuntu -registry quay.io/some-org/ -latest "xenial-\d.*" -preserve

date

Use -date to ensure that an image with security updates can be stored without having to worry that a tag will be overwritten.

go run main.go -image sonarqube -latest ".*-community$" -preserve -registry quay.io/some-org/ -date
You can’t perform that action at this time.