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

Empty /run/.containerenv except privileged mode #601

Closed
kachick opened this issue May 23, 2024 · 4 comments
Closed

Empty /run/.containerenv except privileged mode #601

kachick opened this issue May 23, 2024 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@kachick
Copy link
Owner

kachick commented May 23, 2024

Updated to 1.19.0 in #600

user in ~ ⬢ [podman] zsh
> starship --version
starship 1.19.0
branch:
commit_hash:
build_time:1980-01-01 00:00:00 +00:00
build_env:rustc 1.77.2 (25ef9e3d8 2024-04-09) (built from a source tarball),

user in ~ ⬢ [podman] zsh
127! la /run/.containerenv
.rw-r--r-- 0 root 23 May 10:41 /run/.containerenv

user in ~ ⬢ [podman] zsh
> bat /run/.containerenv

starship/starship#5195
https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/9/html-single/building_running_and_managing_containers/index

@kachick kachick added the bug Something isn't working label May 23, 2024
@kachick
Copy link
Owner Author

kachick commented May 23, 2024

@kachick
Copy link
Owner Author

kachick commented May 23, 2024

@kachick
Copy link
Owner Author

kachick commented May 23, 2024

podman run --privileged --detach and podman exec normally makes /run/.containerenv and starship shows it

dotfiles main(d28a8e6)  via 🐹 v1.22.3 26s via ❄️  impure (nix-shell-env) zsh
> podman run --privileged --detach --rm f1648c853b36e6e9782bba97bdca41ab4885228e176a54ad89030cbe4ea6b772
616a8a7ab487ad4492e2674d2eb9c9773882576b16090e624aa9f16ec0199096

dotfiles main(d28a8e6)  via 🐹 v1.22.3 via ❄️  impure (nix-shell-env) zsh
> podman exec --privileged --workdir=/home/user -it 616a8a7ab487ad4492e2674d2eb9c9773882576b16090e624aa9f16ec0199096 /home/user/.nix-profile/bin/zsh
616a8a7ab487# ls /run/.containerenv
/run/.containerenv
616a8a7ab487# cat /run/.containerenv
engine="podman-5.1.0-dev-34115231a"
name="jolly_jackson"
id="616a8a7ab487ad4492e2674d2eb9c9773882576b16090e624aa9f16ec0199096"
image="ghcr.io/kachick/home:latest"
imageid="f1648c853b36e6e9782bba97bdca41ab4885228e176a54ad89030cbe4ea6b772"
rootless=1

127! podman exec --user=user --workdir=/home/user -it 616a8a7ab487ad4492e2674d2eb9c9773882576b16090e624aa9f16ec0199096 /home/user/.nix-profile/bin/zsh

user in ~ ⬢ [jolly_jackson] zsh
>

@kachick kachick added enhancement New feature or request and removed bug Something isn't working labels May 23, 2024
@kachick kachick changed the title Empty /run/.containerenv and starship does not display image name even if I update to 1.19.0 Empty /run/.containerenv except privileged mode Jun 21, 2024
@kachick
Copy link
Owner Author

kachick commented Jun 21, 2024

@kachick kachick closed this as completed Jun 21, 2024
@kachick kachick added help wanted Extra attention is needed and removed enhancement New feature or request labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

1 participant