Skip to content

Document file sharing options with the container #10

@dguido

Description

@dguido

Summary

Add documentation explaining how to share files (like screenshots) with the container securely.

Content to Document

VS Code Explorer Panel (Zero Config)

When using VS Code with Remote Containers, you can drag files directly into VS Code's Explorer panel (file tree). Files upload to /workspace/ inside the container.

Workflow:

  1. Take screenshot (⌘⇧3 or ⌘⇧4)
  2. Drag file from Finder into VS Code's Explorer panel
  3. Reference the file at /workspace/<filename>

Custom Mount for External Terminals

For users who need file sharing outside VS Code (e.g., external terminal), they can add a dedicated drop folder mount to devcontainer.json:

"source=${localEnv:HOME}/devcontainer-drop,target=/drop,type=bind,consistency=cached"

Then create ~/devcontainer-drop on the host and copy files there. They'll appear at /drop/ in the container.

Current Mounts

Document the existing mounts and their purposes:

  • Command history (volume) → /commandhistory
  • Claude config (volume) → /home/vscode/.claude
  • GitHub CLI auth (volume) → /home/vscode/.config/gh
  • Git config (bind, readonly) → /home/vscode/.gitconfig

Security Note

Avoid mounting large directories like ~/Desktop or $HOME as this defeats the sandbox isolation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions