Skip to content

Cubxity/docker-minecraft-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Issues Discord

docker-minecraft-server

Lightweight Docker/container images for Paper-based Minecraft servers.

Running

NOTE: By running the following command, you accept Minecraft's EULA.

WARNING: The following container is ephemeral, meaning any changes made to it will be discarded.

$ docker run --rm -it \
  -e EULA=true \
  -e JVM_OPTS_EXTRA=--add-modules=jdk.incubator.vector \
  -p 25565:25565 \
  ghcr.io/cubxity/minecraft-server:pufferfish-1.19-temurin17-jammy

Note: JVM_OPTS_EXTRA=--add-modules=jdk.incubator.vector is only required for Pufferfish.

  • --rm removes the container on exit
  • -i keeps STDIN open
  • -t allocates a pseudo-TTY
  • -e EULA=true sets the EULA environment variable to true, signifying EULA agreement
  • -p 25565:25565 publish container port 25565 to the host on 0.0.0.0:25565

This image makes use of Aikar's flags by default. The data directory can be found at /data.

Environment Variables

  • MEMORY defaults to 1G
  • INIT_MEMORY Initial memory to allocate to the JVM. Defaults to MEMORY
  • MAX_MEMORY Maximum memory to allocate to the JVM. Defaults to MEMORY
  • JVM_XX_OPTS -XX JVM argument overrides
  • JVM_OPTS JVM arguments (mainly memory) overrides
  • D_OPTS JVM properties overrides
  • JVM_XX_OPTS_EXTRA -XX JVM argument to append
  • JVM_OPTS_EXTRA JVM arguments to append
  • D_OPTS_EXTRA JVM properties to append
  • EULA Signifies that you accept Minecraft's EULA. Accept by setting this variable totrue.

Implementation can be found in start.sh.

Tips: Set environment JVM_OPTS_EXTRA=--add-modules=jdk.incubator.vector to enable vector module for Pufferfish.

Image Variants

This repository provides Eclipse Temurin based container images for Pufferfish, Purpur, and Paper.

⚠️ AdoptOpenJDK (adopt*) and OpenJDK (java*) variants are deprecated in favor of Eclipse Temurin. Support for non-LTS versions may be dropped at any time.

⚠️ Airplane is discontinued. Please use Pufferfish, Paper, or Purpur instead.

Eclipse Temurin Alpine (temurin*-alpine)

Supports linux/amd64.

This image is based on Eclipse Temurin's Alpine image. The image format is suffixed with -temurin<version>-alpine.

Examples:

  • pufferfish-1.19-temurin17-alpine
  • pufferfish-1.19-34-temurin17-alpine

Eclipse Temurin Ubuntu Jammy (temurin*-jammy)

Supports linux/amd64 and linux/arm64.

This image is based on Eclipse Temurin's Ubuntu Jammy Jellyfish image. The image format is suffixed with -temurin<version>-jammy.

Examples:

  • pufferfish-1.19-temurin17-jammy
  • pufferfish-1.19-34-temurin17-jammy