@north-light/env-docker 0.3.423 → 0.3.425
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ await env.stop();
|
|
|
39
39
|
|
|
40
40
|
`start()` creates a container from `ghcr.io/northlight-systems/crtrd:latest` unless you pass `image`, generates a bearer token, grants the privileges the image's sandbox launcher needs (`SYS_ADMIN` and `NET_ADMIN`, unconfined seccomp and AppArmor), binds the mapped port to `127.0.0.1`, and waits for `/healthz`. `connection()` returns `{ baseURL, headers }`, the shape `new Crouter(...)` takes. `stop()` removes the container.
|
|
41
41
|
|
|
42
|
-
Options: `env` sets container environment variables, `port` selects a host port, `volume` mounts a named Docker volume at the
|
|
42
|
+
Options: `env` sets container environment variables, `port` selects a host port, `volume` mounts a named Docker volume at `/volume`, the image's declared volume. A named volume keeps canvas state, memory and installed credentials when the container is recreated.
|
|
43
43
|
|
|
44
44
|
## Attach to an existing container
|
|
45
45
|
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export async function start(opts = {}) {
|
|
|
38
38
|
args.push('-e', `${key}=${value}`);
|
|
39
39
|
}
|
|
40
40
|
if (opts.volume) {
|
|
41
|
-
args.push('-v', `${opts.volume}:/
|
|
41
|
+
args.push('-v', `${opts.volume}:/volume`);
|
|
42
42
|
}
|
|
43
43
|
// Bind loopback explicitly: docker's default publishes to 0.0.0.0, which
|
|
44
44
|
// would put a daemon holding the caller's provider keys on the LAN behind
|
package/dist/types.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface StartOptions {
|
|
|
21
21
|
env?: Record<string, string>;
|
|
22
22
|
/** Container name. A named container is later addressable via `attach()`. Default: a generated random name. */
|
|
23
23
|
name?: string;
|
|
24
|
-
/** Named volume mounted at `
|
|
24
|
+
/** Named volume mounted at `/volume`, the image's declared `VOLUME`; it holds the runtime, user and app folders, credentials included. Default: none — an ephemeral, unnamed volume. */
|
|
25
25
|
volume?: string;
|
|
26
26
|
/** Host port to bind, always on `127.0.0.1`. Default: a random free port docker assigns. */
|
|
27
27
|
port?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/env-docker",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.425",
|
|
4
4
|
"description": "Docker connection manager for the crouter SDK — start, attach to, and stop a crtrd container over the docker CLI. Zero crouter imports.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|