Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

Security issue: iojs is run as root #23

Open
mtparet opened this issue Feb 7, 2015 · 7 comments
Open

Security issue: iojs is run as root #23

mtparet opened this issue Feb 7, 2015 · 7 comments

Comments

@mtparet
Copy link
Author

mtparet commented Feb 7, 2015

cf also nodejs/docker-node#1

@pesho
Copy link
Contributor

pesho commented Feb 8, 2015

Something like:

# Use high uid/gid to avoid collisions with the host
RUN groupadd --gid 25000 app && useradd --uid 25000 --gid 25000 --create-home --shell /bin/bash app 

...folowed by this just before CMD:

USER app

...and also modifying onbuild to use e.g. /home/app/src as base.

Does this sound right?

@mtparet
Copy link
Author

mtparet commented Feb 8, 2015

Yes sounds right !

@pesho pesho self-assigned this Feb 11, 2015
@pesho pesho removed their assignment Apr 3, 2015
@pesho
Copy link
Contributor

pesho commented Apr 3, 2015

Un-assigning this, in case anyone else wants to give it a try.

@hmalphettes
Copy link
Member

@pesho I'll give it a shot sometimes next week as I actually need this for a customer.
Feel free to assign it to me or simply wait for a PR when it is ready enough.

@Starefossen
Copy link
Member

@hmalphettes you have probably read this comment in #26, but just to make sure:

yosifkit commented on Feb 16
I think the hardest part here is that this still doesn't cover the developer that wants to bind mount in their code so that they can edit it on their host machine and see changes as they develop using something like node-supervisor (ex: docker run -it --rm -v /my/code:/usr/src/app my-node). That way they do not have to docker stop, docker build, and docker run for every change.

@retrohacker
Copy link
Contributor

User namespaces have made it into the experimental release of Docker. moby/moby#12648

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants