Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Parity Docker containers run as root #7374

Closed
briskycat opened this issue Dec 23, 2017 · 7 comments
Closed

Parity Docker containers run as root #7374

briskycat opened this issue Dec 23, 2017 · 7 comments
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M1-ci 🙉 Continuous integration. P7-nicetohave 🐕 Issue is worth doing eventually.
Milestone

Comments

@briskycat
Copy link

Docker images defined in https://github.com/paritytech/parity/tree/master/docker run with UID 0, which is not very secure: although "containerized" root user has fewer capabilities than the real root, Docker developers recommend running container processes as unprivileged users.
Even if I specify unprivileged UID:GID in the --user option of the docker run command I still can not run these containers in unprivileged mode because of permissions violation. The images are configured so that the data directory is located in the /root directory of the image, which is owned by root.
It is possible to remap root user inside a Docker container to an unprivileged user on the host, but this is not covered on the wiki page.
It would also be nice if the images had special mount points for external data volumes marked by the Docker VOLUME directive.

@tomusdrw tomusdrw added F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M1-ci 🙉 Continuous integration. P9-somedaymaybe 🌞 Issue might be worth doing eventually. labels Dec 27, 2017
@tomusdrw
Copy link
Collaborator

@paritytech/ci Please have a look.

@briskycat PRs are very welcome.

@5chdn 5chdn added this to the 1.11 & ... milestone Jan 2, 2018
@5chdn 5chdn modified the milestones: 1.11 & ..., 1.12 & ... Jan 23, 2018
@5chdn 5chdn modified the milestones: 1.12, 1.13 & ... Mar 1, 2018
@JohnnySheffield
Copy link
Contributor

We have encountered similar issue with current docker images, and are preparing a PR for non-root CentOS image, as current one is not suitable for deploying on OpenShift (Kubernetes).

We had no luck in building current Parity CentOS Docker image, so we went on and created our own. Current image is wget-ing the rpm package, but we would like to build it from source.

The Dockerfile (and the Parity OpenShift template) is currently available here, and the non-root image is published on dockerhub

Can you please check out our current Dockerfile and give feedback is it PR ready, and provide us with info is this code still used for building rpm package.

Cheers!

pinging @Dec-

@5chdn 5chdn modified the milestones: 1.13, 1.14 & ... Apr 24, 2018
@folsen
Copy link
Contributor

folsen commented May 21, 2018

@JohnnySheffield (Going over stale issues) Did you ever create that PR, is there any more help you need from us?

@5chdn 5chdn modified the milestones: 1.14 & ..., 1.13 Jun 24, 2018
@5chdn 5chdn added P7-nicetohave 🐕 Issue is worth doing eventually. and removed P9-somedaymaybe 🌞 Issue might be worth doing eventually. labels Jun 24, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Jul 17, 2018
@onpaws
Copy link

onpaws commented Jul 25, 2018

I recently learned the same background and arrived at the same conclusion.
@JohnnySheffield did you manage to get anywhere with the PR?
I'm pretty slammed but would be keen, at some point, to help here

@JohnnySheffield
Copy link
Contributor

@folsen @onpaws Here's a nonroot centos image that i've finally got to build and start. Still needs more work to reduce final image size.

@onpaws
Copy link

onpaws commented Jul 27, 2018

Thanks for sharing!
Will check this out over the weekend :)

@5chdn 5chdn added this to the 2.3 milestone Sep 25, 2018
@5chdn 5chdn modified the milestones: 2.3, 2.4 Oct 29, 2018
@debris
Copy link
Collaborator

debris commented Oct 30, 2018

closed by #9689

@debris debris closed this as completed Oct 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M1-ci 🙉 Continuous integration. P7-nicetohave 🐕 Issue is worth doing eventually.
Projects
None yet
Development

No branches or pull requests

7 participants