-
Notifications
You must be signed in to change notification settings - Fork 144
Change default user in the Docker image from root to couchdb #71
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
Comments
I don't see how this is possible. Without root access inside of the container, we can't fix ownership of files in mounted volumes, which is an issue, since Docker mounts volumes as Feel free to propose something in a PR. |
I actually just managed to do this by adding a couchdb-docker/2.1.1/docker-entrypoint.sh Line 71 in 1f85f08
This successfully modifies the ownership of mounted volume and also sets the default user in the container to Not tested yet if this solution will have problems when the |
I don't see how this can work, since these lines explicitly need to change ownership of files that may be mounted via |
@wohali There has been a considerable focus in the community to get containers to start and run as non-root -- for example: Openshift requires this: https://docs.openshift.com/container-platform/3.3/creating_images/guidelines.html
The couchdb image currently requires itself to start as |
A tested pull request that does the right thing and keeps the same uid/gid we currently use would be welcomed and considered seriously.
|
I would like to change the defualt running user in the couchdb image from
root
tocouchdb
. What that means is basically when I dodocker exec
into the container I log in ascouchdb
rather than root. This is mainly aimed with security concerns in mind - I don't wont everybody who can log into the container to be root.Expected Behavior
Be able to log in as user couchdb.
Current Behavior
I tried adding
USER couchdb
before theENTRYPOINT
in the Dockerfile, however it seems that root access is needed fordocker-entrypoint.sh
, so it seems I can't do that on the Dockerfile side.Possible Solution
Steps to Reproduce (for bugs)
Context
Limit the root access for people logging into the container
Your Environment
Using the 2.1.1 image.
The text was updated successfully, but these errors were encountered: