Thank you for your interest in contributing to phpbu-docker!
- Docker with Buildx support
- Git
-
Clone the repository:
git clone https://github.com/netresearch/phpbu-docker.git cd phpbu-docker -
Build locally:
docker buildx bake dev
-
Test your changes:
docker run --rm phpbu:dev --version docker run --rm phpbu:dev --help
# Build and run
docker compose build phpbu
docker compose run --rm phpbu --version
# Development mode
docker compose up devfeature/- New featuresfix/- Bug fixesdocs/- Documentation updatessecurity/- Security improvements
Follow Conventional Commits:
type(scope): description
[optional body]
[optional footer]
Types: feat, fix, docs, style, refactor, test, chore
Examples:
feat(dockerfile): add arm64 support
fix(security): run as non-root user
docs(readme): update usage examples
flowchart LR
A[Fork] --> B[Branch]
B --> C[Develop]
C --> D[Test]
D --> E[Lint]
E --> F[PR]
F --> G{Review}
G -->|Approved| H[Merge]
G -->|Changes| C
- Fork the repository
- Create a feature branch from
main - Make your changes
- Test locally with
docker buildx bake ci - Lint with hadolint:
docker run --rm -i hadolint/hadolint < Dockerfile - Submit a pull request
- Dockerfile passes hadolint
-
docker buildx bake --printvalidates bake file - Image builds successfully
-
--versionand--helpwork - No new critical/high vulnerabilities (Trivy)
- Documentation updated if needed
# Validate bake configuration
docker buildx bake --print
# Build minimal variant (CI target)
docker buildx bake ci
# Build full variant (CI target)
docker buildx bake ci-full
# Run basic tests (minimal)
docker run --rm phpbu:ci --version
docker run --rm phpbu:ci --help
# Run basic tests (full)
docker run --rm phpbu:ci-full --version
docker run --rm phpbu:ci-full which rsync gpg ssh# Run Trivy locally (minimal variant)
docker run --rm aquasec/trivy image phpbu:ci
# Run Trivy locally (full variant)
docker run --rm aquasec/trivy image phpbu:ci-fulldocker run --rm -i hadolint/hadolint < Dockerfile- Use multi-stage builds
- Minimize layers
- Run as non-root user
- Add OCI labels
- Follow hadolint recommendations
- Use consistent indentation (2 spaces)
- Group related targets
- Document complex configurations
Releases are automated via GitHub Actions:
- Create a tag:
git tag v1.0.0 - Push the tag:
git push origin v1.0.0 - CI builds, tests, signs, and pushes the image
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: GitHub Security Advisories
By contributing, you agree that your contributions will be licensed under the LGPL-3.0 License.