File tree Expand file tree Collapse file tree 2 files changed +26
-10
lines changed
Expand file tree Collapse file tree 2 files changed +26
-10
lines changed Original file line number Diff line number Diff line change 1- FROM mono:6.12.0
1+ # Using the .NET official image for .NET 6.0
2+ FROM mcr.microsoft.com/dotnet/sdk:6.0
23
4+ # If you want to use a specific build, un-comment the ENV MCC_VERSION line (remove the # from the start)
5+ # Then replace the <version> with a version of your choice (Example: MCC_VERSION=20220817-29)
6+ # ENV MCC_VERSION=<version>
7+
8+ # Copy over the script and give it execution permissions
39COPY start-latest.sh /opt/start-latest.sh
10+ RUN chmod +x /opt/start-latest.sh
411
512RUN apt-get update && \
6- apt-get install -y jq && \
7- mkdir /opt/data && \
8- chmod +x /opt/start-latest.sh
13+ apt-get install -y unzip && \
14+ mkdir /opt/data
915
1016ENTRYPOINT ["/bin/sh" , "-c" , "/opt/start-latest.sh" ]
Original file line number Diff line number Diff line change 22
33cd /opt/data || exit 1
44
5- # Get latest release tag
6- RELEASE_TAG=$( curl -s -v https://github.com/MCCTeam/Minecraft-Console-Client/releases/latest 2>&1 | grep -i location: | tr -d ' \r' | cut -d/ -f8)
5+ # Use the provided version tag or get the latest release tag
6+ RELEASE_TAG=${MCC_VERSION :- $ (curl -s -v https:// github.com/ MCCTeam/ Minecraft-Console-Client/ releases/ latest 2>&1 | grep -i location: | tr -d ' \r' | cut -d/ -f8)}
77
8- # Download latest version
9- curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG} /MinecraftClient.exe --output MinecraftClient.exe
8+ # Delete the old build
9+ [ -e MinecraftClient-linux.zip ] && rm -- MinecraftClient-linux.zip
10+ [ -e MinecraftClient ] && rm -- MinecraftClient
1011
11- # Start Client
12- mono MinecraftClient.exe
12+ # Download the specified build or the latest one
13+ curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG} /MinecraftClient-linux.zip --output MinecraftClient-linux.zip
14+
15+ # Unzip it
16+ unzip MinecraftClient-linux.zip
17+
18+ # Remove the ZIP
19+ rm -- MinecraftClient-linux.zip
20+
21+ # Start the Client
22+ ./MinecraftClient
You can’t perform that action at this time.
0 commit comments