osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
555 stars 70 forks source link

Make using user shell optional #185

Closed rcywongaa closed 2 years ago

rcywongaa commented 2 years ago

Resolves https://github.com/osrf/rocker/issues/183

Adds option --use-user-shell and changes default behavior to not override container shell

Let me know if you disagree with this change in default behavior and I'll amend this to implement --user-override-shell instead

tfoote commented 2 years ago

Oh sorry I also forgot to mention that I'd like to also make sure to add coverage of this extra option in the unit tests before merging.

rcywongaa commented 2 years ago

My (probably incorrect) use case of --user is to simply avoid having to manually create a non-root user so that any files generated within the container ends up having the same owner as the host. Hence my settings were more towards create the user and nothing more. My zsh is heavily customized with many plugins which probably doesn't make sense to replicate in the container.

Anyway, I understand the intention. I guess most container's default / available shell is well known (bin/sh) anyway