willholley commented on issue #236:
URL: https://github.com/apache/couchdb-docker/issues/236#issuecomment-1482827985

   I think the problem is that `gosu` [sets the $HOME environment 
variable](https://github.com/tianon/gosu/blob/master/setup-user.go#L45) to that 
of the `couchdb` user, whereas `setpriv` does not. The safest thing is probably 
just to explicit set this in the docker-entrypoint script rather than use the 
[--reset-env](https://man7.org/linux/man-pages/man1/setpriv.1.html) option in 
`setpriv`.
   
   ```
   # gosu couchdb sh -c 'echo $HOME'
   /opt/couchdb
   # setpriv --reuid=couchdb --regid=couchdb --clear-groups sh -c 'echo $HOME'
   /root
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to