forked from containers/toolbox
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unbreak setting up /home as a symbolic link
The whole idea behind commit 66e982a was to set up $HOME and /home to match the host. Therefore, it's pointless to check if /home is a symbolic link or not inside the toolbox container. The state of /home needs to be checked on the host, and then the toolbox container adjusted accordingly. One crucial difference is that the toolbox container is created before its /home can be adjusted. Earlier, there was the user-specific customized image, whose /home was adjusted first, and then the toolbox container created from that. This boils down to the following invocation happening before the symbolic link can be set up: podman create --volume "$HOME":$HOME":rslave --workdir "$HOME" ... As a result, on host operating systems like Fedora 29 where /home is a symbolic link with $HOME pointing inside it, Podman populates /home with the user's sub-directory inside the toolbox container. This prevents the subsequent 'rmdir $HOME' from working, and consequently kills the container's entry point. Compare that to Fedora 30 and newer where this problem doesn't occur because /home is a symbolic link but $HOME points inside the target /var/home directory. This is why $HOME is canonicalized before bind mounting it into the container and the container's working directory is reverted back to the default (ie. /). Fallout from 8b84b5e https://github.com/debarshiray/toolbox/issues/185
- Loading branch information
1 parent
adfca25
commit c2e4155
Showing
3 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters