Show HN: Coasts – 에이전트를 위한 컨테이너화된 호스트

발행: (2026년 3월 31일 AM 12:17 GMT+9)
2 분 소요

Source: Hacker News

Hi HN – we’ve been working on Coasts (“containerized hosts”) to let you run multiple localhost instances and multiple docker‑compose runtimes across Git worktrees on the same computer.

Demo

  • Video demo:
  • Conceptual overview videos (in the docs):

Why Coasts?

Agents can make code changes in different worktrees in isolation, but testing those changes requires isolated localhost runtimes scoped to the same worktrees. Port‑hacking tricks work only up to a point; they become impractical with complex docker‑compose setups that have many services and volumes.

What Is a Coast?

A containerized host (or “coast”) is a representation of your project’s runtime—similar to a devcontainer but without IDE tooling, focusing solely on the runtime environment.

  1. Add a Coastfile at the project root, typically pointing to the project’s docker‑compose.yml.
  2. Run coast build next to the Coastfile. This builds a Docker image that can spin up multiple Docker‑in‑Docker runtimes of the project.

Assigning a Coast to a Worktree

coast assign dev-1 -w worktree-1

The command binds the coast to the worktree-1 root. Under the hood:

  • The host project root and any external worktree directories are bind‑mounted into the container at creation time.
  • The /workspace directory (where the coast’s services run) is a separate Linux bind mount created inside the running container.
  • Switching worktrees involves unmounting /workspace, rebinding it to the new worktree, and using mount --make-rshared /workspace so the change propagates to the inner Docker daemon’s containers.

Working with Coasts

  • Host‑side development: Agents continue to work on the host filesystem.
  • Runtime testing: Agents can execute commands against a specific coast instance, e.g., coast exec dev-1 make tests.
  • Dynamic ports: Each coast defines ports to expose back to the host in the Coastfile. When you “checkout” a coast, socat binds the canonical ports (e.g., web 3000, db 5432) to the host, useful for hard‑coded ports or webhook testing.

Configuration Highlights

  • Worktree locations: Specify host directories where worktrees are stored (e.g., ~/.codex/worktrees) in the Coastfile.
  • Volume topologies: Omit services/volumes an agent doesn’t need, or share certain services host‑side to reduce overhead.
  • Service strategies: Define how each service behaves after a worktree assignment change (none, hot, restart, rebuild) to avoid full docker‑compose down/up cycles.

Feedback

We’d love to answer any questions and hear your feedback!

0 조회
Back to Blog

관련 글

더 보기 »

2026년 테크 산업에서 살아남는 방법

2026년이 된 지 3개월이 되었고, ChatGPT는 2022년 이후 진화했습니다. 우리는 AI가 전 세계를 강타하는 모습을 보았습니다. 이 성찰 글은 우리에게 …를 상기시키려 합니다.