Overview
Copr supports Docker Compose to spawn the complete development stack on your local machine, including all components: frontend, backend, builders, distgit, keygen, and supporting services.Prerequisites
Required Software
- Docker: Container runtime
- Docker Compose: Multi-container orchestration
- Git: Version control
Installation
Fedora/RHEL:Quick Start
Get up and running in minutes:Start the Docker stack
Access the Frontend
Open your browser to: http://localhost:5000You should see the Copr web interface.
Container Architecture
The Docker Compose setup includes these services:Core Services
| Service | Container Name | Description |
|---|---|---|
| frontend | copr_frontend_1 | Web UI and API server |
| database | copr_database_1 | PostgreSQL database |
| backend-build | copr_backend-build_1 | Build task dispatcher |
| backend-action | copr_backend-action_1 | Action task dispatcher |
| backend-log | copr_backend-log_1 | Logging service |
| backend_httpd | copr_backend_httpd_1 | Build results HTTP server |
| distgit | copr_distgit_1 | Source caching service |
| distgit-httpd | copr_distgit-httpd_1 | DistGit HTTP server |
| keygen-signd | copr_keygen-signd_1 | GPG signing daemon |
| keygen-httpd | copr_keygen-httpd_1 | Keygen HTTP server |
| builder | copr_builder_1 | Package builder |
| resalloc | copr_resalloc_1 | Resource allocation manager |
| resalloc-webui | copr_resalloc-webui_1 | Resalloc web interface |
| redis | copr_redis_1 | Message queue and cache |
| pulp (optional) | copr_pulp_1 | Content repository management |
Port Mappings
Rootless podman-compose doesn’t allow multiple containers in one pod to listen on the same port, so services use different host ports.
| Host Port | Container Port | Service | URL |
|---|---|---|---|
| 5000 | 5000 | Frontend | http://localhost:5000 |
| 5001 | 5001 | DistGit | http://localhost:5001 |
| 5002 | 5002 | Backend Results | http://localhost:5002 |
| 5005 | 5000 | Resalloc WebUI | http://localhost:5005 |
| 5006 | 80 | Pulp | http://localhost:5006 |
| 5009 | 5432 | PostgreSQL | localhost:5009 |
Persistent Volumes
Docker Compose creates named volumes for persistent data:results- Build results and RPM repositoriescopr-keygen- GPG keysdist-git- Cached source RPMsdatabase- PostgreSQL dataredis- Redis dataresalloc- Resalloc statepulp-storage- Pulp content storagepulp-database- Pulp database
Working with the Stack
Viewing Logs
All services:Accessing Containers
Get a shell in any container:Restarting Services
After making code changes, restart the affected service: Restart specific service:Stopping the Stack
Stop all containers (preserves data):Development Workflow
Making Code Changes
The source code is mounted into containers at/opt/copr, so changes to your local files are immediately visible inside containers.
Test your changes
Visit http://localhost:5000 or use the API/CLI to test.
Testing Builds
Create a test project and build:Access the frontend
Navigate to http://localhost:5000 and log in (create an account if needed).
Create a new project
Click “New Project” and configure:
- Project name:
test-project - Chroots: Select
fedora-rawhide-x86_64
Submit a build
Use a simple test package:
- Method: “Upload”
- Upload a source RPM or provide a URL
Database Access
Connect to PostgreSQL:Redis Access
Connect to Redis:Troubleshooting
Containers won’t start
Check container status:- Port conflicts: Another service using ports 5000-5009
- Solution: Stop conflicting services or modify
docker-compose.yamlports
- Solution: Stop conflicting services or modify
- Insufficient resources: Docker needs enough CPU/RAM
- Solution: Allocate more resources in Docker settings
- Permission errors: SELinux or file permissions
- Solution: Check volume mount permissions, try
:Zflag
- Solution: Check volume mount permissions, try
Database initialization fails
Reset database:Build tasks not processing
Check backend dispatcher:Frontend shows errors
Check Apache logs:Changes not taking effect
Full rebuild:Advanced Configuration
Custom Configuration Files
Configuration files are in the Docker context:docker/frontend/files/- Frontend configsdocker/backend/files/- Backend configsdocker/distgit/files/- DistGit configs
Environment Variables
Set indocker-compose.yaml under service environment:
Running Without Privileged Mode
The builder container requiresprivileged: true for mock builds. For development without actual builds:
Performance Tips
- Use SSD storage for Docker volumes
- Allocate sufficient RAM (minimum 8GB recommended)
- Disable unnecessary services in
docker-compose.yaml - Use BuildKit for faster image builds:
Next Steps
- Read the architecture documentation to understand component interactions
- Review contributing guidelines before submitting changes
- Explore the API documentation to integrate with Copr
- Join the community on IRC or mailing lists for help
Additional Resources
- Copr Docker Stack Blog Post - Detailed setup guide
- Docker on Fedora - Docker installation and usage
- Copr Developer Documentation - Official developer docs