#10277 wrangler dev not allocating TTY to containers
Valid bug: Elixir/Erlang containers fail with isatty error in wrangler dev but work in production and standard Docker. Maintainer engaged, reproduction provided.
Keep open for containers team investigation - TTY handling difference between wrangler dev and Docker runtime
Analysis Report
Issue Review: cloudflare/workers-sdk#10277
Summary
Wrangler dev does not allocate TTY to containers, causing Elixir/Erlang applications (like electric-sql) that require TTY to crash immediately.
Findings
- Created: 2025-08-07
- Updated: 2025-08-13
- Version: wrangler 4.28.1 (reported) → 4.60.0 (current)
- Component: Containers (
wrangler dev) - Labels: bug, containers
- Comments: 4
Key Evidence
Issue description: The electric-sql Docker image (an Elixir project) crashes instantly when run via
wrangler devwith a TTY-related error (prim_tty:isatty). The same container works fine with standarddocker run.Reproduction provided: https://github.com/mckamyk/electric-wrangler - Contains minimal reproduction with Dockerfile and wrangler config.
Reporter confirmed: Issue is specific to
wrangler dev- the container runs fine when deployed to production (crashes only because of missing postgres, not the isatty error).Maintainer interaction: @emily-shen asked for clarification on 2025-08-11, and reporter confirmed on 2025-08-13 that production works but local dev fails with isatty error.
No fix found: No PRs reference this issue, and the changelog doesn't mention any TTY-related fixes for containers.
Related issues: This is the only open issue about TTY/container allocation. The containers feature is in open beta with several other open issues.
Technical Analysis
The error stacktrace shows:
{prim_tty,isatty,1,[{file,"prim_tty.erl"},{line,1473}]},
{user_drv,init,1,[{file,"user_drv.erl"},{line,171}]},
This indicates the Erlang VM's user_drv (user driver) is trying to check for a TTY during initialization. When running in wrangler dev, the container environment apparently doesn't provide the expected TTY support, causing the Erlang runtime to fail during startup.
This is a legitimate difference in how wrangler dev runs containers compared to standard Docker - likely related to how STDIO is handled or whether a pseudo-TTY is allocated.
Recommendation
Status: KEEP OPEN
Reasoning: This is a valid bug report with a clear reproduction case. The reporter has confirmed the issue is specific to wrangler dev (works in production and with standard Docker). No fix has been merged. The issue affects users trying to run Elixir/Erlang-based containers in local development.
Action: Keep open and triage for containers team. This may require investigating how wrangler dev handles container STDIO/TTY allocation compared to standard Docker runtime.
Suggested Comment
N/A - Issue should remain open for investigation.
Notes & Feedback (0)
No notes yet.