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

Do not run as root #39

Open
cur3n4 opened this issue Aug 1, 2017 · 3 comments
Open

Do not run as root #39

cur3n4 opened this issue Aug 1, 2017 · 3 comments

Comments

@cur3n4
Copy link

cur3n4 commented Aug 1, 2017

Ideally the image should not be run as root, I recommend creating a user and changing the rethinkdb permissions to be accessible by that user

@stuartpb
Copy link
Collaborator

How many other official images run as a non-root user/group? My experience has been that, in the Docker world, the containerization itself is generally considered to be "good enough" in terms of privilege encapsulation.

If you can point to a substantial number of other prolific images in the official library that create and use non-root user accounts, I'd consider this, but even then, this would be an unlikely change, due to the potential to break backwards compatibility (usage in the wild having been written against the image under the assumption that commands will be run as root).

@Vanuan
Copy link

Vanuan commented Sep 6, 2017

In my experience the difference comes from when you have bind-mounted directories.
I.e. all you mounted files would be root owned.
In terms of security, I don't know what it means, but in terms of usability it has less than perfect user experience. You'll frequently get permission denied.
For named volumes it's even worse: you have to run your container as root and chown the corresponding directories. And god help you if you have different user ids in different containers that need access to the same volume.

I don't see why you should change rethinkdb base image, as you can easily create an official-derived image:

FROM rethinkdb
USER rethinkdb
RUN useradd ...
RUN chown rethinkdb ...

@toredash
Copy link

toredash commented Jan 3, 2018

I am in support of running the image as not-root. I currently build my own rethindkb-image so that I'm are able to run rethinkdb in OpenShift.

Openshifts documentation states how they recommend doing it: https://docs.openshift.com/container-platform/3.7/creating_images/guidelines.html#openshift-specific-guidelines

AFAIK, for deployments on Kubernetes, one would have to specify allowPrivileged to run the official rethinkdb image.

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

4 participants