Giter Site home page Giter Site logo

binhex / arch-minecraftserver Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 27.0 111 KB

Docker build script for Arch Linux base with Minecraft Java server

License: GNU General Public License v3.0

Dockerfile 4.66% Shell 95.34%
docker arch-linux minecraft-server java minecraft

arch-minecraftserver's Issues

[Feature Request] Toggle Download of Vanilla Minecraft

hi,

i would love to see an toggle like true/false for turning off Downloading latest Vanilla version.

i use mostly Papermc and waterfall for bungeecord and i dont need the vanilla jar.

Like this its waste of space. When i run like 10 servers (game servers) and every server has like 40mb - 50mb wasted space it would use 400mb - 500mb of my harddrive for nothing

docker: invalid reference format: repository name must be lowercase.

root@ubuntu:/home/xinmans# docker run -d \

-p 8222:8222/tcp \
-p 25565:25565 \
--name=minecraftserver \
-v /apps/docker/minecraftserver:/config \
-v /etc/localtime:/etc/localtime:ro \
-e CREATE_BACKUP_HOURS=12 \
-e PURGE_BACKUP_DAYS=14 \
-e ENABLE_WEBUI_CONSOLE=yes \
-e ENABLE_WEBUI_AUTH=yes \
-e WEBUI_USER=admin \
-e WEBUI_PASS=minecraft \
-e WEBUI_CONSOLE_TITLE='Minecraft Server' \
-e CUSTOM_JAR_PATH=/config/minecraft/paperclip.jar \
-e JAVA_VERSION=latest \
-e JAVA_INITIAL_HEAP_SIZE=512M \
-e JAVA_MAX_HEAP_SIZE=1024M \
-e JAVA_MAX_THREADS=1 \
-e STARTUP_CMD=gamerule reducedDebugInfo true \
-e UMASK=000 \
-e PUID=0 \
-e PGID=0 \
binhex/arch-minecraftserver

docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.
root@ubuntu:/home/xinmans# exit

Server is not restarted after crash

If the minecraft server process crashes, a manual restart of the container is required to get it back in working order. I would expect that either the minecraft server process is restarted automatically inside the container, or that the entire container goes down (so that it can be restarted by an orchestrator).

Server is not properly shutdown on docker restart/stop

I was doing some testing with a server status bot and it would post a message on when the server has stopped. Stopping the docker container does not cause the server to properly stop and abruptly shuts it down. This could lead to corrupted saves and loss of world data.

Issue with Forge for 1.18.2

I have used forge without issues previous to 1.18.2. Since this version forge has changed the way they package their software so that it is no longer a single .jar

I have got it working by manually editing the docker and replacing the following line in start.sh:

screen -L -Logfile '/config/minecraft/logs/screen.log' -d -S minecraft -m bash -c "cd /config/minecraft && java -Xms${JAVA_INITIAL_HEAP_SIZE} -Xmx${JAVA_MAX_HEAP_SIZE} -XX:ParallelGCThreads=${JAVA_MAX_THREADS} ${java_log4j_mitigation} -jar ${CUSTOM_JAR_PATH} nogui"

With:
screen -L -Logfile '/config/minecraft/logs/screen.log' -d -S minecraft -m bash -c "cd /config/minecraft && /usr/lib/jvm/java-17-openjdk/bin/java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.2.1/unix_args.txt "$@""

Note that originally it was using java 19 by default and that was causing it to crash, i had manually installed 17 and that is now working with the above.

  1. Can you make it so that java 17 is selectable along side 8 , 11 and latest?
  2. Is is possible to adjust the start command to be able to take the below line or a variation of command? @user_jvm_args.txt is probably not needed as its a file where you would put all the Xms/Xmx etc args.

@user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.2.1/unix_args.txt "$@"

Not allowing additional java flags

I love your containerized Minecraft server by the way you mostly set up things. However, is it possible to add a key for extra Java flags by restructuring the start? sh flags in the start function.

Currently, you have this code on line 124 in start.sh:
screen -L -Logfile '/config/minecraft/logs/screen.log' -d -S minecraft -m bash -c "cd /config/minecraft && java -Xms${JAVA_INITIAL_HEAP_SIZE} -Xmx${JAVA_MAX_HEAP_SIZE} -XX:ParallelGCThreads=${JAVA_MAX_THREADS} ${java_log4j_mitigation} -jar ${CUSTOM_JAR_PATH} nogui"

Again, add another key to the container called {JAVA_EXTRA_PARAMS} and a function to take all the added parameters separated by a comma and replace them with spaces or something.
Example:
JAVA EXTRA PARAMS ---> -XX:+UseG1GC, -XX:+AlwaysPreTouch, etc

screen -L -Logfile '/config/minecraft/logs/screen.log' -d -S minecraft -m bash -c "cd /config/minecraft && java -Xms${JAVA_INITIAL_HEAP_SIZE} -Xmx${JAVA_MAX_HEAP_SIZE} -XX:ParallelGCThreads=${JAVA_MAX_THREADS} {JAVA_EXTRA_PARAMS} ${java_log4j_mitigation} -jar ${CUSTOM_JAR_PATH} nogui"

the reason is that there are more flags that can be added, such as ShenandoahGC or whatever else to fine-tune the server.

Currently, I am using your container as a home for folia because of your backup feature and I am not that smart at building containers.

Let me know what you think.

Allow garbage collection selection, additional startup args

I'm currently trying to get a Minecraft server copied over from my Windows desktop to my Unraid NAS that's running a FeedTheBeast modpack. However, the current Docker config does not allow me to set the necessary startup args that are necessary (or at least recommended).

Specifically, the command line I'm currently using is:

java.exe -server -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx6144M -Xms4096M -jar forge-1.12.2-14.23.5.2846-universal.jar nogui

-server, -Xmx, -Xms, -jar, and nogui are all already either configurable or not necessary. However, UseG1GC and UnlockExperimentalVMOptions are not. Additionally, I believe UseG1GC conflicts with the -XX:ParallelGCThreads that is currently getting passed in.

Would it be possible to add the option to set these properly? Or alternatively, adding the option for a CUSTOM_STARTUP_COMMAND variable or similar that, if set, overrides the current startup command?

Change server version

Since there's no way to set the server version via an environmental variable I tried copying the jar I wanted and renamed it to minecraft_server.jar. It gets overwritten with the 1.16.5 version though.

Add Java Version 16 to support upcoming releases

I'm running a local papermc server and this warning started to show up lately:


  • WARNING - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA.
  • PAPER WILL STOP BEING COMPATIBLE WITH THIS VERSION OF
  • JAVA WHEN MINECRAFT 1.17 IS RELEASED.
  • Please update the version of Java you use to run Paper
  • to at least Java 16. When Paper for Minecraft 1.17 is
  • released support for versions of Java before 16 will
  • be dropped.
  • Current Java version: 11.0.10
  • Check this forum post for more information:
  • https://papermc.io/java16

If you would add Java version 16 to list of options, it would be great.

Which would also require changing the available environment variables from

-e JAVA_VERSION=<8|11>

to

-e JAVA_VERSION=<8|11|16>

amongst other things of course.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.