itzg/dockerfiles — pull request #4 by justfalter (2014-11-01 20:58:27+00:00)
Title: Drop privileges before starting server

Hi there,
First, I'd like to say that I greatly appreciate your creating this docker image for Minecraft.

I'm sending this pull request as I had noticed that the Minecraft process was running as root, though it does not require such privileges. See [the principle of least privilege](http://en.wikipedia.org/wiki/Principle_of_least_privilege). There has been at least [one exploit](http://stealth.openwall.net/xSports/shocker.c) that allowed someone with root privs within a docker container to escalate to root privs on the host system.

All that I've done is 1) add a 'minecraft' user, 2) ensure that user owns /data, and 3) execute the original startup script as the minecraft user.

thanks!