Skip to main content

docker-wts-build

Docker builds via Windows Task Scheduler — an MCP server for Cline.

Problem

VS Code terminal has a ~10 minute timeout. Docker builds (especially with torch, cudnn, etc.) can take 30+ minutes. If Cline interrupts the task, the build is lost.

Solution

This MCP server schedules Docker builds as Windows Task Scheduler tasks. The build runs outside VS Code, survives interruptions, and logs progress to files for later inspection.

Installation

pip install docker-wts-build

Configuration

Set these environment variables (in cline_mcp_settings.json):

Variable Required Default Description
DWTB_PROJECT_DIR Yes — Path to project with docker-compose.yml
DWTB_COMPOSE_FILE No docker-compose.yml Compose file name
DWTB_CUSTOM_SERVICES No — Semicolon-separated service list
DWTB_LOGS_DIR No {project_dir}/builds/logs Logs directory
DWTB_TASK_PREFIX No DockerBuild Task name prefix
DWTB_TASK_TIMEOUT_MS No 28800000 (8h) Task timeout
DWTB_MAX_TASK_AGE_DAYS No 30 Default cleanup age

Usage

As MCP server (for Cline)

Add to cline_mcp_settings.json:

{
  "mcpServers": {
    "docker-wts-build": {
      "autoApprove": ["schedule_build", "check_build", "cleanup_builds"],
      "disabled": false,
      "timeout": 120,
      "command": "python",
      "args": ["-m", "docker_wts_build"],
      "env": {
        "DWTB_PROJECT_DIR": "C:\\path\\to\\my-project",
        "DWTB_CUSTOM_SERVICES": "service-1;service-2;service-3"
      },
      "type": "stdio"
    }
  }
}

CLI mode (for testing)

# Schedule a build of all services
python -m docker_wts_build --schedule build_all

# Schedule a single service build
python -m docker_wts_build --schedule build --service my-service

# Rebuild a single service (rm + build + up)
python -m docker_wts_build --schedule rebuild --service my-service

# Check all builds
python -m docker_wts_build --check

# Check a specific build
python -m docker_wts_build --check DockerBuild_20260427_195000

# Clean up old builds (default: 30 days)
python -m docker_wts_build --cleanup

# Clean up builds older than 14 days
python -m docker_wts_build --cleanup 14

# Show version
python -m docker_wts_build --version

How it works

  1. schedule_build creates a .cmd wrapper file with environment variables, registers it as a Windows Task Scheduler task, and runs it immediately.
  2. The task runs builder.py outside VS Code, executing docker compose commands and logging output to files.
  3. check_build queries Task Scheduler status and reads log files.
  4. cleanup_builds removes old tasks and log files.

Requirements

  • Windows (uses schtasks.exe)
  • Docker Desktop
  • Python 3.10+
  • mcp package (installed automatically)

License

MIT

Metadata

Release files for docker-wts-build 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docker-wts-build 0.1.2
File Size Uploaded Provenance
docker_wts_build-0.1.2.tar.gz 13.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for docker-wts-build 0.1.2
File Interpreter ABI Platform
docker_wts_build-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.3 kB

Release files / docker_wts_build-0.1.2.tar.gz

Download URL docker_wts_build-0.1.2.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
348e893271489325090180dedf691a226e653ab92685cb481507f7440979f680
BLAKE2b-256 checksum
How to use checksums
38d4c4ede1190a107031a2109a07f68154282238e2e34cbe886a03c84aa53b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / docker_wts_build-0.1.2-py3-none-any.whl

Download URL docker_wts_build-0.1.2-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
070bde67a4a5c7b8f04070c204192ecba5a4886084545e0f8c3f0c97c8ece34f
BLAKE2b-256 checksum
How to use checksums
a768d99f1f5e5c02ea0d1527ac5513705ce4a33f9467ddb853587ca58b39f1cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for docker-wts-build 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page