jailoc

module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT

README

jailoc

jailoc

Manage sandboxed Docker Compose environments for headless OpenCode coding agents.

📖 Full documentation

What is this?

jailoc wraps OpenCode agents in isolated Docker containers so they can run autonomously without touching your host system. Each workspace gets its own sandboxed environment with network isolation that blocks private networks by default, letting you control exactly which internal services the agent can reach. You configure which directories to mount as workspaces, which hosts to allowlist, and the agent runs inside with your OpenCode config available read-only.

Development

# Build the binary
go build ./cmd/jailoc

# Run unit tests
go test ./...

# Run integration tests (requires Docker)
go test -tags=integration ./...

What's in the default container

The default base image (Ubuntu 24.04) ships with:

Category Tools
Runtimes Go, Node.js, Bun, Python 3 + uv
Package managers npm, Yarn (via corepack), Homebrew
Language servers gopls, typescript-language-server, pyright, yaml-language-server, bash-language-server, jsonnet-language-server, helm-ls
CLI tools Docker CLI, ripgrep, fd, fzf, jq, vim, git, openssh-client
Agent stack OpenCode, oh-my-openagent

Exact versions are pinned in the embedded Dockerfile and tracked by Renovate.

Directories

Path Synopsis
cmd
jailoc command
internal
cmd
compose
Package compose handles docker-compose generation and management.
Package compose handles docker-compose generation and management.
config
Package config provides TOML config parsing, validation, and mutation for jailoc.
Package config provides TOML config parsing, validation, and mutation for jailoc.
docker
Package docker provides Docker client wrappers and container orchestration.
Package docker provides Docker client wrappers and container orchestration.
embed
Package embed provides embedded assets (configs, templates, scripts).
Package embed provides embedded assets (configs, templates, scripts).
workspace
Package workspace provides workspace directory setup and management.
Package workspace provides workspace directory setup and management.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL