A one-shot Python job container for OSC. On each invocation it clones a Git repository, installs dependencies, and executes a script — then exits. Scheduling is handled externally by the OSC platform (cron trigger), not inside the container.
| Variable | Required | Description |
|---|---|---|
SOURCE_URL |
Yes | HTTPS URL of the Git repository to clone (supports #branch and /tree/branch fragments) |
WORKER_CMD |
No | Shell command to run instead of the default entry point |
SUB_PATH |
No | Subdirectory within the cloned repo to use as the working directory |
GIT_TOKEN / GITHUB_TOKEN |
No | Personal access token for private repositories |
CONFIG_SVC |
No | OSC config service name — exports its key/value pairs as env vars before the job runs |
OSC_ACCESS_TOKEN |
No | OSC PAT required when CONFIG_SVC is set |
OSC_ENV |
No | OSC environment (prod/dev); auto-detected from OSC_MCP_URL if unset |
The runner looks for an entry point in this order:
WORKER_CMD— if set, executes it as a shell commandjob.py— executed withpython job.pymain.py— executed withpython main.py
If none are found the container exits with an error.
Detected automatically in this order: pyproject.toml → requirements.txt → setup.py.
A setup.sh in the repo root is executed after pip install if present.
docker build -t python-job-runner .
docker run --rm \
-e SOURCE_URL=https://github.com/your-org/your-job-repo \
-e WORKER_CMD="python myjob.py --date 2026-01-01" \
python-job-runnerMIT