Skip to content

[Bug]: container-use terminal has an issue with source mounting. #334

@andrewwhitecdw

Description

@andrewwhitecdw

What happened?

Summary: container-use terminal has an issue with source mounting. Use this Docker command instead for an interactive shell:

This happens on my machine and I am unsure if it is reproducible. x86 Linux.

Error: input: container-use: load: missing required argument: "source"
What's Happening

Root Cause: container-use terminal fails with "missing required argument: source" when trying to start an interactive shell in an existing environment.

Steps to Reproduce

  1. Create a container-use environment (via MCP or CLI)
  2. Run container-use terminal
  3. Error: load: missing required argument: "source"
    Environment Config (.container-use/environment.json)

{
workdir: /workdir,
base_image: mcr.microsoft.com/playwright:v1.40.0-jammy,
setup_commands: [
npx playwright install chromium --with-deps
]
}

Attempted Fixes (Failed)

  1. Added "source": "." to environment.json - Same error
  2. Passed source via CLI - No CLI flag documented for terminal subcommand
  3. Checked container-use terminal --help - No --source or similar option

Expected Behavior
container-use terminal should:

  1. Start the container from the environment's base image
  2. Mount the project directory (inferred from .container-use/ location)
  3. Provide an interactive bash shell

Actual Behavior
Container fails to start with Dagger-level error about missing "source" argument.
Technical Context

Component Value
container-use version Latest (via zerobrew)
Environment stable-mammal, flying-pangolin
Base image mcr.microsoft.com/playwright:v1.40.0-jammy
Platform WSL2 (Ubuntu)
Project dir snip
Workaround
Direct Docker command works fine:
docker run -it --rm \
-v /snip:/workdir \
-w /workdir \
mcr.microsoft.com/playwright:v1.40.0-jammy \
bash
Suggested Fix
The terminal subcommand should either:
  1. Auto-detect source from .container-use/ parent directory
  2. Accept --source flag to explicitly set mount point
  3. Document required config field if source must be in environment.json

Ticket Title: container-use terminal fails with "missing required argument: source"
Labels: bug, terminal, source-mount

Version

container-use version 0.4.2
commit: 89ebe7765ec067a07c51de104822056eb217c1b9
built: 2025-08-19T22:23:38Z

Logs


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions