Sign inSign up

cmunroe/bukkit

By cmunroe

•Updated 5 months ago

https://gitlab.com/cmunroe/docker-bukkit/

Image
3

100K+

cmunroe/bukkit repository overview

⁠Bukkit, Spigot and Paper Dockerized

pipeline status

https://gitlab.com/cmunroe/docker-bukkit⁠

A Docker Bukkit, Spigot and PaperMC server built on Alpine.

⁠Simple Tags

We rock two different version styles (latest / version number).

example:

Bukkit:

  • cmunroe/bukkit:latest
  • cmunroe/bukkit:1.16.2

Spigot:

  • cmunroe/spigot:latest
  • cmunroe/spigot:1.16.2

PaperMC:

  • cmunroe/papermc:latest
  • cmunroe/papermc:1.16.2

⁠Running the Server

To start the server and accept the EULA in one fell swoop, just pass the EULA=true environment variable to Docker when running the container. I recommend mounting a directory from your host onto ./data in the container to make map and server data persistent.

docker run -it -v ./data:/data -p 25565:25565 -e EULA=true --name mc_server cmunroe/bukkit docker run -it -v ./data:/data -p 25565:25565 -e EULA=true --name mc_server cmunroe/spigot docker run -it -v ./data:/data -p 25565:25565 -e EULA=true --name mc_server cmunroe/papermc

To run in the background (recommended), add the -d flag.

NOTE: At this point in time, the -it flags are strongly recommended as without them, the server appears to try to hog 100% of the CPU. We are working on a solution.

⁠Configuration

You can bring your own existing data + configuration and mount it to the ./data directory when starting the container by using the -v option. You may also pass configuration options as environment variables like so:

docker run -e DIFFICULTY=2 -e MOTD="A non-standard message" -e SPAWN_ANIMALS=false cmunroe/bukkit

This container will only attempt generate a server.properties file if one does not already exist. If you would like to use the configuration tool, be sure that you are not providing a configuration file or that you also set FORCE_CONFIG=true in the environment variables.

⁠Java Memory

To help control memory usage we have InitRAM and MaxRAM enviornmenent variables. These variables are set to 1g and 2g respectively by default. These variables map to -Xms and -Xmx.

If you wish to support more players and plugins, it is highly encourage to increase these variables. You can find more information here: https://minecraft.gamepedia.com/Server/Requirements/Dedicated⁠

⁠Environment Files

Because of the potentially large number of environment variables that you could pass in, you might want to consider using an environment variable file⁠.

Example:

# env.list
ALLOW_NETHER=false
level-seed=123456789
EULA=true

docker run -d -it --env-file env.list -v $(pwd)/data:/data -p 25565:25565 cmunroe/bukkit

⁠List of Environment Variables

A full list of server.properties settings and their corresponding environment variables is included below, along with their defaults

Configuration OptionEnvironment VariableDefault
allow-flightALLOW_FLIGHTfalse
allow-netherALLOW_NETHERtrue
difficultyDIFFICULTY1
enable-command-blockENABLE_COMMAND_BLOCKfalse
enable-queryENABLE_QUERYfalse
enable-rconENABLE_RCONfalse
force-gamemodeFORCE_GAMEMODEfalse
gamemodeGAMEMODE0
generate-structuresGENERATE_STRUCTUREStrue
generator-settingsGENERATOR_SETTINGS
hardcoreHARDCOREfalse
level-nameLEVEL_NAMEworld
level-seedLEVEL_SEED
level-typeLEVEL_TYPEDEFAULT
max-build-heightMAX_BUILD_HEIGHT256
max-playersMAX_PLAYERS20
max-tick-timeMAX_TICK_TIME60000
max-world-sizeMAX_WORLD_SIZE29999984
motdMOTD
network-compression-thresholdNETWORK_COMPRESSION_THRESHOLD256
online-modeONLINE_MODEtrue
op-permission-levelOP_PERMISSION_LEVEL4
player-idle-timeoutPLAYER_IDLE_TIMEOUT0
prevent-proxy-connectionsPREVENT_PROXY_CONNECTIONSfalse
pvpPVPtrue
resource-packRESOURCE_PACK
resource-pack-sha1RESOURCE_PACK_SHA1
server-ipSERVER_IP
server-portSERVER_PORT25565
snooper-enabledSNOOPER_ENABLEDtrue
spawn-animalsSPAWN_ANIMALStrue
spawn-monstersSPAWN_MONSTERStrue
spawn-npcsSPAWN_NPCStrue
view-distanceVIEW_DISTANCE10
white-listWHITE_LISTfalse
enable-jmx-monitoringENABLE_JMX_MONITORINGfalse
rcon.portRCON_PORT25575
query.portQUERY_PORT25565
use-native-transportUSE_NATIVE_TRANSPORTtrue
enable-statusENABLE_STATUStrue
broadcast-rcon-to-opsBROADCAST_RCON_TO_OPStrue
sync-chunk-writesSYNC_CHUNK_WRITEStrue
op-permission-levelOP_PERMISSION_LEVEL4
entity-broadcast-range-percentageENTITY_BROADCAST_RANGE_PERCENTAGE100
rcon.passwordRCON_PASSWORD
rate-limitRATE_LIMIT0
broadcast-console-to-opsBROADCAST_CONSOLE_TO_OPStrue
function-permission-levelFUNCTION_PERMISSION_LEVEL2
enforce-whitelistENFORCE_WHITELISTfalse
resource-pack-sha1RESOURCE_PACK_SHA1
spawn-protectionSPAWN_PROTECTION16

⁠Docker-Compose

services:
  bukkit:
    stdin_open: true
    restart: always
    tty: true
    env_file:
      - env.list
    volumes:
      - './data:/data'
    ports:
      - '25565:25565'
    image: cmunroe/bukkit
    container_name: minecraft

⁠Credits

This was originally based upon https://github.com/bbriggs/docker-bukkit⁠. Modernized by Cameron Munroe to work on gitlab.

Tag summary

Content type

Image

Digest

sha256:cb5f6ec8c…

Size

213.9 MB

Last updated

5 months ago

docker pull cmunroe/bukkit:1.16.1