[minecraft-server] Issue #9: explicitly adding user in container with UID=1000

This commit is contained in:
Geoff Bourne 2015-01-03 14:17:05 +00:00
parent 052f80d849
commit bc9afcd659
3 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1 @@
/data

View File

@ -7,7 +7,7 @@ RUN update-alternatives --install /usr/bin/js js /usr/bin/js24 100
RUN wget -O /usr/bin/jsawk https://github.com/micha/jsawk/raw/master/jsawk
RUN chmod +x /usr/bin/jsawk
RUN useradd -M -s /bin/false minecraft \
RUN useradd -M -s /bin/false --uid 1000 minecraft \
&& mkdir /data \
&& chown minecraft:minecraft /data

View File

@ -44,7 +44,11 @@ to map a directory on your host machine to the container's `/data` directory, su
docker run -d -v /path/on/host:/data ...
When attached in this way you can stop the server, edit the configuration under your attached `/path/on/host` and start the server again with `docker start CONTAINERID` to pick up the new configuration.
When attached in this way you can stop the server, edit the configuration under your attached `/path/on/host`
and start the server again with `docker start CONTAINERID` to pick up the new configuration.
**NOTE**: The files in the attached directory will be owned by the host user with UID of 1000. Be sure
to create that user (such as `adduser --uid 1000 ...` if you don't already have one.
## Versions