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

vrx_entrypoint.sh does not expand "~" to correct user home directory #33

Closed
M1chaelM opened this issue Sep 9, 2021 · 3 comments
Closed

Comments

@M1chaelM
Copy link
Collaborator

M1chaelM commented Sep 9, 2021

Problem

When running the vrx-docker container, the "~" character expands to "/" instead of the correct home directory. This causes the entrypoint to fail on line 11 while trying to source the setup.sh file

/vrx_entrypoint.sh: line 11: //vrx_ws/devel/setup.sh: No such file or directory

To reproduce:

Run the vrx-docker container with the following command:

vrx_server/run_container.bash -n <any_container_name> <image_name>
@M1chaelM
Copy link
Collaborator Author

M1chaelM commented Sep 10, 2021

This is a problem with the Dockerfile, build and run scripts. They use a hardcoded value of 1000 for the UID and GID when building the container, but then dynamically run with UID and GID that match the local user. So, if the user's UID and GID are not 1000, the system fails to set up the user environment correctly and can't find $HOME.

Unfortunately, fixing this produces a pathological behavior when running the adduser command, causing the build process to hang at Copying files from /etc/skel. There are several possible reasons for this, but the one that seems to fit best in this case is that the filesystem doesn't support sparse files and therefore is failing while try to copy lastlog. This is a sparse file that will appear especially big when it has to handle large userids, which is the case on my system. As a result the build process remains stuck until my partition runs out of space. See here for a similar report.

The fix should be to use a --no-log-init option. But Ubuntu's version of adduser doesn't support this option, so we have to switch to useradd.

@M1chaelM
Copy link
Collaborator Author

@caguero I now have this fixed locally. When I get write access to the repository I will submit a PR.

@M1chaelM
Copy link
Collaborator Author

Resolved by #34

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

1 participant