Dockerfile 1014 B

12345678910111213141516171819202122232425262728293031323334353637
  1. FROM openjdk:8-jre-alpine
  2. WORKDIR /home/minecraft
  3. # ADD launch.sh /home/minecraft/launch.sh
  4. # ADD https://github.com/itzg/rcon-cli/releases/download/1.3/rcon-cli_linux_amd64 /usr/local/bin/rcon-cli
  5. # This allows me to talk to Minecraft server
  6. ADD ./rcon-cli_linux_amd64 /usr/local/bin/rcon-cli
  7. # RUN apk add --no-cache su-exec python python-dev py2-pip tini bash \
  8. RUN apk add --no-cache su-exec python python-dev py2-pip bash \
  9. && addgroup -g 1000 minecraft \
  10. && adduser -D -u 1000 -G minecraft -h /home/minecraft minecraft \
  11. && pip install mcstatus \
  12. && apk del python-dev \
  13. && rm -rf /var/cache/apk/*
  14. ADD launch.sh /launch.sh
  15. # && chown minecraft:minecraft /home/minecraft/*
  16. # Oddly, mcstatus localhost ping fails/unable to resolve hostname.
  17. HEALTHCHECK CMD mcstatus 127.0.0.1 ping
  18. EXPOSE 25565 25575
  19. VOLUME ["/home/minecraft"]
  20. # ENTRYPOINT [ "tini", "--" ]
  21. # CMD ["/launch-minecraft.sh"]
  22. CMD ["/launch.sh"]
  23. ENV UID=1000 GIU=1000 \
  24. SERVER=server.jar \
  25. JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G"