matrix-org / sydent

Sydent: Reference Matrix Identity Server
http://matrix.org
Apache License 2.0
293 stars 84 forks source link

Fix docker failing to install poetry due to missing /home/sydent directory #567

Closed paxriel closed 1 year ago

paxriel commented 1 year ago

Pull Request Checklist

The existing Dockerfile does not create the home folder in /home/sydent, which results in the PIP installation of Sydent failing with

WARNING: The directory '/nonexistent/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.

and subsequently

ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/nonexistent'.

This PR changes the home directory of the sydent user to /home/sydent instead of /sydent to fix this issue.

InezMc commented 1 year ago

Anonymous signoff to Matrix.org recieved.

MatMaul commented 1 year ago

Thanks for your contribution @paxriel . I noticed something similar last week when trying to do a release and didn't notice your PR, sorry.

This should now be fixed by using the more standard useradd. Also it broke because the Python base image has been updated to a newer Debian version, so I've pin the Debian version in the base image name to avoid this kind of trouble in the future.