Testing Guide

Full Feature Testing with Multi-Registry Setup

Test all features of Docker Registry UI with a realistic multi-registry environment populated with real images.

Quick Setup

Download the required files and start testing in minutes:

Step 1: Download Files

# Create a test directory
mkdir docker-registry-ui-test
cd docker-registry-ui-test

# Download multi-registry compose file
wget https://raw.githubusercontent.com/VibhuviOiO/docker-registry-ui/refs/heads/main/docker/docker-compose-multi-registry.yml

# Download test image population script
wget https://raw.githubusercontent.com/VibhuviOiO/docker-registry-ui/refs/heads/main/docker/populate-test-images.sh

# Make script executable
chmod +x populate-test-images.sh

Step 2: Start Multi-Registry Environment

# Start two registries and the UI
docker-compose -f docker-compose-multi-registry.yml up -d

# Wait for services to be ready (about 10 seconds)
sleep 10

Step 3: Populate with Test Images

# Run the population script
./populate-test-images.sh

# This will:
# - Pull popular images (alpine, nginx, redis, postgres, node, python, etc.)
# - Push them to both test registries
# - Create ~40+ images in Registry 1
# - Create ~10+ images in Registry 2
# - Takes about 5-10 minutes depending on your internet speed

Step 4: Access the UI

# Open in your browser
http://localhost:5003

What Gets Created

Registry 1 (localhost:5001)

Registry 2 (localhost:5002)

Features to Test

1. Multi-Registry Management

2. Repository Browsing

3. Tag Management

4. Vulnerability Scanning

5. Bulk Operations

6. Analytics

Test Scenarios

Scenario 1: Clean Up Old Alpine Versions

1. Navigate to Bulk Operations
2. Repository pattern: alpine
3. Tag pattern: 3.*
4. Keep minimum: 2
5. Enable dry run
6. Review what would be deleted
7. Execute deletion

Scenario 2: Scan for Vulnerabilities

1. Navigate to nginx repository
2. Click "Scan" on nginx:latest
3. Wait for scan to complete
4. View vulnerability badges
5. Click badge to see CVE details
6. Filter by severity (Critical, High)
7. Click CVE ID to view in NVD

Scenario 3: Layer Inspection

1. Navigate to postgres repository
2. Click on postgres:16 tag
3. Click "View Layers"
4. See layer sizes and commands
5. View vulnerability counts per layer

Cleanup

When done testing, clean up everything:

# Stop and remove all containers
docker-compose -f docker-compose-multi-registry.yml down -v

# Remove downloaded images (optional)
docker image prune -a

Troubleshooting

Script Fails to Pull Images

UI Not Accessible

Registries Not Showing Images

Advanced Testing

Custom Test Images

Add your own test images:

# Tag and push custom image
docker tag myapp:latest localhost:5001/myapp:v1.0.0
docker push localhost:5001/myapp:v1.0.0

Test with Authentication

Modify docker-compose-multi-registry.yml to add basic auth to registries and test authentication flow.

Automated Testing

Note: This project currently does not have automated test coverage. Contributions for unit and integration tests are welcome!