2025-11-04 10:13:30 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2025-11-05 04:11:21 -08:00
|
|
|
echo "Setting up Docker Registry with authentication..."
|
2025-11-04 10:13:30 -08:00
|
|
|
|
2025-11-05 04:11:21 -08:00
|
|
|
# Build and start the registry
|
|
|
|
|
docker-compose up -d --build
|
2025-11-04 10:13:30 -08:00
|
|
|
|
2025-11-05 04:11:21 -08:00
|
|
|
echo "Waiting for registry to start..."
|
|
|
|
|
sleep 5
|
2025-11-04 10:13:30 -08:00
|
|
|
|
2025-11-05 04:11:21 -08:00
|
|
|
# Set initial password for recruas user
|
|
|
|
|
echo "Setting password for 'recruas' user..."
|
|
|
|
|
docker exec -it registry htpasswd -B /etc/docker/registry/auth/htpasswd recruas
|
2025-11-04 10:13:30 -08:00
|
|
|
|
2025-11-05 04:11:21 -08:00
|
|
|
echo "Setup complete!"
|
|
|
|
|
echo "Registry is running with authentication enabled."
|
|
|
|
|
echo "Default user: recruas"
|
|
|
|
|
echo "UI will be available on port 80 (exposed)"
|
|
|
|
|
echo "Registry API available on port 5000 (exposed)"
|
2025-11-04 10:13:30 -08:00
|
|
|
echo ""
|
2025-11-05 04:11:21 -08:00
|
|
|
echo "To change password later:"
|
|
|
|
|
echo "docker exec -it registry htpasswd -B /etc/docker/registry/auth/htpasswd recruas"
|