mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Issue #9: performing usermod to allow for -e provided uid of the minecraft server process
* corrected .dockerignore to allow for a $(pwd)/data for local testing of -v
This commit is contained in:
parent
a8c3afbe88
commit
88a796bb44
@ -1 +1 @@
|
||||
/data
|
||||
data
|
||||
|
@ -16,13 +16,13 @@ EXPOSE 25565
|
||||
ADD start.sh /start
|
||||
ADD start-minecraft.sh /start-minecraft
|
||||
|
||||
USER minecraft
|
||||
VOLUME ['/data']
|
||||
ADD server.properties /tmp/server.properties
|
||||
WORKDIR /data
|
||||
|
||||
CMD [ "/start-minecraft" ]
|
||||
CMD [ "/start" ]
|
||||
|
||||
ENV UID 1000
|
||||
ENV MOTD A Minecraft Server Powered by Docker
|
||||
ENV LEVEL world
|
||||
ENV JVM_OPTS -Xmx1024M -Xms1024M
|
||||
|
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
chown -R minecraft:minecraft /data /start-minecraft
|
||||
usermod --uid $UID minecraft
|
||||
chown -R minecraft /data /start-minecraft
|
||||
exec su -s /bin/bash -c /start-minecraft minecraft
|
||||
|
Loading…
Reference in New Issue
Block a user