diff --git a/README.md b/README.md index 615c701..e8dbc75 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,26 @@ The image is built automatically on first use if it does not already exist. Claude Code starts inside the container with the current directory mounted and set as the working directory. +## Sharing host config files via hard links + +The container home at `~/.local/share/claude-container/container-home/` is mounted +as `/home/` inside every container. You can hard link files from your real +`$HOME` into this directory so the container sees them without copying or syncing. + +Because both paths live on the same filesystem, a hard link means they are literally +the same file — changes from either side are instantly reflected. + +Example for `.gitconfig`: + +```sh +mkdir -p ~/.local/share/claude-container/container-home +ln ~/.gitconfig ~/.local/share/claude-container/container-home/.gitconfig +``` + +You can do the same for other config files you want to share. Avoid linking +sensitive files such as `~/.ssh/id_*` or `~/.gnupg/` — keeping those out of the +container is an intentional security boundary. + ## Cleanup To remove all containers, the image, and the persistent home directory: