A vanilla Minecraft server in Docker.
docker run --rm -it -e MC_EULA_ACCEPT=true \
-p 25565:25565 \
markcaudill/minecraft:1.17
Place JSON data in environment variables: MC_BANNED_IPS_JSON
, MC_BANNED_PLAYERS_JSON
, MC_OPS_JSON
, MC_WHITELIST_JSON
Example: -e MC_OPS_JSON='[{"uuid":"abcdef","name":"fakeuser","level":"4"}]'
or -e MC_WHITELIST_JSON=$(<whitelist.json)
if you already have a local JSON file you'd like to use.
These variables are used to populate their corresponding parameters in the server.properties
file.
MC_SERVER_ALLOW_FLIGHT
, MC_SERVER_ALLOW_NETHER
, MC_SERVER_BROADCAST_CONSOLE_TO_OPS
, MC_SERVER_BROADCAST_RCON_TO_OPS
, MC_SERVER_DIFFICULTY
, MC_SERVER_ENABLE_COMMAND_BLOCK
, MC_SERVER_ENABLE_JMX_MONITORING
, MC_SERVER_ENABLE_QUERY
, MC_SERVER_ENABLE_RCON
, MC_SERVER_ENABLE_STATUS
, MC_SERVER_ENFORCE_WHITELIST
, MC_SERVER_ENTITY_BROADCAST_RANGE_PERCENTAGE
, MC_SERVER_FORCE_GAMEMODE
, MC_SERVER_FUNCTION_PERMISSION_LEVEL
, MC_SERVER_GAMEMODE
, MC_SERVER_HARDCORE
, MC_SERVER_JAR_DL
, MC_SERVER_LEVEL_NAME
, MC_SERVER_MAX_PLAYERS
, MC_SERVER_MAX_TICK_TIME
, MC_SERVER_MAX_WORLD_SIZE
, MC_SERVER_MOTD
, MC_SERVER_NETWORK_COMPRESSION_THRESHOLD
, MC_SERVER_ONLINE_MODE
, MC_SERVER_OP_PERMISSION_LEVEL
, MC_SERVER_PLAYER_IDLE_TIMEOUT
, MC_SERVER_PREVENT_PROXY_CONNECTIONS
, MC_SERVER_PVP
, MC_SERVER_QUERY_PORT
, MC_SERVER_RATE_LIMIT
, MC_SERVER_RCON_PASSWORD
, MC_SERVER_RCON_PORT
, MC_SERVER_REQUIRE_RESOURCE_PACK
, MC_SERVER_RESOURCE_PACK
, MC_SERVER_RESOURCE_PACK_PROMPT
, MC_SERVER_RESOURCE_PACK_SHA
, MC_SERVER_SERVER_IP
, MC_SERVER_SERVER_PORT
, MC_SERVER_SNOOPER_ENABLED
, MC_SERVER_SPAWN_ANIMALS
, MC_SERVER_SPAWN_MONSTERS
, MC_SERVER_SPAWN_NPCS
, MC_SERVER_SPAWN_PROTECTION
, MC_SERVER_SYNC_CHUNK_WRITES
, MC_SERVER_TEXT_FILTERING_CONFIG
, MC_SERVER_USE_NATIVE_TRANSPORT
, MC_SERVER_VIEW_DISTANCE
, MC_SERVER_WHITE_LIST