Skip to content

Repository files navigation

Docker Ready proof

CI

A small, dependency-free Python HTTP service showing a broken-to-corrected Docker handoff. The broken starting point is documented in docs/BASELINE.md; the checked-in root files are the corrected setup.

Clone to first success

Prerequisites: Git, Docker Engine, Docker Compose v2 (docker compose), and curl.

git clone https://github.com/canilbey/docker-ready-proof.git
cd docker-ready-proof
cp .env.example .env
docker compose build
docker compose up --detach --wait
./tests/smoke.sh

Expected final line:

smoke: PASS

Open http://127.0.0.1:8080/ or inspect health with:

curl --fail http://127.0.0.1:8080/health

Stop and remove the stack:

docker compose down --volumes --remove-orphans

One-command acceptance test

./scripts/compose-smoke.sh

This builds, starts, waits for health, runs endpoint smoke assertions, restarts the app, verifies health again, and always tears down.

Local unit tests (Docker not required)

python3 -m unittest discover -s tests -v
python3 -m compileall -q app tests

Configuration

Copy .env.example to .env. Available values:

  • APP_PORT: host port mapped to container port 8080; default 8080.
  • APP_MESSAGE: non-secret response message; default docker-ready.

Do not put secrets in .env.example or commit .env. This fixture requires no secrets.

Production-style properties demonstrated

  • Builder and runtime stages with a narrow final image.
  • Non-root runtime user with stable numeric UID/GID.
  • Health checks in both image metadata and Compose.
  • Read-only root filesystem, all Linux capabilities dropped, and no-new-privileges.
  • Explicit environment contract and small Docker build context.
  • Automated endpoint and restart smoke checks.

“Production-style” does not mean this fixture alone guarantees production suitability. Real workloads still require stack-specific capacity, persistence, backup, observability, deployment, and security decisions.

Artifact map

  • docs/BASELINE.md: deliberately broken starting-state description.
  • Dockerfile, compose.yaml: corrected container setup.
  • .dockerignore, .env.example: context and configuration hygiene.
  • tests/test_server.py: application unit/integration tests.
  • tests/smoke.sh: endpoint smoke assertions.
  • scripts/compose-smoke.sh: Compose build/up/health/restart automation.
  • OFFER.md: fixed 125 USDC service scope and exclusions.
  • BUILD_EVIDENCE.md: exact local verification record for this artifact.
  • LICENSE: MIT terms for reuse of this proof fixture.

Need this applied to a repository?

The fixed-scope Docker Ready Sprint covers one repository for 125 USDC, payable only after the agreed acceptance checks pass. Submit a service request with a public repository and failing command; no credentials or payment are needed for initial scope review.

License

MIT. See LICENSE.

About

Tested Docker/Compose handoff proof and fixed-scope Docker Ready Sprint

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages