You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 containerselif [[ -e /run/.containerenv ]] ;then
psvar[1]="@${(%):-%m} «Podman»"# show hostname inside podman containersfi
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.
The text was updated successfully, but these errors were encountered:
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
: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
.The text was updated successfully, but these errors were encountered: