Repository navigation
Preserve environment when attaching to Docker - #1546
Conversation
[Medium impact] The change appears safe to merge. SummaryReattaching to a running Docker container now preserves the Arena environment when switching users.
Reviews (1) · Last reviewed commit: "Preserve environment when attaching to D..." · Reviewed by Greptile |
🤖 Isaac Lab-Arena Review BotSummaryThe PR changes Design, Boundaries & ScopeSwitching to Findings🔵 Improvement: docker/setup/configure_shell.sh:7: With 🔵 Improvement: docker/run_docker.sh:177: 🔵 Improvement: skills/developer/dev-container/SKILL.md:77: The command on line 69 works in containers created before this change. The launcher sentence and the "need to be recreated" note suggest it doesn't. Could we drop both? The rebuild section already says to recreate the container after a rebuild. Notes
VerdictMinor fixes needed |
|
/review |
Signed-off-by: Qian Lin <qianl@nvidia.com>
Signed-off-by: Qian Lin <qianl@nvidia.com>
Signed-off-by: Qian Lin <qianl@nvidia.com>
Signed-off-by: Qian Lin <qianl@nvidia.com>
Signed-off-by: Qian Lin <qianl@nvidia.com>
8165685 to
4ca3c06
Compare
Signed-off-by: Qian Lin <qianl@nvidia.com>
|
/review |
|
The review stopped before it finished. Please run Requested in this comment. |
|
/review |
|
The review could not start. Please run Requested in this comment. |
david-tingdahl-nvidia
left a comment
There was a problem hiding this comment.
Nice! I believe this is the canonical way of executing docker as a given user
Signed-off-by: Qian Lin <qianl@nvidia.com>
Preserve the container image environment when attaching or running commands as the host user. Use Docker user selection directly instead of switching users inside the container.
Reported by 7044965
Why this change?
Main uses
su <user> -cloads/etc/environmentthrough PAM and replaces the image PATH with the system default, when re-attaching to a running container. Commands such asisaaclab.sh -pthen fail because the Isaac Lab launcher is no longer on PATH.What changes?
docker exec --user "$(id --user --name)"./etc/passwdidentity. Existing containers require no rebuild or recreation.Usage example
Before:
After:
Validation