Soroush Neyestani

Software Engineer

Application Architect

Enterprise Application Developer

Technical Author & Educator

Hardened Container Stack

Building, Hardening, and Verifying a Minimal Docker Runtime with Go, Docker Compose, BuildKit, and Trivy

An Open-Source Container Security and DevSecOps Engineering Case Study

Developed by: Soroush Neyestani
Version: v0.1.0
Release: November 2026
Category: DevOps / Container Security / Infrastructure Engineering
Technologies: Go 1.27.4, Docker, Docker Compose, BuildKit, GitHub Actions, Trivy
License: MIT
Status: Completed — Public Open-Source Release

GitHub Repository: Hardened Container Stack

Official Release: v0.1.0


Executive Summary

Containerization has become a standard mechanism for packaging and deploying applications. However, containerization alone does not establish an adequate security boundary or guarantee that an application runs with appropriately restricted privileges.

A container may still execute as root, retain unnecessary Linux capabilities, expose ports beyond its intended network boundary, consume excessive resources, or have unrestricted write access to its filesystem.

The Hardened Container Stack project explores how these risks can be addressed through explicit runtime controls, minimal image construction, and automated verification.

I developed an original, stateless HTTP service using Go 1.27.4 and packaged it using a multi-stage Docker build.

The final runtime image is based on scratch and contains only the application binary and a documented test marker.

The deployment uses Docker Compose with a restrictive runtime configuration, including:

  • Non-root process execution.
  • Restricted Linux capabilities.
  • no-new-privileges.
  • Seccomp filtering.
  • A read-only root filesystem.
  • Explicit memory, CPU, and PID limits.
  • Loopback-only host port publishing.
  • Functional health monitoring.
  • Automated security verification.
  • Container image vulnerability scanning.

The project also compares a conventional reference image with the hardened multi-stage image.

Under the documented measurement method, image size decreased from approximately 1.06 GB to 7.21 MB, representing a 99.32% reduction.

Both public GitHub Actions workflows passed 32 Go tests and the required container verification checks.

Independent container builds produced matching image identifiers, layer digests, and runtime file inventories within the tested environments.

Trivy reported zero vulnerability findings using the recorded scanner version and vulnerability database.

The result is an inspectable engineering reference for container hardening rather than a claim that one Dockerfile can guarantee complete application or infrastructure security.


1. The Problem: A Container Is Not Automatically Secure

Containers provide an efficient method of packaging applications with their runtime dependencies.

They can simplify deployment, improve environmental consistency, and reduce the differences between development and execution environments.

However, security properties depend on how the container image is built and how the runtime is configured.

Consider a containerized application that:

  • Executes under the root identity.
  • Retains unnecessary Linux capabilities.
  • Has a writable root filesystem.
  • Publishes its network port on every host interface.
  • Has no effective resource restrictions.
  • Includes build tools and package managers in its runtime image.
  • Mounts sensitive host directories.
  • Lacks a documented vulnerability assessment.

Such an application is containerized, but its deployment has not necessarily been hardened.

The central engineering question behind this project was:

How can container security controls be implemented, verified through observable runtime behavior, and distributed as a reproducible open-source reference?

The project treats this as a testable engineering problem.

A configuration is not considered verified merely because its intended setting appears in a Dockerfile or Compose file.

The runtime must also be inspected, and selected controls must be exercised through positive and negative tests.


2. Project Objectives

The initial release was designed around five engineering objectives.

2.1 Reduce unnecessary runtime components

Separate the application build environment from its execution environment.

Keep compilers, build tools, and other unnecessary development components out of the final container image.

2.2 Apply least-privilege runtime controls

Execute the service with a non-root identity and limit its access to operating-system capabilities, writable filesystems, host resources, and network interfaces.

2.3 Verify actual security behavior

Use container runtime inspection and controlled tests rather than relying entirely on static configuration analysis.

2.4 Establish reproducible build evidence

Document the build environment, image identities, layer hashes, and runtime file inventories.

Demonstrate the level of reproducibility achieved within the tested execution environments.

2.5 Publish verifiable engineering artifacts

Provide complete source code, test automation, technical documentation, public CI evidence, licensing information, and cryptographically checkable release archives.

These objectives define the scope of version v0.1.0.

They do not imply a complete production security architecture or formal security certification.


3. Technology Selection

The project combines a deliberately small application with container-focused engineering tools.

Technology Responsibility
Go 1.27.4 Stateless demonstration service
Docker Container image and runtime
Multi-stage Dockerfile Build/runtime separation
scratch Minimal final runtime image
Docker Compose Local deployment definition
BuildKit Image construction and reproducibility evaluation
Trivy 0.76.2 Known-vulnerability scanning
GitHub Actions Automated build and runtime verification
Gitleaks Secret-disclosure scanning
SHA-256 Source artifact integrity verification

Why Go?

The application's purpose is to support a container hardening demonstration, not to become a complex business service.

Go offers a straightforward path to building a compact HTTP application with a small dependency footprint.

The service exposes two endpoints:

  • / — the basic HTTP application endpoint.
  • /healthz — the application health endpoint.

No database, persistent storage, authentication system, or additional application framework was required for the approved demonstration scope.

This simplicity keeps the engineering focus on image construction, deployment configuration, runtime restrictions, and verification.


4. Architecture Overview

The architecture separates application compilation from runtime deployment.

Build stage

The build environment contains the tools needed to compile the Go application.

The multi-stage Dockerfile produces the application artifact and prepares the files required for the final image.

Runtime stage

The final image uses scratch.

It contains the application binary and the documented test marker, without retaining the full build-tool environment.

Deployment layer

Docker Compose describes how the service is executed.

This layer provides configuration for networking, privileges, resource limits, filesystem behavior, and health monitoring.

Verification layer

Automated tests examine the application and the container runtime.

They cover functional endpoints, deployment configuration, runtime identity, privilege restrictions, resource limits, filesystem access, health-state transitions, image construction, and artifact integrity.

Supply-chain verification

Public GitHub Actions builds and tests the independently published source.

Trivy examines the resulting image for known vulnerabilities within its supported coverage.

Release archives are checked against the tagged source commit and their published SHA-256 checksums.

This separation makes it possible to inspect the implementation and its operational assumptions independently.


5. Multi-Stage Docker Builds

A multi-stage Docker build allows different stages to serve different purposes.

The build stage can contain the compiler, dependency tools, and other components needed to create the executable.

The final stage can then copy only the necessary runtime artifacts.

This is particularly useful for compiled applications.

Benefits of build/runtime separation

Smaller runtime image: Build dependencies do not need to be retained.

Reduced component inventory: Fewer runtime components mean fewer packages and tools that need to be reviewed.

Simpler deployment: The final image contains fewer moving parts.

Clearer responsibilities: Compilation and production execution are separate concerns.

Easier inspection: The final runtime filesystem is small enough to examine in detail.

Why use scratch?

Docker's scratch image represents an empty base filesystem.

It is suitable for applications that can run without a conventional Linux userspace in the container.

In this project, the resulting image contains only the application binary and a documented test marker.

That design eliminates unnecessary shells, compilers, and package-management tools from the runtime image.

However, scratch does not remove the application's dependency on the host kernel or the container runtime.

It also does not guarantee that the application binary contains no vulnerable code.

A minimal image is useful for reducing unnecessary components, but image minimalism and verified security are different concepts.


6. Non-Root Execution

Running applications as root inside containers can create avoidable privilege exposure.

Although the relationship between container identities and host identities depends on the configured runtime and namespace environment, unnecessary root execution should generally be avoided.

The Hardened Container Stack uses the effective runtime identity:

UID: 65532
GID: 65532

This configuration was checked against the running container.

Why actual identity verification matters

A Dockerfile can declare a user, but validation should establish which identity the application actually uses during execution.

The public runtime checks confirmed the expected effective UID and GID.

Non-root versus rootless Docker

These are not equivalent concepts.

Running a process as a non-root user inside a container does not mean the Docker daemon itself operates without root privileges.

Rootless Docker and user namespace configurations have different operational implications.

The project does not claim to implement or verify a rootless Docker daemon.

Its documented guarantee is restricted to the actual container configuration tested.


7. Linux Capabilities and Privilege Restrictions

Linux divides certain traditionally privileged operations into capabilities.

A container can potentially retain capabilities that its application does not need.

The project follows a least-privilege approach.

The reported runtime verification confirmed:

  • Zero effective capability masks.
  • no-new-privileges enabled.
  • Seccomp operating in filtering mode.
  • No privileged container mode.

Capability reduction

Removing unnecessary capabilities limits operations the container process can perform.

For a small HTTP service that does not require privileged system administration functions, retaining broad Linux capabilities would introduce unnecessary exposure.

The verification examined actual runtime state rather than only reading the Compose configuration.

no-new-privileges

The no-new-privileges control restricts certain ways in which a process could gain additional privileges during execution.

It is one defense within the runtime security model.

It does not replace capability restrictions, filesystem controls, or other host security mechanisms.

Seccomp

Seccomp allows the Linux kernel to restrict system calls under an applicable filter policy.

The project verified that filtering was active in the tested runtime environment.

This confirms the presence of the configured syscall-filtering mechanism.

It does not constitute a complete audit of every permitted syscall or every possible kernel vulnerability.

Layered restrictions

These controls are complementary.

No single option establishes a fully secure execution environment.

Their value comes from limiting unnecessary privileges and combining multiple restrictions.


8. Read-Only Root Filesystem

Writable filesystem access can be useful for legitimate application behavior.

However, unrestricted writes inside a container may also facilitate unwanted modification of runtime files.

For a stateless HTTP demonstration service, a read-only root filesystem is an appropriate design choice.

Configuration verification

The project enables a read-only root filesystem for the hardened runtime.

More importantly, it includes an actual negative test.

An attempted filesystem write was rejected in the hardened container.

Controlled comparison

The same write operation was also tested in a controlled container configuration with a writable root filesystem.

In that environment, the write succeeded.

This comparison strengthens the evidence.

It demonstrates that the test can distinguish the restrictive configuration from a deliberately less restrictive one.

What read-only does not guarantee

A read-only root filesystem does not prevent every class of vulnerability.

An application may still have access to memory, permitted system calls, network resources, or explicitly configured writable locations.

Security must therefore be evaluated across the complete runtime configuration.


9. Network Exposure

Containers often expose application ports for communication with external clients.

An unnecessarily broad host port binding can make a service reachable beyond its intended audience.

The Hardened Container Stack publishes its demonstration service only through the host's loopback interface.

Why loopback binding matters

Loopback binding limits direct access to the published port through other network interfaces under the tested host networking configuration.

For a local engineering demonstration, this is more appropriate than exposing an unauthenticated HTTP service to a public network.

Application security boundaries

The service does not implement application-level authentication or TLS.

It should not be treated as a production internet-facing API.

Loopback binding is a deployment control, not a replacement for authentication, encryption, firewall policy, or network isolation in a real production environment.

The security documentation distinguishes these responsibilities.


10. Memory, CPU, and Process Limits

Containers share underlying host resources.

Without appropriate constraints, an application can potentially consume resources that affect other workloads.

The project configures explicit resource limits.

Verified configuration

Resource Verified limit
Memory 64 MiB
CPU Approximately 0.5 CPU
Processes / PIDs 64

The public verification inspected cgroup v2 settings to confirm the configured limits.

Why inspect cgroups?

A configuration file expresses intended behavior.

The cgroup configuration shows how the Linux runtime represents the corresponding resource constraints.

This helps distinguish declared limits from runtime configuration.

Scope of the evidence

The project reports verified cgroup settings.

It does not claim to have exhaustively tested every possible out-of-memory, CPU throttling, or process-exhaustion scenario.

Resource limits are important controls, but their effectiveness also depends on correct container runtime and host configuration.


11. Health Checks and Recovery Behavior

A running container is not necessarily a healthy application.

An application process may still exist while its service is unavailable or unable to respond correctly.

The project therefore includes a functional health endpoint:

/healthz

The health-check verification exercises a controlled change in application state.

Observed lifecycle

The reported test demonstrated:

Healthy → Unhealthy → Healthy

The service initially reached a healthy state.

A controlled interruption caused health checks to report an unhealthy state.

Recovery returned the service to healthy status.

The process remained the same during the health-state transition, and the restart counter did not increase.

Why this detail matters

A Docker health check does not, by itself, guarantee that an unhealthy container will automatically restart.

Health reporting and restart policy behavior are separate mechanisms.

The project explicitly distinguished the two.

Shutdown and restart

The application also completed a normal stop with exit code 0.

After restarting, both HTTP endpoints became functional again.

These tests provide evidence for the documented operational behavior without overstating availability guarantees.


12. Security Tests as Executable Evidence

A central feature of this project is its focus on runtime verification.

Instead of treating configuration files as sufficient evidence, the test suite examines observable behavior and runtime settings.

Identity checks

Confirm the effective process UID and GID.

Privilege checks

Confirm capability restrictions, no-new-privileges, seccomp state, and absence of privileged execution.

Filesystem checks

Verify that prohibited writes fail under the hardened configuration.

Compare against a controlled writable reference environment.

Network checks

Confirm loopback-only host publishing and absence of unintended host exposure within the tested setup.

Mount checks

Verify that no Docker socket or unintended host filesystem mounts are present.

Resource checks

Inspect the configured memory, CPU, and PID constraints through cgroup v2.

Health checks

Verify healthy and unhealthy states and recovery.

Application functionality

Confirm that both HTTP endpoints work under the restrictive configuration.

Why both positive and negative tests matter

A positive test shows that an intended operation succeeds.

A negative test shows that an operation expected to be blocked is actually rejected.

For security controls, the second category is particularly important.

A configuration that appears restrictive but fails to prevent the prohibited behavior does not meet the intended security requirement.


13. Image Size: Baseline versus Hardened Runtime

One of the most visible results is the reduction in the final Docker image's reported logical size.

The comparison uses a documented reference build and the hardened multi-stage build for the same application behavior.

Measured public results

Metric Reference image Hardened image
Logical image size 1,060,885,774 bytes 7,209,084 bytes
Image layers 13 2
Approximate size 1.06 GB 7.21 MB
Image size reduction: 99.32%

What produced the reduction?

The hardened build separates compilation tooling from the final runtime.

The final image is based on scratch and contains only the necessary runtime artifacts.

The conventional reference image retains substantially more content.

The measured result illustrates the practical effect of avoiding unnecessary build and operating-system components in the final application image.

Important distinction

The comparison describes the reported Docker image-size metric.

It is not a universal network-download measurement, a compressed archive benchmark, or a direct measurement of security risk.

A 99.32% reduction in size does not prove a 99.32% reduction in vulnerabilities.

The relevant conclusion is that the hardened image contains substantially less runtime material under the documented comparison.

Private and public measurement correspondence

The earlier private baseline measured 1,060,882,600 bytes.

The final public baseline measured 1,060,885,774 bytes, a difference of 3,174 bytes.

The hardened image remained 7,209,084 bytes in both reports.

This difference was preserved rather than silently replacing the public measurement with the older value.


14. Reproducible Builds

Reproducible build evidence allows engineers to evaluate how reliably the same source and build configuration produce matching artifacts.

The project performs independent image builds and compares their outputs.

Reported verification

Two builds were performed within each public CI execution.

The comparison included:

  • Image identifiers.
  • Layer digests.
  • Runtime file inventories.

The reported results matched.

The main and v0.1.0 tag CI executions also produced matching image identities, layer digests, and file inventories.

Recorded environment

Component Verified environment
CI operating system Ubuntu 24.04
Platform Linux/amd64
Docker Engine 28.0.4
Docker Compose 2.38.2
BuildKit 0.20.2
Go 1.27.4

The publication report identified a change in the Go module path between the private and public distributions.

It also confirmed that the application files remained identical to the accepted candidate.

What reproducibility establishes

Matching image identifiers and layer digests are stronger evidence than simply observing that an application builds successfully twice.

They show consistency in the recorded artifacts under the tested conditions.

What reproducibility does not establish

These results do not prove universal bit-for-bit reproducibility across every processor architecture, Docker version, host operating system, or future dependency revision.

The documented reproducibility claim is deliberately limited to the observed builds and environments.


15. Vulnerability Scanning with Trivy

Container hardening and vulnerability scanning address related but different concerns.

Runtime controls restrict what a process can do.

Vulnerability scanning attempts to identify known security issues in supported packages, libraries, and artifacts.

The project uses Trivy for this purpose.

Recorded public scan

Scanner: Trivy 0.76.2

Vulnerability database timestamp: November 26, 2026, at 13:14:47 UTC

Reported vulnerability findings: 0

Both public CI runs completed the scan successfully.

The scanner identified the Go standard library within its supported analysis.

How to interpret zero findings

A scanner returning zero findings means no matching vulnerabilities were identified within its configured coverage and database at the recorded time.

It does not prove that the application is free of vulnerabilities.

Potential limitations include:

  • Unknown vulnerabilities.
  • Vulnerabilities not represented in the advisory database.
  • Components outside scanner coverage.
  • Incorrect or incomplete component identification.
  • Configuration weaknesses unrelated to known package CVEs.
  • Runtime or host vulnerabilities outside the application image.

The role of a minimal image

A scratch image reduces the number of packaged operating-system components.

This can simplify vulnerability management.

However, the application binary and its compiled dependencies remain relevant to security analysis.

Minimal images still require maintenance and appropriate scanning.


16. Continuous Integration and Cross-Platform Verification

The project uses GitHub Actions to verify the published source.

Two independent public workflow executions succeeded:

  • Main-branch CI.
  • Release-tag CI.

Public CI results

Verification Result
Go tests on public Ubuntu CI 32 passed per run
Main workflow Passed
Release-tag workflow Passed
Container security verification Passed
Source archive validation Passed
Vulnerability scan Completed with zero reported findings
Secret-disclosure scan Zero reported findings

Windows verification

The private development environment used Windows on amd64.

Native Go compilation, module checks, go vet, and 27 applicable Go tests were reported successful.

Docker runtime execution was not available on that Windows workstation.

Linux verification

The complete container runtime verification was performed using Ubuntu 24.04 on Linux/amd64.

This distinction is important.

Successful native Go tests on Windows do not establish that the Docker runtime security configuration has been verified on Windows.

The published technical evidence therefore limits its container runtime claims to the tested Linux platform.


17. Source Integrity and Public Release Engineering

An engineering release should allow consumers to identify the exact source revision and verify the downloaded artifacts.

The public repository has a separate release history from the private development repository.

The official version is:

v0.1.0

Public release identity

Source commit:

cc8b35043682bc582404eb5fa527fe6ef6b56d6d

Repository:

https://github.com/soroushneyestani/hardened-container-stack-reference

Release:

https://github.com/soroushneyestani/hardened-container-stack-reference/releases/tag/v0.1.0

Source archive

The published source ZIP contains 42 files.

Download:

https://github.com/soroushneyestani/hardened-container-stack-reference/releases/download/v0.1.0/hardened-container-stack-v0.1.0-source.zip

SHA-256:

cfde0644810d96785f6cf70ef3de6e6a89ec03ef656800f62c0515145d6da259

Checksum file:

https://github.com/soroushneyestani/hardened-container-stack-reference/releases/download/v0.1.0/SHA256SUMS.txt

Artifact verification

The publication process verified anonymous downloads of all six release attachments.

The source ZIP contents matched the 42 files in the tagged release commit.

The published checksum was verified against the downloaded artifact.

This provides a traceable relationship between the distributed source, the release tag, and the public verification evidence.


18. GitHub Repository Protection

The public repository uses GitHub repository rules to protect its primary development and release references.

Main-branch controls

The reported rules require:

  • Pull requests for protected changes.
  • Successful execution of the relevant CI check.
  • Resolution of review conversations.

Force pushes and deletion of the protected main branch are restricted.

Release-tag protection

The official v0.1.0 tag is protected against ordinary modification and deletion under the configured rules.

Why this matters

An immutable release identity helps reviewers connect a specific source revision with its associated CI results and checksums.

Repository protection also reduces accidental changes to published history.

These controls support traceability and release governance.

They are not substitutes for source review, credential security, or the security of the GitHub account and CI environment.


19. Licensing and Disclosure Controls

Hardened Container Stack is published under the MIT License.

The release also contains the relevant third-party notices and Go license information.

The final publication process included checks for accidental disclosure of sensitive material.

The independent public history and CI verification were scanned with Gitleaks.

The reported results contained zero findings.

This is evidence that the configured scan did not identify matching secrets in the examined content.

It should not be interpreted as a guarantee that every possible confidential-data exposure has been eliminated.

The project does not require production credentials, customer data, or employer-specific infrastructure.

Its demonstration workload uses synthetic, non-sensitive behavior.


20. Threat Model and Security Boundaries

The project's runtime restrictions address several common container security concerns.

However, a realistic threat model must also describe what remains outside the scope of the system.

Risks addressed by the design

Unnecessary root execution: Reduced through an explicit non-root runtime identity.

Excessive Linux privileges: Reduced through capability restrictions and no-new-privileges.

Unrestricted filesystem modification: Reduced through a read-only root filesystem.

Unnecessary syscall access: Restricted through the active seccomp configuration.

Excessive resource consumption: Constrained through configured memory, CPU, and PID limits.

Unnecessary external exposure: Reduced through loopback-only host port publishing.

Unnecessary runtime packages: Reduced through multi-stage construction and a minimal scratch image.

Unobserved application failure: Addressed through functional health checks.

Known component vulnerabilities: Assessed through Trivy within its documented scope.

Residual trust assumptions

The deployment still depends on:

  • The security of the host Linux kernel.
  • The configuration and security of the Docker daemon.
  • The correctness of the application binary.
  • The permitted system calls and kernel interfaces.
  • The integrity of the build environment.
  • The integrity of dependencies and base images.
  • The security of CI and publication credentials.
  • Correct deployment practices by consumers.

The project does not claim to eliminate these risks.

Not included in the demonstration

The service does not provide:

  • Application authentication.
  • TLS termination.
  • Persistent storage.
  • Full production observability.
  • A dedicated secrets-management platform.
  • Multi-host orchestration.
  • A complete container intrusion-detection system.
  • A formal security certification.

These exclusions are intentional and consistent with the educational and engineering scope.


21. Practical Engineering Lessons

The project illustrates several principles that extend beyond Docker.

Configuration needs verification

A security setting is more credible when its effect can be observed.

The read-only filesystem test is a clear example: the protected configuration rejected the operation, while the controlled writable reference allowed it.

Least privilege is contextual

Reducing privileges requires understanding what the application actually needs.

A simple HTTP service needs fewer operating-system privileges than software performing host administration.

Small images have practical benefits

Removing unnecessary runtime components can reduce image size, package inventory, and maintenance complexity.

However, smaller size alone does not prove greater security.

Health and recovery are different concerns

Health checks report application state.

Restart behavior depends on the surrounding runtime configuration and the failure mode.

A documented system should distinguish the two.

Resource restrictions must be inspected

Declaring a resource limit and observing its corresponding cgroup configuration are different levels of evidence.

Reproducibility needs precise boundaries

A pair of matching builds provides useful evidence.

It does not automatically establish universal reproducibility across all environments.

Vulnerability scanning is time-dependent

A zero-finding scan has meaning only in relation to its scanner configuration, component coverage, and vulnerability database.

Release artifacts should be verifiable

A published source archive is more useful when consumers can trace it to a versioned source commit and verify its checksum.

Documentation is part of the deliverable

Architecture decisions, threat models, test results, security limitations, and reproducibility records make an engineering project assessable by others.


22. Who Can Use This Project?

Hardened Container Stack is useful as a technical reference for several audiences.

Software developers

Developers can study how to package a small compiled application in a minimal Docker runtime.

DevOps engineers

The project demonstrates Docker Compose configuration, runtime limits, health checks, build automation, and release verification.

Security engineers

The runtime tests provide examples of validating effective identity, privilege restrictions, filesystem behavior, and vulnerability scan results.

Platform engineers

The project can serve as a small reference when evaluating container construction and local deployment policies.

Students and technical educators

The repository provides an inspectable example that connects container security concepts with executable tests.

Production consumers

Organizations considering similar controls should adapt them to their own workloads and threat models.

The project is not intended to be deployed unchanged as a production internet-facing service.


23. Potential Future Development

Version v0.1.0 is complete within its approved scope.

Several extensions could be explored independently.

Additional architecture support

Testing on additional architectures, such as ARM64, could establish broader platform compatibility.

Rootless runtime comparison

A separate experiment could compare the existing non-root container configuration with a genuinely rootless Docker daemon.

More detailed seccomp verification

Tests could inspect or compare specific syscall restrictions under controlled conditions.

Software Bill of Materials

Generating an SBOM could improve transparency around compiled dependencies and release contents.

Signed image provenance

Cryptographic signing and attestation could strengthen verification of published images or build provenance.

Additional runtime monitoring

Metrics, structured event reporting, or operational alerting could provide richer visibility into container behavior.

Extended security testing

Further negative tests could explore additional filesystem, namespace, and syscall boundaries.

Production-oriented deployment examples

Optional reference configurations could demonstrate TLS termination, authentication, secrets management, and centralized observability.

These are future engineering directions, not features claimed in the current release.


24. How to Review the Project

An independent reviewer can evaluate the project through a structured sequence.

Review the application. Verify that the service is small, stateless, and behaves as documented.

Inspect the Dockerfile. Check build/runtime separation and the final filesystem inventory.

Inspect the Compose configuration. Review identity, permissions, filesystem, network, health, and resource settings.

Examine the threat model. Identify which risks are addressed and which remain outside the scope.

Run the application tests. Confirm the documented behavior of / and /healthz.

Run the container checks in a supported environment. Evaluate actual privilege restrictions, resource configuration, and filesystem behavior.

Review the image-size methodology. Determine whether the baseline and hardened images provide comparable application behavior.

Review reproducibility evidence. Compare the recorded image identifiers and layer digests.

Examine Trivy results. Check scanner version, vulnerability database metadata, target identity, and coverage.

Review the public CI. Confirm the tested release revision and the reported verification outcomes.

Verify the release archive. Compare the downloaded ZIP's SHA-256 checksum against the official published checksum.

This review path emphasizes directly inspectable evidence instead of relying on security-related claims alone.


Conclusion

Hardened Container Stack v0.1.0 demonstrates how container security principles can be converted into an original, reproducible, and independently reviewable engineering implementation.

It combines a small Go service, a multi-stage Docker build, a minimal scratch runtime image, and Docker Compose deployment controls.

Runtime verification confirms a non-root process identity, restricted Linux capabilities, no-new-privileges, seccomp filtering, a read-only root filesystem, and explicit resource constraints within the tested Linux/amd64 environment.

The project also demonstrates functional health-state transitions, controlled recovery, repeatable image construction, vulnerability scanning, and verifiable public release artifacts.

Its measured image-size reduction of 99.32% illustrates the practical impact of removing unnecessary runtime components.

However, the project deliberately separates this size reduction from claims about security improvement.

Likewise, zero reported vulnerability findings are documented with their scanner and database context rather than interpreted as proof of comprehensive security.

The most important result is the engineering methodology:

Container hardening should be treated as a collection of explicitly defined, testable controls supported by reproducible evidence—not simply as a list of recommended Dockerfile settings.

Hardened Container Stack provides a concrete open-source example of that approach.


Technical Resources

GitHub Repository
https://github.com/soroushneyestani/hardened-container-stack-reference

Official Release v0.1.0
https://github.com/soroushneyestani/hardened-container-stack-reference/releases/tag/v0.1.0

Public Main CI
https://github.com/soroushneyestani/hardened-container-stack-reference/actions/runs/45867161377

Public Release-Tag CI
https://github.com/soroushneyestani/hardened-container-stack-reference/actions/runs/45867806780

Official Source Archive
https://github.com/soroushneyestani/hardened-container-stack-reference/releases/download/v0.1.0/hardened-container-stack-v0.1.0-source.zip

SHA-256 Checksums
https://github.com/soroushneyestani/hardened-container-stack-reference/releases/download/v0.1.0/SHA256SUMS.txt

Release Notes
https://github.com/soroushneyestani/hardened-container-stack-reference/releases/download/v0.1.0/RELEASE_NOTES.md


Developed by Soroush Neyestani
Hardened Container Stack — v0.1.0
November 2026 | Go | Docker | DevSecOps | MIT License

Keywords: Docker, Container Security, Docker Compose, Dockerfile, Multi-Stage Build, Scratch Image, Go, Golang, DevSecOps, Non-Root Container, Linux Capabilities, Seccomp, Read-Only Filesystem, No-New-Privileges, Cgroups, Container Health Checks, Image Reproducibility, Trivy, Vulnerability Scanning, GitHub Actions, Supply Chain Security, Open Source.