Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from wilfred-dev/add-spigot
Add Minecraft Spigot
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"meta": { | ||
"api_version": 2 | ||
}, | ||
"uid": "minecraft-spigot", | ||
"name": "Minecraft Spigot", | ||
"author": "vilhelm@prytznet.se", | ||
"docker_image": "wilfreddev/java:latest", | ||
"command": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dterminal.jline=false -Dterminal.ansi=true -jar server.jar", | ||
"user": "container", | ||
"stop_command": "stop", | ||
"default_image": true, | ||
"config": { | ||
"files": [ | ||
{ | ||
"filename": "server.properties", | ||
"parser": "properties", | ||
"environment": [ | ||
{ | ||
"config_variable": "server-port", | ||
"environment_variable": "SERVER_PORT", | ||
"value_format": null | ||
} | ||
], | ||
"action": { | ||
"difficulty": "difficulty {}", | ||
"white-list": "whitelist {}" | ||
} | ||
} | ||
] | ||
}, | ||
"installation": { | ||
"docker_image": "wilfreddev/java:latest", | ||
"shell": "/bin/ash", | ||
"script": [ | ||
"apk --no-cache --update add curl jq git", | ||
"mkdir build && cd build", | ||
"curl -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar", | ||
"java -jar BuildTools.jar --rev $MINECRAFT_VERSION", | ||
"mv spigot-*.jar ../server.jar", | ||
"cd ..", | ||
"rm -rf build", | ||
"if [ \"$EULA_ACCEPTANCE\" == \"true\" ]; then", | ||
" echo \"eula=true\" > eula.txt", | ||
"fi", | ||
"curl -o server.properties https://raw.githubusercontent.com/wilfred-dev/images/master/configs/minecraft/standard/server.properties", | ||
"sed -i \"s/{{SERVER_PORT}}/$SERVER_PORT/g\" server.properties", | ||
"chown -R container:container /server" | ||
] | ||
}, | ||
"variables": [ | ||
{ | ||
"prompt": "Which Minecraft version to use during install (has to be supported by Spigot)?", | ||
"variable": "MINECRAFT_VERSION", | ||
"install_only": true, | ||
"default": "latest", | ||
"hidden": false | ||
}, | ||
{ | ||
"prompt": "Do you agree to the Minecraft EULA (https://account.mojang.com/documents/minecraft_eula)?", | ||
"variable": "EULA_ACCEPTANCE", | ||
"install_only": true, | ||
"default": "true", | ||
"hidden": false | ||
} | ||
] | ||
} |