This document defines the official standards that every image published under the Evergreen Image Registry project MUST adhere to. These standards are not optional guidelines; they are the foundation of our commitment to providing the community with secure, minimal, reliable, and production-ready container images.
The purpose of these standards is to build a high degree of trust. When a user pulls an image from this registry, they can be confident that it was built with security, performance, and usability as its primary design goals.
For clarity and to remove ambiguity, this document uses keywords as defined in RFC 2119 (e.g., MUST, SHOULD, MUST NOT).
This pillar is the core philosophy of the project. The primary goal is to minimize the attack surface of every image.
Images MUST use a “distroless” base image where a suitable one exists. If a distroless base is not technically feasible
for the application, a minimal base like wolfi (Chainguard) MUST be used. Standard distribution images (e.g., ubuntu,
debian:slim) are not acceptable for the final stage.
All application processes inside the container MUST run as a non-root user. A dedicated, unprivileged user and group
MUST be created in the Dockerfile.
Every Dockerfile MUST be a multi-stage build. The final runtime image MUST NOT contain any build tools, compilers,
development headers, source code, or package managers.
Images MUST NOT contain any secrets, including passwords, API keys, certificates, or tokens, in any layer. All secrets MUST be injectable at runtime via environment variables or Docker secrets.
All images MUST be successfully scanned for critical and high-severity CVEs as part of the CI/CD pipeline before being published. The pipeline SHOULD fail if new vulnerabilities of this severity are detected in a pull request.
Images must be stable, performant, and behave predictably in orchestrated environments.
Every image MUST provide a health check mechanism. Images with HTTP endpoints MUST expose /livezand/readyz probes
on port 9101 (via the health-shim sidecar or natively). Images built FROM scratchordistroless that lack a shell
MUST use HEALTHCHECK NONE in the Dockerfile, with health verification delegated to the orchestrator (Kubernetes probes
or health-shim sidecar). This approach follows ADR-006.
Image tags MUST strictly follow the upstream software’s semantic version (e.g., keycloak:25.0.2, postgres:16.1).
Once a versioned tag is pushed, it MUST NOT be overwritten. The :latest tag SHOULD point to the most recent stable
version.
The container’s entrypoint MUST ensure the application process can receive and properly handle process signals
(SIGTERM, SIGINT) from the container runtime, allowing for a clean and graceful shutdown.
For applications that benefit from a build-time optimization step, this step MUST be performed in the builder stage of
the Dockerfile.
Images must be easy to configure and use in a variety of environments.
All essential runtime configurations MUST be injectable via environment variables. This includes, but is not limited to, database connections, port bindings, and admin credentials.
Images MUST ship with secure default settings. For example, a database image MUST NOT allow password-less access by default.
Containers MUST be stateless. Any data that requires persistence (e.g., database files, user uploads, logs) MUST be stored in a volume mounted from the host. The image’s documentation MUST clearly specify which paths require volumes.
Every image is a product and must be documented as such.
Each image directory MUST contain a README.md file that includes:
docker-compose.yml example.The repository MUST contain a LICENSEfile for theDockerfiles and associated scripts. The license of the packaged
upstream software MUST be respected and acknowledged in the image’s documentation.
Images must be complete, self-consistent, and compatible with their runtime environment.
Every image published to the registry MUST contain a functional application binary or runtime that provides the advertised service. Specifically:
ENTRYPOINTorCMDMUST invoke the actual application (notsleep, true, echo, or a placeholder script).images/_wip/<name>/ (underscore prefix, excluded from CI)
with LABEL evergreen.status="wip".Placeholder stubs, skeleton Dockerfiles, and ENTRYPOINT ["true"] images MUST NOT appear in the active build matrix or
be published to any registry.
All compiled artifacts copied between build stages MUST use the same libc family as the final stage.
gnu target), the final stage MUST use a glibc base image (RHEL UBI minimal or UBI
standard).Decision tree for Python images:
Does the image pip install packages with C extensions (psycopg2, Pillow, cryptography, lxml, etc.)?
YES -> Build the venv inside a wolfi builder stage (pip compiles against musl).
If musl compilation fails, fall back to UBI minimal as final stage.
NO -> Current pattern is safe (debian builder, wolfi final).
Every image MUST support runtime UID/GID override via APP_UIDandAPP_GID environment variables. The default MUST be
65532:65532.
The Dockerfile MUST declare:
ARG APP_UID=65532
ARG APP_GID=65532
The user/group MUST be created at build time with the default UID. The image entrypoint MUST detect at runtime if
APP_UIDorAPP_GIDdiffer from the build-time defaults and, if so, re-create the user/group and performchown on
application data directories before dropping privileges with su-exec.
This ensures compatibility with orchestrators that require specific UIDs for volume mount permissions, while maintaining 65532 as the secure default.
For images built FROM scratchthat cannot includesu-exec, the entrypoint MUST log a clear warning if the configured
UID does not match the build-time UID, and the orchestrator MUST handle UID mapping externally.
Images for data services (databases, message queues, key-value stores, caches) MUST provide two operational modes:
Self-contained mode: The image includes the upstream initialization entrypoint script that handles first-run
detection, data store initialization (initdb, mysql_install_db, etc.), user/database creation from environment
variables, and configuration rendering. This mode works with plain docker run.
Binary-only mode: The image exposes the raw application binary without initialization logic, for use with
orchestrators that provide their own init containers. This is achieved by overriding CMDorENTRYPOINT at
runtime.
The default behavior MUST be self-contained mode (upstream entrypoint). Critical tier data service images MUST implement both modes. Standard and community tier data service images SHOULD implement self-contained mode but MAY omit it if documented.
These standards are a living document. Changes and amendments can be proposed via a pull request against this file. Any proposed change must be justified and will be subject to review by project maintainers to ensure it aligns with the core philosophy of the Evergreen Image Registry.