diff --git a/CI_CD_PIPELINE_SETUP_GUIDE.md b/CI_CD_PIPELINE_SETUP_GUIDE.md index b7bb16a..df7c7d2 100644 --- a/CI_CD_PIPELINE_SETUP_GUIDE.md +++ b/CI_CD_PIPELINE_SETUP_GUIDE.md @@ -609,17 +609,9 @@ docker pull localhost:5000/test:latest # Remove from local Docker docker rmi localhost:5000/test:latest -# Delete test image from registry using registry API -# Get the digest of the latest tag -DIGEST=$(curl -s -H "Accept: application/vnd.docker.distribution.manifest.v2+json" http://localhost:5000/v2/test/manifests/latest | grep -o '"digest":"[^"]*"' | cut -d'"' -f4) - -# Delete the manifest from registry -if [ ! -z "$DIGEST" ]; then - echo "Deleting test image from registry..." - curl -X DELETE http://localhost:5000/v2/test/manifests/$DIGEST -else - echo "Could not find digest for test image" -fi +# Delete test repository from registry (simpler approach) +echo "Deleting test repository from registry..." +curl -X DELETE http://localhost:5000/v2/test/repository # Clean up test file rm /tmp/test.Dockerfile