Skip to main content
Prepare a container environment for a task, checking for existing images first.

Description

The prepare-environment prompt implements the recommended CHECK-PREPARE-EXECUTE workflow:
  1. CHECK - Search for existing prepared environments
  2. PREPARE - Import and configure if not found
  3. EXECUTE - Run the task with the prepared environment
This ensures maximum reuse of prepared images and follows Contree best practices.

Parameters

Generated Instructions

When invoked with:
Returns instructions like:
If a suitable environment exists (has required packages), skip to Step 3. Step 2: PREPARE Environment (if not found) 2a. Import base image:
2b. Install dependencies with disposable=false:
2c. Tag for reuse:
Step 3: EXECUTE Task Use the prepared environment:
{scope}/{purpose}/{base}:{tag}

Project-Specific Environment

Generates tag: myproject/pytest-env/python:3.11-slim

Custom Base Image

See Also