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

Support for distrobox #42

Open
lfromanini opened this issue Aug 22, 2023 · 0 comments
Open

Support for distrobox #42

lfromanini opened this issue Aug 22, 2023 · 0 comments
Assignees

Comments

@lfromanini
Copy link

This is more an enhancement than an issue.

When using Distrobox, our home folder is mounted within a container (podman or docker). Using the command distrobox enter <container_name> we can't see any difference from shell prompt and it's hard to know if we are on the host or inside the container.

My proposal is to have the hostname and a flag indicating if we are in the container. This can be made with this hack in the ~/.zshrc:

if [[ -e /.dockerenv ]] ; then
    psvar[1]="@${(%):-%m} «Docker»"     # show hostname inside docker containers
elif [[ -e /run/.containerenv ]] ; then
    psvar[1]="@${(%):-%m} «Podman»"     # show hostname inside podman containers
fi

However, it will be better if this was merged in the source code. Additionally, would be nice to have a way to overwrite the colour of "Docker" and "Podman" words. Suggestion: AGKOZAK_COLORS_CONTAINERENV.

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