This guide provides instructions for testing OpenSPP Docker images after they're built.
Use the provided test script for comprehensive testing:
# Make script executable
chmod +x test-images.sh
# Test Ubuntu image (default)
./test-images.sh
# Test slim image
./test-images.sh slim
# Test both variants
./test-images.sh both
# Test with database initialization
./test-images.sh ubuntu --init-db-
Test the latest images from registry:
# Start services docker-compose -f docker-compose.test.yml up -d # Watch logs docker-compose -f docker-compose.test.yml logs -f # Access OpenSPP open http://localhost:8069 # Stop services docker-compose -f docker-compose.test.yml down -v
-
Test specific image tags:
# Test weekly build IMAGE_TAG=weekly docker-compose -f docker-compose.test.yml up -d # Test specific version IMAGE_TAG=v1.0.0 docker-compose -f docker-compose.test.yml up -d # Test slim variant IMAGE_TAG=latest-slim docker-compose -f docker-compose.test.yml up -d
-
Test with database initialization:
INIT_DATABASE=true docker-compose -f docker-compose.test.yml up -d
- ✅ Image pulls successfully
- ✅ Container starts without errors
- ✅ Health endpoint responds
- ✅ Web interface is accessible
- ✅ Can connect to PostgreSQL
# Initialize database with modules
docker-compose -f docker-compose.test.yml exec openspp \
openspp-server --database=openspp_test --init=base,web --stop-after-init
# Test database connection
docker-compose -f docker-compose.test.yml exec openspp \
openspp-shell --database=openspp_test -c "print('Connected')"# Check response time
time curl -s http://localhost:8069 > /dev/null
# Monitor resource usage
docker stats openspp-test-app
# Load test (requires apache2-utils)
ab -n 100 -c 10 http://localhost:8069/# Install OpenSPP modules
docker-compose -f docker-compose.test.yml exec openspp \
openspp-server --database=openspp_test \
--init=spp_base,g2p_registry_base \
--stop-after-init# Test on different architectures (if available)
docker run --rm --platform linux/amd64 \
docker.acn.fr/openspp/openspp:latest \
openspp-server --version- Image size is reasonable (~1.5GB for Ubuntu, ~1.0GB for slim)
- No security vulnerabilities in base image
- All required files are present
- Proper user permissions (non-root)
- Container starts successfully
- No critical errors in logs
- Health check passes
- Web interface loads
- Database connection works
- Queue jobs run (with workers > 0)
- Custom addons can be loaded
- Running as non-root user (openspp)
- No exposed secrets in environment
- Proper file permissions
- Network isolation works
# Check logs
docker-compose -f docker-compose.test.yml logs openspp
# Check detailed error
docker-compose -f docker-compose.test.yml up openspp
# Shell into container
docker-compose -f docker-compose.test.yml run openspp /bin/bash# Test database connectivity
docker-compose -f docker-compose.test.yml exec openspp \
pg_isready -h db -U openspp
# Check database logs
docker-compose -f docker-compose.test.yml logs db# Check Python environment
docker-compose -f docker-compose.test.yml exec openspp \
python3 -c "import odoo; print(odoo.__version__)"
# List available modules
docker-compose -f docker-compose.test.yml exec openspp \
openspp-server --database=openspp_test --list-modulesTo test images from a different registry:
# Test from Docker Hub
REGISTRY=docker.io docker-compose -f docker-compose.test.yml up -d
# Test from local registry
REGISTRY=localhost:5000 docker-compose -f docker-compose.test.yml up -dThe GitHub Actions workflow automatically tests images on:
- Pull requests
- Weekly scheduled builds
- Manual workflow dispatches
To manually trigger tests:
- Go to Actions
- Select "Docker Build and Push"
- Click "Run workflow"
- Select branch and options
After testing:
# Stop and remove containers
docker-compose -f docker-compose.test.yml down
# Remove volumes
docker-compose -f docker-compose.test.yml down -v
# Remove test images
docker rmi $(docker images | grep openspp | awk '{print $3}')
# Full cleanup
./test-images.sh cleanIf tests fail:
- Capture the error logs
- Note the image tag and registry
- Document the test scenario
- Report at GitHub Issues