Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive PATH from the guest OS #16

Closed
jonashoechst opened this issue Nov 14, 2019 · 2 comments
Closed

Derive PATH from the guest OS #16

jonashoechst opened this issue Nov 14, 2019 · 2 comments
Assignees

Comments

@jonashoechst
Copy link
Member

Currently, the PATH variable is just copied from the source OS. This works when modifying Debian-based OSss on Debian but fails, when targeting some other OSes.

We should generalize this and maybe provide an option which file to source.

@oxzi
Copy link
Member

oxzi commented Nov 14, 2019

Guessing the right PATH could be difficult or even unfeasible, e.g., using a plain NixOS image. In general, different target and source systems are hard.

Even sourcing some .bashrc, .zshrc, or .whateverrc file could result in lots of unintended side effects. For example, overwriting other variables or executing unintended code.

Thus, I would recommend adding a PATH command which just overlays the PATH variable for the RUN command.

@oxzi oxzi self-assigned this Nov 14, 2019
oxzi added a commit that referenced this issue Nov 14, 2019
@oxzi
Copy link
Member

oxzi commented Oct 4, 2021

As previously discussed, this only works if the guest system uses the same PATH as the host.
However, if necessary, one can source the .bashrc within the image.

Otherwise, there is the PATH command within pimod to overwrite the guest's PATH.

@oxzi oxzi closed this as completed Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants