A Docker container that creates and maintains a local Manjaro Linux package mirror. It uses rsync for efficient synchronization and nginx for serving packages, with built-in monitoring and health checks.
- Efficient Syncing: Uses rsync with configurable bandwidth limits
- Multi-Architecture Support: Works on both AMD64 and ARM64 platforms
- Monitoring: Built-in Prometheus metrics
- Health Checks: Automated container health monitoring
- Performance: Nginx-based package serving with auto-indexing
- Security: Regular vulnerability scanning and updates
- Logging: Structured logging with rotation
- Docker Engine 20.10.0 or newer
- At least 100GB of free disk space (for a full mirror)
- Stable network connection
version: "3.8"
services:
manjaro-mirror:
container_name: manjaro-mirror
image: ghcr.io/tobiaswx/manjaro-package-mirror:latest
volumes:
- /path/to/storage:/srv/http/manjaro
ports:
- "8080:80"
- "9100:9100" # Prometheus metrics
environment:
- SOURCE_MIRROR=rsync://mirrorservice.org/repo.manjaro.org/repos/
- RSYNC_BWLIMIT=1000 # KB/s (0 for unlimited)
- SLEEP=6h
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 5m
timeout: 3s
retries: 3
restart: unless-stopped
docker run -d \
--name=manjaro-mirror \
-p 8080:80 \
-p 9100:9100 \
-v /path/to/storage:/srv/http/manjaro \
-e RSYNC_BWLIMIT=1000 \
-e SLEEP=6h \
--restart unless-stopped \
ghcr.io/tobiaswx/manjaro-package-mirror:latest
Variable | Description | Default | Required |
---|---|---|---|
SOURCE_MIRROR |
Rsync mirror URL | rsync://mirrorservice.org/repo.manjaro.org/repos/ |
No |
SLEEP |
Time between sync attempts | 6h |
No |
RSYNC_BWLIMIT |
Bandwidth limit in KB/s (0 for unlimited) | 0 |
No |
RSYNC_OPTS |
Additional rsync options | - | No |
LOG_LEVEL |
Logging level (debug, info, warn, error) | info |
No |
Path | Description | Required |
---|---|---|
/srv/http/manjaro |
Mirror storage location | Yes |
/var/log/manjaro-mirror |
Log files location | No |
Port | Description | Required |
---|---|---|
80 | HTTP server (nginx) | Yes |
9100 | Prometheus metrics | No |
The container includes built-in health checks accessible at /health
. Configure your monitoring system to track this endpoint for service health.
Access metrics at :9100/metrics
. Available metrics include:
- Mirror sync status
- Disk usage
- Sync duration
- Error counts
- Regular vulnerability scanning via Trivy
- Automated dependency updates via Dependabot
- Minimal base image (Alpine Linux)
- Regular security patches
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'feat: Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project follows Conventional Commits:
feat
: New featuresfix
: Bug fixesdocs
: Documentation changeschore
: Routine tasks, maintenancerefactor
: Code refactoringtest
: Testing changes
This project is licensed under the MIT License - see the LICENSE file for details.
- Create a GitHub Issue for bug reports, feature requests, or questions
- Add a ⭐️ star on GitHub to support the project!
Actively maintained. See the CHANGELOG for recent updates.
- Manjaro Linux for the package repository
- Official Manjaro mirrors for providing reliable source mirrors