mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add Dockerfile (#1504)
* feat: Add Dockerfile * fix: Download latest version and not a fixed one Using jq we can query the appvoyor api to get the latest jobId
This commit is contained in:
parent
90505dbc4c
commit
fd7a84bc91
3 changed files with 41 additions and 0 deletions
10
Docker/Dockerfile
Normal file
10
Docker/Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
FROM mono:6.12.0
|
||||
|
||||
COPY start-latest.sh /opt/start-latest.sh
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y jq && \
|
||||
mkdir /opt/data && \
|
||||
chmod +x /opt/start-latest.sh
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "-c", "/opt/start-latest.sh"]
|
||||
12
Docker/start-latest.sh
Normal file
12
Docker/start-latest.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd /opt/data || exit 1
|
||||
|
||||
# Get latest Job ID
|
||||
JOB_ID=$(curl -L https://ci.appveyor.com/api/projects/ORelio/minecraft-console-client | jq -r .build.jobs[0].jobId)
|
||||
|
||||
# Download latest version
|
||||
curl -L https://ci.appveyor.com/api/buildjobs/"$JOB_ID"/artifacts/MinecraftClient%2Fbin%2FRelease%2FMinecraftClient.exe --output MinecraftClient.exe
|
||||
|
||||
# Start Client
|
||||
mono MinecraftClient.exe
|
||||
Loading…
Add table
Add a link
Reference in a new issue