---
estimated_steps: 8
estimated_files: 2
skills_used: []
---

# T02: Engine Dockerfile + healthcheck

1. Create docker/Dockerfile.engine (multi-stage build)
2. Install system deps: libopencv, potrace libs
3. Install Python deps from pyproject.toml
4. Add healthcheck endpoint: GET /engine/health → {status: 'ok'}
5. Configure Dockerfile HEALTHCHECK instruction
6. Build and test container starts
7. Verify API responds from inside container
8. Ensure no App dependencies in engine image

## Inputs

- `engine/pyproject.toml`

## Expected Output

- `docker/Dockerfile.engine`

## Verification

cd /vmPool/r/repos/xpltdco/kerf && docker build -f docker/Dockerfile.engine -t kerf-engine:dev . && docker run --rm -d --name kerf-engine-test -p 8100:8000 kerf-engine:dev && sleep 5 && curl -s http://localhost:8100/engine/health && docker stop kerf-engine-test
