Add Docker permission validation

This commit is contained in:
Santosh Bhavani 2025-10-24 22:02:23 -07:00
parent 07d4107da4
commit eec479197b
2 changed files with 27 additions and 1 deletions

View File

@ -88,7 +88,7 @@ services:
count: all
capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
test: ["CMD", "ollama", "list"]
interval: 30s
timeout: 10s
retries: 3

View File

@ -78,6 +78,32 @@ else
exit 1
fi
# Check Docker daemon permissions
echo "Checking Docker permissions..."
if ! docker info &> /dev/null; then
echo ""
echo "=========================================="
echo "ERROR: Docker Permission Denied"
echo "=========================================="
echo ""
echo "You don't have permission to connect to the Docker daemon."
echo ""
echo "To fix this, run one of the following:"
echo ""
echo "Option 1 (Recommended): Add your user to the docker group"
echo " sudo usermod -aG docker \$USER"
echo " newgrp docker"
echo ""
echo "Option 2: Run this script with sudo (not recommended)"
echo " sudo ./start.sh"
echo ""
echo "After adding yourself to the docker group, you may need to log out"
echo "and log back in for the changes to take effect."
echo ""
exit 1
fi
echo "✓ Docker permissions OK"
# Build the docker-compose command
if [ "$USE_COMPLETE" = true ]; then
CMD="$DOCKER_COMPOSE_CMD -f $(pwd)/deploy/compose/docker-compose.complete.yml"