container_create
Creates a WSL container with custom image, resource limits, port mappings, volumes, and environment variables. Returns the container ID for subsequent commands.
Instructions
Create a new WSL container. Returns the container ID on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rm | No | Remove container after it stops | |
| env | No | Environment variables (key=value pairs) | |
| tty | No | Allocate a pseudo-TTY | |
| cpus | No | CPU count (e.g. 0.5, 1, 2.5) | |
| name | No | Container name | |
| image | Yes | Container image name (e.g., ubuntu:24.04) | |
| memory | No | Memory limit (e.g. 512M, 1G) | |
| volume | No | Volume bind mounts (e.g. ['/host:/container']) | |
| command | No | Command to run in the container | |
| publish | No | Port mappings (e.g. ['8080:80', '443:443']) | |
| workdir | No | Working directory inside the container | |
| commandArgs | No | Arguments for the command | |
| interactive | No | Keep stdin open |