AshDevFr / docker-spigot

MIT License
33 stars 18 forks source link

BuildTools fails to run #13

Closed CodingKoopa closed 5 years ago

CodingKoopa commented 5 years ago

When running a self-built image on an arm64v8 Arch Linux ARM installation, thespigot_init.sh` script fails with the following log:

casper.spigot | Loading BuildTools version: git-BuildTools-6fc608d-96 (#96)
casper.spigot | Java Version: Java 8
casper.spigot | You must run this jar through bash (msysgit)
CodingKoopa commented 5 years ago

The issue was that I didn't have enough memory allocated for Java.

Solved by having this in my Docker Compose file:


services:
  spigot:
    environment:
      # Set the memory bounds for Java. It is very important to note that this memory allocation will not only be used
      # for buildtools, but also the creation of the mapped JAR. Therefore, if you pick as much memory
      # as is available, the JVM will allocate that, but there won't be any left for the Minecraft server JAR
      # when it's being created. This has to be small enough that the Spigot JAR can be created under these conditions,
      # but large enough that buildtools is able to run.
      # In my experience, 700MB is too little for buildtools to even start, and 1GB is too much for the mappping to
      # take place.
      JVM_OPTS: "-Xmx800MB -Xms800MB"