Skip to content

Docker images for Minecraft for use in Pterodactyl panel

Notifications You must be signed in to change notification settings

mikroskeem/minecraft-containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Minecraft containers

Quay build status

Discord

Minecraft Docker images for use in Pterodactyl panel

Note that this image is not recommended for public consumption/hosting services, because it is insecure (see features below)

Features

  • Drop-in replacement to Pterodactyl's own Java images.
  • Based on AdoptOpenJDK JVM Debian Docker images
    • Debian is used because of better out of box support with JNI libraries
  • Supplies jemalloc
  • Supplies mimalloc
  • Ability to source a custom script before server boot
    • This feature is used mainly to set LD_PRELOAD to either mimalloc or jemalloc, and/or update server jar.
    • NOTE: this feature cannot be disabled without editing the entrypoint script. Allowing this for untrusted users might create unwanted situations.
  • Ability to execute shell, instead of server (to manage files using a shell, for example)
    • NOTE: see above

Flavours:

  • Java 8 OpenJDK - quay.io/mikroskeem/minecraft-containers:adoptopenjdk-8
  • Java 8 OpenJ9 - quay.io/mikroskeem/minecraft-containers:adoptopenjdk-8-openj9
  • Java 11 OpenJDK - quay.io/mikroskeem/minecraft-containers:adoptopenjdk-11
  • Java 11 OpenJ9 - quay.io/mikroskeem/minecraft-containers:adoptopenjdk-11-openj9

Usage

Using this image instead of Pterodactyl's

Under server's administrative config, pick Startup tab, scroll down to Docker Container Configuration and fill in the Docker image name (see Flavours sub-topic)

jemalloc and mimalloc

jemalloc is installed to /opt/jemalloc/libjemalloc.so
mimalloc is installed to /opt/mimalloc/libmimalloc.so

I provide both because either of them are better in Minecraft-related workloads than glibc's default malloc(3) implementation. While I don't have exact results around nor I don't know how to measure their effectiveness scientifically, then I'll leave deciding which is better to the end user 😄

To utilize jemalloc or mimalloc, create a custom script (see next sub-topic) with following line:
export LD_PRELOAD=/path/to/lib.so

Custom script

Create a file named .env in server root, it will be sourced.

Note that entrypoint script is ran by /bin/sh, which is Dash shell. It is not compatible with so-called bashisms, thus you must make your .env script compatible with Dash.

Debug shell

Create a file named .debugshell in server root. A shell will be executed instead of server, if it is present, remove it to prevent starting up the shell next time.

About

Docker images for Minecraft for use in Pterodactyl panel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages