Skip to content

Commit

Permalink
Update README with -L example and explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
gliargovas committed Oct 6, 2023
1 parent 35c4bd1 commit 5284a8d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,27 @@ $ try commit rustup-sandbox
You can also run `try explore` to open your current shell in try, or `/try
explore /tmp/tmp.X6OQb5tJwr` to explore an existing sandbox.

To specify multiple lower directories for overlay (by merging them together), you can use the `-L` flag followed by a colon-separated list of directories. The directories on the left have higher precedence and can overwrite the directories on the right:

```ShellSession
$ try -D rustup-sandbox "curl https://sh.rustup.rs > rustup.sh"
...
$ try -L rustup-sandbox "sh rustup.sh"

Changes detected in the following files:

rustup-sandbox//upperdir/home/ubuntu/.profile (modified/added)
rustup-sandbox//upperdir/home/ubuntu/.bashrc (modified/added)
rustup-sandbox//upperdir/home/ubuntu/.rustup/update-hashes/stable-x86_64-unknown-linux-gnu (modified/added)
...

Commit these changes? [y/N] y

```

In this example, `try`` will merge `/lowerdir1`, `/lowerdir2` and `/lowerdir3` together before mounting the overlay. This way, you can combine the contents of multiple `try` sandboxes .


## Known Issues
Any command that interacts with other users/groups will fail since only the
current user's UID/GID are mapped. However, the [future
Expand Down

0 comments on commit 5284a8d

Please sign in to comment.