docs: document the command's starting directory
This commit is contained in:
@@ -229,7 +229,7 @@ The CLI delegates to the library; the namespace-mode flow is:
|
||||
7. Set up mounts: /proc, /sys (ro), /dev, /dev/pts
|
||||
8. Apply bind targets: overlays (ro) and bind mounts (rw)
|
||||
9. Write /etc/resolv.conf with DNS servers
|
||||
10. Set the working directory
|
||||
10. Set the working directory to the target where the current directory is mapped (`/root/<basename>`, or `/mnt/<basename>` with `--bind-rw`); the library default applies when it is not mapped
|
||||
11. Exec shell or command in chroot with the composed envp
|
||||
12. On exit, clean up the temporary directory; propagate the exit code
|
||||
|
||||
@@ -364,7 +364,7 @@ The rootfs directory is converted to an uncompressed CPIO archive (newc format)
|
||||
|
||||
### Overlay Mount (Default)
|
||||
|
||||
By default, the current working directory is mounted as an overlay filesystem at `/root/<basename>` inside the chroot, where `<basename>` is the name of the current directory.
|
||||
By default, the current working directory is mounted as an overlay filesystem at `/root/<basename>` inside the chroot, where `<basename>` is the name of the current directory. The command starts in that directory, so relative paths keep meaning what they meant on the host.
|
||||
|
||||
Overlay configuration:
|
||||
- `lowerdir`: the source directory (read-only)
|
||||
@@ -385,7 +385,7 @@ $ ecr ubuntu:noble -- make build
|
||||
|
||||
### Read-Write Bind Mount
|
||||
|
||||
`--bind-rw <path>` creates a true read-write bind mount at `/mnt/<basename>`. This modifies the host filesystem directly. Use with caution.
|
||||
`--bind-rw <path>` creates a true read-write bind mount at `/mnt/<basename>`. This modifies the host filesystem directly. Use with caution. When the current directory is mounted this way, the command starts in `/mnt/<basename>`.
|
||||
|
||||
Multiple `--bind-rw` paths can be specified. If a path is specified in both `--bind` and `--bind-rw`, the read-write mount takes precedence.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user