Coding Standards

Asymmetric Effort coding standards for consistency across all projects.

Docker Standards

All Asymmetric Effort projects that use containers must follow these standards.

Base Images

Only the following base images are permitted:

Image Purpose
ubuntu:24.04 Builder stage and runtime (only when /bin/bash is required)
gcr.io/distroless/base (or appropriate distroless variant) Runtime stage (default)

No other images may be pulled from the internet. All container images must be built from these approved base images.

Multi-Stage Build Pattern

All Dockerfiles must use a multi-stage build pattern:

  1. Builder stage: Uses ubuntu:24.04 to compile, install dependencies, and prepare artifacts.
  2. Runtime stage: Uses Google Distroless as the final image. Only the minimal artifacts needed at runtime are copied from the builder stage.
# Builder stage
FROM ubuntu:24.04 AS builder
# Install build dependencies, compile, etc.

# Runtime stage
FROM gcr.io/distroless/base AS runtime
COPY --from=builder /app /app
ENTRYPOINT ["/app/binary"]

Runtime Shell Exception

ubuntu:24.04 may be used as the runtime image only when the application absolutely requires a shell (/bin/bash) at runtime. This exception must be:

When ubuntu:24.04 is used as a runtime, it must still follow a multi-stage pattern — build dependencies must not be present in the final image.

Prohibited Practices

Image Hardening