cgwalters / coretoolbox

"pet container" tool using podman
Apache License 2.0
24 stars 6 forks source link

Unable to enter toolbox container #5

Closed trown closed 5 years ago

trown commented 5 years ago

I get the following error using master on fedora silverblue:

mount: /var/home/trown: special device /host/home/trown does not exist. error: Initializing container (static): Child ["mount" "--rbind" "/host/home/trown" "/home/trown"]

If I go back to dd30b27082a5df7434b2d130275f8f79c8f96f20 things work great. So it would seem there is some issue with 2542ba4ce30d115ba34a20736acfc5d97af4550b

I will continue to investigate, but I thought I would post a stub in case anyone else hits this.

matyasselmeci commented 5 years ago

I get the same error on regular Fedora 30 on master (a583a3e).

trown commented 5 years ago

@matyasselmeci does https://github.com/cgwalters/coretoolbox/pull/6 work for you? I rebased it on the recent changes to master, and it still fixes my issue.

matyasselmeci commented 5 years ago

No, there is no change for me. I am not running OSTree, just vanilla Fedora 30 Workstation.

trown commented 5 years ago

@cgwalters first... thanks for this project. Inspired me to start learning rust, and to run silverblue as my main OS.

second, any thoughts on this issue?

https://github.com/cgwalters/coretoolbox/pull/6 fixes it for me, but maybe there is a better way that would also fix it for @matyasselmeci

trown commented 5 years ago

turns out my fix was actually much simpler... I just needed to set $HOME properly. It was set to /home/trown which is a symlink to /var/home/trown. If I set HOME=/var/home/trown before creating a container with create command, everything works.

cgwalters commented 5 years ago

@cgwalters first... thanks for this project. Inspired me to start learning rust, and to run silverblue as my main OS.

Cool! :+1:

turns out my fix was actually much simpler... I just needed to set $HOME properly. It was set to /home/trown which is a symlink to /var/home/trown. If I set HOME=/var/home/trown before creating a container with create command, everything works.

Hmm. Right, you generally want to do that. This is a saga though, see e.g. https://github.com/projectatomic/rpm-ostree/pull/1726

Probably coretoolbox should be resilient to this.

cgwalters commented 5 years ago

BTW I think you want to sudo vi /etc/passwd and change it there persistently rather than overriding HOME.