Skip to content

Enhancement: mount host SSH keys into container for in-container git workflows #1

@abitofhelp

Description

@abitofhelp

Summary

Mount the host's ~/.ssh directory into the container as a read-only
volume so users can run git operations (clone, fetch, pull, push)
entirely inside the container without switching to the host.

Proposed Change

Add SSH mount to container_run.py:

-v "$HOME/.ssh":/home/<user>/.ssh:ro

Considerations

  • Mount as :ro to protect private keys from accidental modification.
  • The container's SSH config IdentityFile paths must match the mount
    point.
  • May need known_hosts copied or mounted as well.
  • The container user must have read access to the mounted files
    (UID/GID mapping via entrypoint already handles this).

Motivation

Enables a single-terminal workflow: edit, build, test, and commit/push
entirely inside the container. Currently, git operations require
switching to the host terminal.


Migrated from abitofhelp/dev_container_ada#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions