mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-07-13 12:05:09 +00:00
[mc] Upgrade base image to java:8
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM itzg/ubuntu-openjdk-7
|
FROM java:8
|
||||||
|
|
||||||
MAINTAINER itzg
|
MAINTAINER itzg
|
||||||
|
|
||||||
@@ -19,7 +19,6 @@ RUN useradd -M -s /bin/false --uid 1000 minecraft \
|
|||||||
|
|
||||||
EXPOSE 25565
|
EXPOSE 25565
|
||||||
|
|
||||||
COPY start.sh /start
|
|
||||||
COPY start-minecraft.sh /start-minecraft
|
COPY start-minecraft.sh /start-minecraft
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
@@ -29,7 +28,8 @@ VOLUME ["/plugins"]
|
|||||||
COPY server.properties /tmp/server.properties
|
COPY server.properties /tmp/server.properties
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
CMD [ "/start" ]
|
USER minecraft
|
||||||
|
CMD [ "/start-minecraft" ]
|
||||||
|
|
||||||
# Special marker ENV used by MCCY management tool
|
# Special marker ENV used by MCCY management tool
|
||||||
ENV MC_IMAGE=YES
|
ENV MC_IMAGE=YES
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
usermod --uid $UID minecraft
|
|
||||||
groupmod --gid $GID minecraft
|
|
||||||
|
|
||||||
chown -R minecraft:minecraft /data /start-minecraft
|
|
||||||
chmod -R g+wX /data /start-minecraft
|
|
||||||
|
|
||||||
while lsof -- /start-minecraft; do
|
|
||||||
echo -n "."
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
echo "...switching to user 'minecraft'"
|
|
||||||
exec sudo -E -u minecraft /start-minecraft
|
|
||||||
Reference in New Issue
Block a user