Steps
- Use a dedicated course directory containing only the reviewed Containerfile and approved build inputs, with no secrets.
- Build a clearly named local image without a broad context or unreviewed
COPY. - Run the one-shot result with synthetic input, then remove the test image.
Verify and recover
The build log and test output are retained, and cleanup names the exact image. Stop on unexpected files or commands and delete only the test artifact.