From f979b68f38d5adb1741c96ae961216e42df72dca Mon Sep 17 00:00:00 2001 From: Ryan Hecht Date: Tue, 14 May 2024 20:59:17 -0400 Subject: [PATCH 1/2] Setup Docker environment for ShowScriptSandbox --- Dockerfile | 16 ++++++++++++++++ get-latest-showscript.sh | 7 +++++++ get-plugins.sh | 5 +++++ 3 files changed, 28 insertions(+) create mode 100644 Dockerfile create mode 100644 get-latest-showscript.sh create mode 100644 get-plugins.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3d0a5c6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Use a base image that supports Java 8, as required by Paper 1.12.2 +FROM openjdk:8-jre + +# Install necessary dependencies +RUN apt-get update && apt-get install -y wget + +# Create a directory for the Minecraft server +WORKDIR /workspaces/minecraft-server + +# Download and set up the Paper 1.12.2 server +RUN wget https://papermc.io/api/v1/paper/1.12.2/latest/download -O paperclip.jar +RUN java -jar paperclip.jar --nogui + +# Accept the EULA +RUN echo "eula=true" > eula.txt + diff --git a/get-latest-showscript.sh b/get-latest-showscript.sh new file mode 100644 index 0000000..157bc4c --- /dev/null +++ b/get-latest-showscript.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Fetch the latest ShowScript release jar from the GitHub repository +LATEST_RELEASE=$(curl -s https://api.github.com/repos/MCParks/ShowScript/releases/latest | grep -oP '"browser_download_url": "\K(.*)(?=")') + +# Ensure the script saves the downloaded jar to the plugins directory +wget $LATEST_RELEASE -O /workspaces/minecraft-server/plugins/showscript.jar diff --git a/get-plugins.sh b/get-plugins.sh new file mode 100644 index 0000000..97e8650 --- /dev/null +++ b/get-plugins.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Download WorldGuard and WorldEdit plugins +wget https://dev.bukkit.org/projects/worldguard/files/2610618/download -O /workspaces/minecraft-server/plugins/worldguard.jar +wget https://dev.bukkit.org/projects/worldedit/files/2597538/download -O /workspaces/minecraft-server/plugins/worldedit.jar From 27520fee7d3ede0dc97b6bd746b30c4848d5cc6b Mon Sep 17 00:00:00 2001 From: Ryan Hecht Date: Tue, 14 May 2024 21:01:55 -0400 Subject: [PATCH 2/2] update 1.12.2 download --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3d0a5c6..9ddc992 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y wget WORKDIR /workspaces/minecraft-server # Download and set up the Paper 1.12.2 server -RUN wget https://papermc.io/api/v1/paper/1.12.2/latest/download -O paperclip.jar +RUN wget https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar -O paperclip.jar RUN java -jar paperclip.jar --nogui # Accept the EULA