-
Notifications
You must be signed in to change notification settings - Fork 25
proposal : use a "non-root" node docker base image #225
Comments
Please keep your language professional. I have edited your message. |
I see your problem, however I'm not a fan of the proposed solution as it makes the project deviates from the use of a standard well-known image, which makes on-boarding more difficult. I think the underlying issue is that the container is writing files to the host file system. Maybe we should not have it to that. Maybe the PDFs should be produced on stdout? Or maybe the container should server the PDFs over HTTP and the outside world would need to download them. What do you think? |
What? Not sure to appreciate your judgement if I'm professional or not in my comment to be honnest |
My point of view: ease the life of users as much as possible even if it means that the life of maintainers may be more difficult. |
|
I prefer to add a comment explaining why we use rather than keeping Maybe we could ask what other contributors think about it? |
Sure, ping anyone you like. |
dear @jlandure @zigarn @gmembre-zenika @FBerthelot could you tell us what you think about the solutions proposed by @hgwood and myself? |
I prefer the way @looztra want to change the behaviour.
|
@gmembre-zenika if stdout would be chosen then there would be one command by generated file ( Are there any official images that adopt the non-root practice? |
@looztra I've changed my mind and I encourage you to go forward with your change, for two reasons:
My question from my last comment still stands though, for my own culture. :) |
@gmembre-zenika : the @hgwood: the answer is related to my reply to @gmembre-zenika : you can use the mvn docker image with the |
Indeed, that's better than running as root.
It means that it is not limited to run with a uid/groupid of 1000/1000 I will make some experiments and play with both solutions...and report my findings :) |
The base image for the docker image uses
library/node
which is suboptimal because every directory created by this image (like thePDF
one for example) will be owned by root on the docker host.sudo rm -rf PDF
to get it cleaned under linux is cumbersomeI propose that we either use mkenney/npm as the base image or that we get inspired from it to build the fwk docker image. This image automagically switches to the current uid/gid inside the running container, hence every directory/file created by node inside the container stick to the user that created the directory on the docker host.
First option : use it as the base image. Problem: the image uses
/src
inside the container to detect the target uid/gid, so we will need to adjustrun.sh
to also mount a host dir on/src
in the containerSecond option : mimic the behaviour of the mkenney/npm image and copy and adjust the run-as-user script to, for instance, use one of the already mounted dirs
For the moment, I'd favour the first option because I think that adjusting
run.sh
will require less efforts than having to sync our fork of therun-as-user
with the original one.What's your point of view regarding this?
The text was updated successfully, but these errors were encountered: