dockerBin (src/docker.ts)

agentglass · server/src/docker.ts · typescript · MIT
infra

CLI wrapper for Docker, providing async commands and safety checks for container management.

// Source: https://github.com/SirAllap/agentglass | License: MIT | Copyright 2026 David Pallares (SirAllap)
// Provided via justclaw.it.com; keep this notice with the code.
// Live docker adapter — the backend for agentglass's lazydocker-style panel.
// Shells out to the `docker` CLI with arg arrays (never a shell string), reads
// JSON-lines output, and gates every mutating op behind
// AGENTGLASS_DOCKER_WRITE_DISABLED=1. Container ids/names are validated before
// they reach the CLI.

import { basename } from "node:path";
import { projectKey, inProject, type ProjectKey } from "../../shared/projectKey.ts";
import type {
  DockerContainer, DockerStat, DockerImage, DockerVolume, DockerNetwork,
  DockerOverview, DockerScope, DockerActionResult, DockerCapability,
  DockerDisk, DockerVolumeDet

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key