Skip to content

Instantly share code, notes, and snippets.

@djosip
djosip / cleanupManifestsWithoutTags.sh
Last active September 9, 2024 07:34 — forked from mortensteenrasmussen/cleanupManifestsWithoutTags.sh
Clean up untagged manifests in private docker registry
#!/bin/bash
REGISTRY_DIR=/storage/data/docker-registry/docker/registry/v2/repositories
REGISTRY_URL=http://127.0.0.1:5000
# Set CURLOPTS to "--insecure" to disable TLS certificate verification
CURLOPTS=""
if [ -z "$REGISTRY_DIR" -o ! -d "$REGISTRY_DIR" ]; then
echo "$0: error: REGISTRY_DIR not specified or does not exist"
exit 1