Sign inSign up

bmoorman/minecraft

By bmoorman

•Updated 4 days ago

Minecraft [minecraft.net] on Ubuntu

Image
2

10K+

bmoorman/minecraft repository overview

⁠How to use this image

⁠Docker Run
docker run \
--detach \
--name minecraft \
--restart unless-stopped \
--publish 25565:25565 \
--volume minecraft-data:/var/lib/minecraft \
bmoorman/minecraft:latest
⁠Docker Compose
version: "3.7"
services:
  minecraft:
    image: bmoorman/minecraft:latest
    container_name: minecraft
    restart: unless-stopped
    ports:
      - "25565:25565"
    volumes:
      - minecraft-data:/var/lib/minecraft

volumes:
  minecraft-data:
⁠Environment Variables
VariableDescriptionDefault
TZSets the timezoneAmerica/Denver
MC_VERSIONSets the Minecraft server versionlatest
MC_SERVER_NAMESets an arbitrary java arg for identifying a process - useful when running multiple serversminecraft
MC_MIN_MEMSets the minimum RAM allocated to java1G
MC_MAX_MEMSets the maximum RAM allocated to java2G
MC_JAVA_ARGSSets custom args passed to java<empty>
⁠Paper Environment Variables
VariableDescriptionDefault
MC_PAPERSet to true to enable Paperfalse
MC_PAPER_BUILDSets the Paper build version (if enabled)latest
⁠Fabric Environment Variables
VariableDescriptionDefault
MC_FABRICSet to true to enable Fabricfalse
MC_FABRIC_INSTALLER_VERSIONSets the Fabric installer version (if enabled)latest

All options in eula.txt and server.properties can be updated using environment variables with:

MC_<Key>

Everything should be uppercase, . and - should be replaced by _. For example, if you want to update these settings:

eula=true
level-type=flat
view-distance=16

You would set the following environment variables:

MC_EULA=true
MC_LEVEL_TYPE=flat
MC_VIEW_DISTANCE=16

Tag summary

Content type

Image

Digest

sha256:6276432b5…

Size

162.9 MB

Last updated

4 days ago

docker pull bmoorman/minecraft