A tool to check whether docker images exist in the remote registry.

Check Docker Image

A tool to check whether docker images exist in the remote registry.

Build project:

go build -o check-image .

Example usage:

REGISTRY_URL=https://harbor.mycompany.com \
REGISTRY_USERNAME=harboruser \
REGISTRY_PASSWORD=harborpass \
CHECKED_IMAGES=myrepo/mysvc1:v1,myrepo/mysvc2:v1,myrepo/mysvc3:v1 \
LOGLEVEL=info \
./check-image
  • REGISTRY_URL: registry URL, can be either secure or insecure registry
    • Should be set to https://registry-1.docker.io if you are using Dockerhub
  • REGISTRY_USERNAME: username for registry authentication
    • Can be set empty if all checked images are public
  • REGISTRY_PASSWORD: password for registry authentication
    • Can be set empty if all checked images are public
  • CHECKED_IMAGES: comma-separated list of images to be checked
  • LOGLEVEL: log level, can be debug, info, warn, or error (default is info)

To obtain the result, you can refer to the following command:

./check-image; if [ `echo $?` = '0' ]; then touch SUCCESS; fi

If the file SUCCESS is created, then the check has passed.

Dockerhub example usage:

REGISTRY_URL=https://registry-1.docker.io \
CHECKED_IMAGES=bitnami/golang:1.16.2,bitnami/golang:1.17,bitnami/golang:1.12,bitnami/golang:9999 \
./check-image

You can also run the docker image directly:

docker run \
-e REGISTRY_URL=https://harbor.mycompany.com \
-e REGISTRY_USERNAME=harboruser \
-e REGISTRY_PASSWORD=harborpass \
-e CHECKED_IMAGES=myrepo/mysvc1:v7.3.2,myrepo/mysvc2:v8,myrepo/mysvc3:v8.2.0  \
minghsu0107/check-docker-image:v1
Owner
Hao-Ming, Hsu
Keep it smart and simple.
Hao-Ming, Hsu
Similar Resources

ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run, exec, cp, logs, stop)

ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run, exec, cp, logs, stop)

English / 日本語 ecsk ECS + Task = ecsk 😆 ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run

Dec 13, 2022

Tool to convert docker-compose files to set of simple docker commands

docker-decompose Tool to convert docker-compose files to set of simple docker commands. Install Use go get to install the latest version of the librar

Apr 12, 2022

ghcr images - Fetched from docker-library

ghcri ghcri is the repo for Github Container Registry Images. Just like docker-library for Docker Registry. Usage Replace all docker library from dock

Aug 15, 2022

CLI based tools to find the secrets in docker Images

CLI based tools to find the secrets in docker Images

docker-secrets CLI based tools to find the secrets in docker Images This tool use detect-secrets to find the secrets in the docker Image file system P

Mar 22, 2022

run regular Docker images in KVM/Qemu

runq runq is a hypervisor-based Docker runtime based on runc to run regular Docker images as a lightweight KVM/Qemu virtual machine. The focus is on s

Jan 6, 2023

🥑 Language focused docker images, minus the operating system.

"Distroless" Docker Images "Distroless" images contain only your application and its runtime dependencies. They do not contain package managers, shell

Jan 9, 2023

Woodpecker CI plugin to build multiarch Docker images with buildx

plugin-docker-buildx Woodpecker CI plugin to build multiarch Docker images with buildx Woodpecker CI plugin to build multiarch Docker images with buil

Nov 5, 2022

Show dependency graph of docker images/containers

Show dependency graph of docker images/containers

docker-graph Show dependency graph of docker images/containers like this: Orange is images and green is containers. Features Collect docker images, co

Feb 7, 2022

Hassle-free minimal CI/CD for git repositories with docker or docker-compose projects.

Hassle-free minimal CI/CD for git repositories with docker or docker-compose projects.

GIT-PIPE Hassle-free minimal CI/CD for git repos for docker-based projects. Features: zero configuration for repos by default automatic encrypted back

Sep 23, 2022
Awesome-italia-remote - A list of remote-friendly or full-remote companies that targets Italian talents

Awesome Italia Remote A list of remote-friendly or full-remote companies that ta

Dec 29, 2022
registry-tools: Prints image digest from a registry

registry-tools: Prints image digest from a registry

Dec 23, 2021
🔮 ✈️ to integrate OPA Gatekeeper's new ExternalData feature with cosign to determine whether the images are valid by verifying their signatures

cosign-gatekeeper-provider To integrate OPA Gatekeeper's new ExternalData feature with cosign to determine whether the images are valid by verifying i

Dec 8, 2022
Docker-based remote code runner / 基于 Docker 的远程代码运行器
Docker-based remote code runner / 基于 Docker 的远程代码运行器

Docker-based remote code runner / 基于 Docker 的远程代码运行器

Nov 9, 2022
Explore Docker registries and manipulate Docker images!
Explore Docker registries and manipulate Docker images!

L/S tags Utility and API to manipulate (analyze, synchronize and aggregate) images across different Docker registries. Example invocation $ lstags alp

Nov 25, 2022
k8s-image-swapper Mirror images into your own registry and swap image references automatically.
k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically. k8s-image-swapper is a mutating webhook for Kubernetes

Dec 27, 2022
Kubernetes controller for backing up public container images to our own registry repository

image-clone-controller Kubernetes controller which watches applications (Deployment and DaemonSet) and "caches" the images (public container images) b

Aug 28, 2022
A set of tests to check compliance with the Prometheus Remote Write specification

Prometheus Remote Write Compliance Test This repo contains a set of tests to check compliance with the Prometheus Remote Write specification. The test

Dec 4, 2022
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.

Vilicus Table of Contents Overview How does it work? Architecture Development Run deployment manually Usage Example of analysis Overview Vilicus is an

Dec 6, 2022
An image server which automatically optimize non webp and avif images to webp and avif images

go-imageserver go-imageserver is an image server which automatically optimize no

Apr 18, 2022