mirror of
https://github.com/pelican-eggs/minecraft.git
synced 2024-11-25 04:12:28 +01:00
Modify installer container image
The installer image has been changed over to a slim version of Debian 12 instead of the prevously (by error) used Java EA image.
This commit is contained in:
parent
ed007d5512
commit
f1ccdfafa1
@ -4,7 +4,7 @@
|
|||||||
"version": "PTDL_v2",
|
"version": "PTDL_v2",
|
||||||
"update_url": null
|
"update_url": null
|
||||||
},
|
},
|
||||||
"exported_at": "2024-03-06T20:31:01+01:00",
|
"exported_at": "2024-03-06T21:55:56+01:00",
|
||||||
"name": "NeoForge",
|
"name": "NeoForge",
|
||||||
"author": "glorantv@icloud.com",
|
"author": "glorantv@icloud.com",
|
||||||
"description": "NeoForge Server. NeoForge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other. NeoForge is a fork of Minecraft Forge.",
|
"description": "NeoForge Server. NeoForge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other. NeoForge is a fork of Minecraft Forge.",
|
||||||
@ -29,8 +29,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"installation": {
|
"installation": {
|
||||||
"script": "#!\/bin\/bash\n# NeoForge Installation Script\n#\n# Server Files: \/mnt\/server\n\napt-get update\napt-get install -y curl xq\n\nif [[ ! -d \/mnt\/server ]]; then\n mkdir \/mnt\/server\nfi\n\ncd \/mnt\/server\n\n# Remove spaces from the version number to avoid issues with curl\nNEOFORGE_VERSION=\"$(echo \"$NEOFORGE_VERSION\" | tr -d ' ')\"\nMC_VERSION=\"$(echo \"$MC_VERSION\" | tr -d ' ')\"\n\n# If we have a specific NeoForge version set, use that\nif [[ ! -z ${NEOFORGE_VERSION} ]]; then\n # The 1.20.1 release lives in a different repository and is called \"forge\" instead of \"neoforge\"\n if [[ \"${NEOFORGE_VERSION}\" =~ \"1.20.1-\" ]]; then\n DOWNLOAD_LINK=https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/forge\/${NEOFORGE_VERSION}\/forge-${NEOFORGE_VERSION}\n ARTIFACT_NAME=\"forge\"\n else\n DOWNLOAD_LINK=https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/neoforge\/${NEOFORGE_VERSION}\/neoforge-${NEOFORGE_VERSION}\n ARTIFACT_NAME=\"neoforge\"\n fi\nelse\n # For NeoForge, downloading based on a Minecraft version is done by using the Maven metadata.\n # 1.20.1 is also handled differently here, because it's in a different repository and is called\n # \"forge\" instead of \"neoforge\".\n if [[ \"${MC_VERSION}\" == \"1.20.1\" ]]; then\n XML_DATA=$(curl -sSL https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/forge\/maven-metadata.xml)\n ARTIFACT_NAME=\"forge\"\n NEOFORGE_OLD=1\n else\n XML_DATA=$(curl -sSL https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/neoforge\/maven-metadata.xml)\n ARTIFACT_NAME=\"neoforge\"\n fi\n\n REPO_URL=\"https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/${ARTIFACT_NAME}\/\"\n\n # Get the latest version of Minecraft NeoForge supports. Here XML_DATA contains the metadata for\n # the new, \"neoforge\" repository, which is good since 1.20.1 will never be the latest anymore.\n if [[ \"${MC_VERSION}\" == \"latest\" ]] || [[ \"${MC_VERSION}\" == \"\" ]]; then\n echo \"Getting latest version of NeoForge.\"\n MC_VERSION=\"1.$(echo -e ${XML_DATA} | xq -x '\/metadata\/versioning\/release' | cut -d'.' -f1-2)\"\n fi\n\n echo \"Minecraft version: ${MC_VERSION}\"\n\n if [[ -z \"${NEOFORGE_OLD}\" ]]; then\n # For modern artifacts we cut the \"1.\" from the Minecraft version, and search for that\n VERSION_KEY=$(echo -n ${MC_VERSION} | cut -d'.' -f2-)\n else\n # For 1.20.1, it uses the same naming scheme as Forge, so we just append a dash\n VERSION_KEY=\"${MC_VERSION}-\"\n fi\n\n # Then we extract the latest the latest NeoForge version available based on the Maven metadata\n NEOFORGE_VERSION=$(echo -e ${XML_DATA} | xq -x \"(\/metadata\/versioning\/versions\/*[starts-with(text(), '${VERSION_KEY}')])\" | tail -n1)\n if [[ -z \"${NEOFORGE_VERSION}\" ]]; then\n echo \"The install failed, because there is no valid version of NeoForge for the version of Minecraft selected.\"\n exit 1\n fi\n\n echo \"NeoForge version: ${NEOFORGE_VERSION}\"\n\n DOWNLOAD_LINK=\"${REPO_URL}${NEOFORGE_VERSION}\/${ARTIFACT_NAME}-${NEOFORGE_VERSION}\"\nfi\n\necho \"Downloading NeoForge version ${NEOFORGE_VERSION}\"\necho \"Download link is ${DOWNLOAD_LINK}\"\n\n# Check if the download link we generated is valid\nif [[ ! -z \"${DOWNLOAD_LINK}\" ]]; then\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then\n echo -e \"Installer jar download link is valid.\"\n else\n echo -e \"Link is invalid. Exiting now\"\n exit 2\n fi\nelse\n echo -e \"No download link provided. Exiting now\"\n exit 3\nfi\n\n# If so, go ahead and download the installer\ncurl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar\n\nif [[ ! -f .\/installer.jar ]]; then\n echo \"!!! Error downloading NeoForge version ${NEOFORGE_VERSION} !!!\"\n exit 4\nfi\n\n# Delete args to support downgrading\/upgrading\nrm -rf libraries\/net\/neoforged\/${ARTIFACT_NAME}\nrm unix_args.txt\n\n# Installing server\necho -e \"Installing NeoForge server.\\n\"\njava -jar installer.jar --installServer || {\n echo -e \"\\nInstall failed using NeoForge version ${NEOFORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}.\"\n echo -n \"Should you be using unlimited memory value of 0, make sure to increase the default install resource limits in the Wings\"\n echo \"config or specify exact allocated memory in the server Build Configuration instead of 0!\"\n echo \"Otherwise, the NeoForge installer will not have enough memory.\";\n exit 5;\n}\n\n# Symlink the startup arguments to the server directory\nln -sf libraries\/net\/neoforged\/${ARTIFACT_NAME}\/*\/unix_args.txt unix_args.txt\n\n# And finally clean up\necho -e \"Deleting installer.jar file.\\n\"\nrm -rf installer.jar\n\necho \"Installation process is completed!\"",
|
"script": "#!\/bin\/bash\n# NeoForge Installation Script\n#\n# Server Files: \/mnt\/server\n\napt-get update\napt-get install -y curl xq openjdk-17-jdk\n\nif [[ ! -d \/mnt\/server ]]; then\n mkdir \/mnt\/server\nfi\n\ncd \/mnt\/server\n\n# Remove spaces from the version number to avoid issues with curl\nNEOFORGE_VERSION=\"$(echo \"$NEOFORGE_VERSION\" | tr -d ' ')\"\nMC_VERSION=\"$(echo \"$MC_VERSION\" | tr -d ' ')\"\n\n# If we have a specific NeoForge version set, use that\nif [[ ! -z ${NEOFORGE_VERSION} ]]; then\n # The 1.20.1 release lives in a different repository and is called \"forge\" instead of \"neoforge\"\n if [[ \"${NEOFORGE_VERSION}\" =~ \"1.20.1-\" ]]; then\n DOWNLOAD_LINK=https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/forge\/${NEOFORGE_VERSION}\/forge-${NEOFORGE_VERSION}\n ARTIFACT_NAME=\"forge\"\n else\n DOWNLOAD_LINK=https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/neoforge\/${NEOFORGE_VERSION}\/neoforge-${NEOFORGE_VERSION}\n ARTIFACT_NAME=\"neoforge\"\n fi\nelse\n # For NeoForge, downloading based on a Minecraft version is done by using the Maven metadata.\n # 1.20.1 is also handled differently here, because it's in a different repository and is called\n # \"forge\" instead of \"neoforge\".\n if [[ \"${MC_VERSION}\" == \"1.20.1\" ]]; then\n XML_DATA=$(curl -sSL https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/forge\/maven-metadata.xml)\n ARTIFACT_NAME=\"forge\"\n NEOFORGE_OLD=1\n else\n XML_DATA=$(curl -sSL https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/neoforge\/maven-metadata.xml)\n ARTIFACT_NAME=\"neoforge\"\n fi\n\n REPO_URL=\"https:\/\/maven.neoforged.net\/releases\/net\/neoforged\/${ARTIFACT_NAME}\/\"\n\n # Get the latest version of Minecraft NeoForge supports. Here XML_DATA contains the metadata for\n # the new, \"neoforge\" repository, which is good since 1.20.1 will never be the latest anymore.\n if [[ \"${MC_VERSION}\" == \"latest\" ]] || [[ \"${MC_VERSION}\" == \"\" ]]; then\n echo \"Getting latest version of NeoForge.\"\n MC_VERSION=\"1.$(echo -e ${XML_DATA} | xq -x '\/metadata\/versioning\/release' | cut -d'.' -f1-2)\"\n fi\n\n echo \"Minecraft version: ${MC_VERSION}\"\n\n if [[ -z \"${NEOFORGE_OLD}\" ]]; then\n # For modern artifacts we cut the \"1.\" from the Minecraft version, and search for that\n VERSION_KEY=$(echo -n ${MC_VERSION} | cut -d'.' -f2-)\n else\n # For 1.20.1, it uses the same naming scheme as Forge, so we just append a dash\n VERSION_KEY=\"${MC_VERSION}-\"\n fi\n\n # Then we extract the latest the latest NeoForge version available based on the Maven metadata\n NEOFORGE_VERSION=$(echo -e ${XML_DATA} | xq -x \"(\/metadata\/versioning\/versions\/*[starts-with(text(), '${VERSION_KEY}')])\" | tail -n1)\n if [[ -z \"${NEOFORGE_VERSION}\" ]]; then\n echo \"The install failed, because there is no valid version of NeoForge for the version of Minecraft selected.\"\n exit 1\n fi\n\n echo \"NeoForge version: ${NEOFORGE_VERSION}\"\n\n DOWNLOAD_LINK=\"${REPO_URL}${NEOFORGE_VERSION}\/${ARTIFACT_NAME}-${NEOFORGE_VERSION}\"\nfi\n\necho \"Downloading NeoForge version ${NEOFORGE_VERSION}\"\necho \"Download link is ${DOWNLOAD_LINK}\"\n\n# Check if the download link we generated is valid\nif [[ ! -z \"${DOWNLOAD_LINK}\" ]]; then\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then\n echo -e \"Installer jar download link is valid.\"\n else\n echo -e \"Link is invalid. Exiting now\"\n exit 2\n fi\nelse\n echo -e \"No download link provided. Exiting now\"\n exit 3\nfi\n\n# If so, go ahead and download the installer\ncurl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar\n\nif [[ ! -f .\/installer.jar ]]; then\n echo \"!!! Error downloading NeoForge version ${NEOFORGE_VERSION} !!!\"\n exit 4\nfi\n\n# Delete args to support downgrading\/upgrading\nrm -rf libraries\/net\/neoforged\/${ARTIFACT_NAME}\nrm unix_args.txt\n\n# Installing server\necho -e \"Installing NeoForge server.\\n\"\njava -jar installer.jar --installServer || {\n echo -e \"\\nInstall failed using NeoForge version ${NEOFORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}.\"\n echo -n \"Should you be using unlimited memory value of 0, make sure to increase the default install resource limits in the Wings\"\n echo \"config or specify exact allocated memory in the server Build Configuration instead of 0!\"\n echo \"Otherwise, the NeoForge installer will not have enough memory.\";\n exit 5;\n}\n\n# Symlink the startup arguments to the server directory\nln -sf libraries\/net\/neoforged\/${ARTIFACT_NAME}\/*\/unix_args.txt unix_args.txt\n\n# And finally clean up\necho -e \"Deleting installer.jar file.\\n\"\nrm -rf installer.jar\n\necho \"Installation process is completed!\"",
|
||||||
"container": "openjdk:23-ea-8-jdk-slim-bookworm",
|
"container": "debian:12-slim",
|
||||||
"entrypoint": "bash"
|
"entrypoint": "bash"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user