isol8 0.10.3 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -78,6 +78,7 @@ isol8 setup --node lodash,axios
78
78
  | `--bun <pkgs>` | Comma-separated bun packages |
79
79
  | `--deno <pkgs>` | Comma-separated Deno module URLs to cache |
80
80
  | `--bash <pkgs>` | Comma-separated Alpine apk packages |
81
+ | `--force` | Force rebuild even if images are up to date |
81
82
 
82
83
  ### `isol8 run`
83
84
 
@@ -124,12 +125,27 @@ isol8 run script.py --host http://server:3000 --key my-api-key
124
125
  | `--tmp-size <size>` | Tmp tmpfs size (e.g. `256m`, `512m`) | `256m` |
125
126
  | `--stdin <data>` | Data to pipe to stdin | — |
126
127
  | `--install <pkg>` | Install package for runtime (repeatable) | — |
128
+ | `--url <url>` | Fetch code from URL (requires `remoteCode.enabled=true`) | — |
129
+ | `--github <owner/repo/ref/path>` | GitHub shorthand for raw source | — |
130
+ | `--gist <gistId/file.ext>` | Gist shorthand for raw source | — |
131
+ | `--hash <sha256>` | Verify SHA-256 hash for fetched code | — |
132
+ | `--allow-insecure-code-url` | Allow insecure `http://` code URLs for this request | `false` |
127
133
  | `--host <url>` | Remote server URL | — |
128
134
  | `--key <key>` | API key for remote server | `$ISOL8_API_KEY` |
129
135
 
136
+ ### Remote Code URLs
137
+
138
+ ```bash
139
+ # URL source
140
+ isol8 run --url https://raw.githubusercontent.com/user/repo/main/script.py --runtime python
141
+
142
+ # GitHub shorthand with hash verification
143
+ isol8 run --github user/repo/main/script.py --hash <sha256> --runtime python
144
+ ```
145
+
130
146
  ### `isol8 cleanup`
131
147
 
132
- Remove orphaned isol8 containers.
148
+ Remove orphaned isol8 containers, and optionally isol8 images.
133
149
 
134
150
  ```bash
135
151
  # Interactive (prompts for confirmation)
@@ -137,6 +153,9 @@ isol8 cleanup
137
153
 
138
154
  # Force (skip confirmation)
139
155
  isol8 cleanup --force
156
+
157
+ # Also remove isol8 images
158
+ isol8 cleanup --images --force
140
159
  ```
141
160
 
142
161
  ### `isol8 serve`
@@ -186,6 +205,10 @@ console.log(result.exitCode); // 0
186
205
  console.log(result.durationMs); // ~120-140ms (warm pool)
187
206
 
188
207
  await isol8.stop();
208
+
209
+ // Optional manual cleanup helpers
210
+ await DockerIsol8.cleanup(); // remove isol8 containers
211
+ await DockerIsol8.cleanupImages(); // remove isol8 images
189
212
  ```
190
213
 
191
214
  ### Pool Strategy
@@ -215,6 +238,8 @@ const secureEngine = new DockerIsol8({
215
238
  **Fast mode details:**
216
239
  - Maintains two pools: `clean` (ready to use) and `dirty` (need cleanup)
217
240
  - `acquire()` returns instantly from clean pool if available
241
+ - Every clean-pool acquire triggers async replenishment to restore warm capacity
242
+ - Simple no-artifact executions use inline runtime commands, skipping code-file injection overhead
218
243
  - If clean pool is empty but dirty has containers, tries immediate cleanup
219
244
  - Background cleanup runs every 5 seconds to process dirty containers
220
245
  - Best performance with minimal memory overhead