Skip to content

docs: show how to run sessions in an image on another base - #610

Merged
kalaspuff merged 3 commits into
mainfrom
fctl/1526-it-should-be-documented-in-our-docs-and
Nov 20, 2026
Merged

kalaspuff merged 3 commits into
mainfrom
fctl/1526-it-should-be-documented-in-our-docs-and

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Sandbox images now has a section, An image from another base, for people who want their sessions in an image of their own that doesn't start from ghcr.io/hyperstructure/sandbox, such as an Ubuntu image with their company's toolchains. It gives a Dockerfile that makes Ubuntu 24.04 into such an image: fctl from its installer, Claude Code as the user, git, gh, bash, sudo and /var/cache/fctl. It explains that fctl-agent needs no installing, since the host copies its own (of the host's version) into each sandbox when a session starts. The rest is what people trip on: Claude gets only the image's PATH, locale, TZ and TMPDIR, so other variables go in the project's environment. Debian's and Alpine's login shells reset the PATH for setup scripts. The image's ENTRYPOINT and CMD don't run. Docker's cache keeps an old fctl and Claude Code until the image is rebuilt. Another distribution, Alpine, takes the same steps.

What an image needs now lists everything the host and fctl-agent actually use (the system commands the host runs by path, bash for setup scripts, CA certificates, a /etc/passwd line for the user), and the dev container paragraph and llms.txt point to the new section. The Dockerfile is the one hyperstructure/sandbox keeps and checks for both architectures in its Examples workflow. I built it with buildah on arm64 (no Docker in the session) and ran that repository's new examples/check.sh in it and in an Alpine variant. I also started fctl-agent in the built image as the host does, and cargo test -p xtask docs passes.

Worth confirming

  • Decision: The .NET example now says that DOTNET_ROOT and DOTNET_CLI_TELEMETRY_OPTOUT also go in the project's variables for Claude's commands. fctl-agent passes Claude only an allowlist of the image's variables (crates/fctl-agent/src/claude.rs), so its ENV lines never reached Claude.

  • Assumption: Recommending the latest fctl in the image (or a pinned FCTL_VERSION) is fine even when hosts run an older version. I didn't check how an older fctl-agent answers a newer fctl's calls.

  • Assumption: No session ran end to end in the example image: the session had no Docker. The checks cover each thing the host and fctl-agent do in a sandbox, separately.

  • docs: show how to run fctl sessions in an image on another base sandbox#16

fctl session


Note

Low risk. Documentation only: no code changes, though it points at example files in the sandbox repository that must exist on its main branch.

What it does. Adds a guide to docs/sandbox-images.md for building a session image on another base such as Ubuntu or Alpine, with what fctl needs in it, a check script to run against the image, and how to keep it current. The README and llms.txt index entries are updated to match.

Depends on sandbox#16. The links to examples/ubuntu/Dockerfile and examples/check.sh, and the curl of check.sh, work only once hyperstructure/sandbox#16 is merged.

fctl review's first look at dcd8e39 · 3 files, +166 −20 · Review agent settings

Sandbox images gets a section, An image from another base, with a
Dockerfile that makes Ubuntu 24.04 into an image sessions run in: fctl
from its installer, Claude Code as the user, git, gh and bash. It says
that fctl-agent needs no installing, since the host copies its own in,
which of the image's variables reach Claude, that the image's entrypoint
doesn't run, and how to keep the image current. What an image needs now
lists everything the host and fctl-agent use.
…e-documented-in-our-docs-and

# Conflicts:
#	docs/README.md
@fctl-review

This comment has been minimized.

Comment thread docs/sandbox-images.md Resolved
Comment thread docs/sandbox-images.md Resolved
Comment thread docs/sandbox-images.md Resolved
The check command passes --entrypoint sh, since docker run would
otherwise hand sh -s to the image's ENTRYPOINT, which sessions never
run. The host also runs cat in sandboxes (Firecracker's fctl-agent
install, and containers where it doesn't run as root). And the session's
log names only some of the fctl commands an older fctl lacks: say which.
@kalaspuff
kalaspuff merged commit 514e279 into main Nov 20, 2026
13 checks passed
@kalaspuff
kalaspuff deleted the fctl/1526-it-should-be-documented-in-our-docs-and branch November 20, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant