Thank you for your interest in contributing! This project thrives on community participation, and we welcome your help in adding new images and improving existing ones.
First, please read and agree to our Code of Conduct.
To ensure a smooth and consistent development experience for everyone, we use pre-commit to manage our code quality
checks.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
rustup component clippy rustfmt
pip install pre-commit ruff pytest
Clone your fork:
git clone https://github.com/YOUR-USERNAME/EvergreenImageRegistry.git
cd EvergreenImageRegistry
pre-commit install
pre-commit install --hook-type pre-push
That’s it! Now, every time you run git commit, our suite of linters and formatters will run automatically on the files
you’ve changed. When you git push, the full 11-gate quality check runs (Rust unit tests, Rust integration tests,
clippy, fmt, Python syntax + ruff lint, Shell syntax, manifest TOML validation, SBOM JSON validation, Dockerfile
constraints, cargo audit, and Rust release build).
Create a new branch for your feature or bug fix:
git checkout -b feature/add-nginx-image
Commit your changes. The pre-commit hooks will run. If they fail, fix the reported issues and commit again.
git add .
git commit -m "feat: Add new minimal image for Nginx"
Push your branch to your fork:
git push origin feature/add-nginx-image
main branch of the upstream repository. Please fill out the PR template with as
much detail as possible.Before writing any Dockerfile, read these documents in order:
Open an Issue: Start by creating a “New Image Proposal” issue to discuss the software and ensure it’s a good fit for the registry.
Create the Directory: Create a new directory under images/ with the name of the software (e.g.,
images/nginx/).
wget(notcurl) in wolfi stages.RUN mkdir -pandRUN touch placeholders before any multi-stage COPY.Add the manifest.toml: Declare the image tier, version, and build configuration. See the pipeline guide for the
per-image manifest schema.
Add the README.md: Create a comprehensive README for your image, following the structure of the existing image
READMEs. Include a working docker-compose.ymland a.env.template.
Add a .dockerignore file.
For complete Dockerfile templates, see Image Cookbook.
manifest.toml to understand the existing implementation.Check for drift between the manifest and Dockerfile:
cd evergreenctl && cargo build --release
evergreenctl drift images/<image>/
Verify locally before submitting:
docker build -t evergreen-<image> images/<image>/
docker run -d --name test-<image> evergreen-<image>
docker ps # Verify container is running
docker logs test-<image> # Check for errors
manifest.toml if your changes affect the version, tier, or build configuration.README.md if your changes affect usage, environment variables, or volume mounts.When you commit, these hooks run automatically:
| Hook | What it checks |
|---|---|
| hadolint | Dockerfile linting |
| evergreen-constraints | Security constraints (C001-C020) |
| no-alpine | No Alpine base images |
| trailing-whitespace | Whitespace cleanup |
| end-of-file-fixer | File ending newline |
| check-yaml | YAML syntax |
| check-json | JSON syntax |
| markdownlint-cli2 | Markdown formatting |
| yamllint | YAML linting |
When you push, these 11 gates run:
Run the full test suite locally before pushing:
# Run pre-commit on all files
pre-commit run --all-files
# Run Python tests
pytest tests/
# Build and test an image
docker build -t evergreen-<image> images/<image>/
docker run -d --name test-<image> -p 8080:8080 evergreen-<image>
curl http://localhost:8080/healthz
# Verify with evergreenctl
cd evergreenctl && cargo build --release
evergreenctl verify images/<image>/
evergreenctl drift images/<image>/
evergreenctl audit images/
Ensure all CI checks pass before requesting review.
Respond to review feedback promptly. Most PRs require 1-2 review cycles.
Use Conventional Commits format:
feat: Add new minimal image for Nginx
fix: Correct health-check endpoint for Redis
docs: Update contributing guide
refactor: Simplify multi-stage build pattern
chore: Update base image to latest wolfi
rustfmt defaults.cargo clippy before committing.#[derive(Deserialize)] for config structs.anyhow::Resultorthiserror.ruff lint rules.pathlib.Pathoveros.path.markdownlint rules.#).If your image fails in CI, consult Common Problems first. The most frequent causes are:
mkdir -p/touch placeholder before COPY (Problem 3)wget instead (Problem 9)For CI pipeline issues (timeouts, matrix failures, push errors), see the CI/CD Pipeline Guide.
If you have any questions, please feel free to open an issue and we’ll be happy to help you get started.