You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/08/13 12:10:41 UTC
[GitHub] [couchdb-docker] willholley opened a new pull request #151: allow
running as arbitrary uid
willholley opened a new pull request #151: allow running as arbitrary uid
URL: https://github.com/apache/couchdb-docker/pull/151
<!-- Thank you for your contribution!
Please file this form by replacing the Markdown comments
with your text. If a section needs no action - remove it.
Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
of code collaboration. Positive feedback is represented +1 from committers
and negative is a -1. The -1 also means veto, and needs to be addressed
to proceed. Once there are no objections, the PR can be merged by a
CouchDB committer.
See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
## Overview
Enables the CouchDB container to run as a non-root / user-specified uid. For now, I've only modified the 2.3.1 container but if the approach is accepted we can easily backport it.
Specifically, this:
* Adds guards around entrypoints commands that require root (as suggested in #147)
* Broadens permissions within the container filesystem to allow access by non-couchdb users.
* Adds an example to the documentation which specifies `--user`.
## Testing recommendations
Build the container locally:
```
docker build -t couchdb:2.3.1 2.3.1
```
Run the container as a custom user
```
docker run --user <user> --name mycouch -p 5984:5984 -d couchdb:2.3.1
```
or, run the container as a custom user with a mounted data volume:
```
mkdir /Users/<user>/temp/couchdb-data
docker run --user <user> --name mycouch -v /Users/<user>/temp/couchdb-data:/opt/couchdb/data -p 5984:5984 -d couchdb:2.3.1
```
Verify Couch is working:
```
curl localhost:5984
```
## GitHub issue number
<!-- If this is a significant change, please file a separate issue at:
https://github.com/apache/couchdb-docker/issues
and include the number here and in commit message(s) using
syntax like "Fixes #472" or "Fixes apache/couchdb#472". -->
Fixes #147
## Related Pull Requests
<!-- If your changes affects multiple components in different
repositories please put links to those pull requests here. -->
## Checklist
- [ ] Code is written and works correctly;
- [ ] Changes are covered by tests;
- [ ] Documentation reflects the changes;
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services