IF Commons GitHub

targets/container/mod

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0005-reach-and-targets FR-011

The container target (commons headless 0005-reach-and-targets FR-011): an Executor that runs a program in a running container through the container runtime (docker or podman): exec is the runtime's exec, put and get are its cp, and spawn is exec -i with piped streams. Each call is an argument vector with no shell between, and a name that could be taken for an option is refused as a call that could not be made (255), as the ssh target does.

import { containerExecutor } from "@intellectual-frontiers/headless/targets/container";
// const out = await containerExecutor("docker", "athens").exec(["systemctl", "is-system-running"]);

Source: commons/headless/src/targets/container/mod.ts

1 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Runtimetypeno test imports it
type Runtime = "docker" | "podman";

The container runtimes whose command line this adapter speaks.

containerExecutorfunction
function containerExecutor(runtime: Runtime, container: string, deps?: { readonly run?: ((argv: readonly string[], opts?: RunOptions | undefined) => Promise<Output>) | undefined; }): Executor

The executor for one running container.

Imported by 1 test of the run (1 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.