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
|
||||||
|
|
@ -19,6 +19,25 @@ Then, open a terminal in this folder and run "mono MinecraftClient.exe".
|
||||||
If you cannot authenticate on Mono, you'll need to run "mozroots --import --ask-remove" once.
|
If you cannot authenticate on Mono, you'll need to run "mozroots --import --ask-remove" once.
|
||||||
If Mono crashes, retry with mono-complete instead of mono-runtime. Use at least Mono v4.0.
|
If Mono crashes, retry with mono-complete instead of mono-runtime. Use at least Mono v4.0.
|
||||||
|
|
||||||
|
Using Docker do the following:
|
||||||
|
```bash
|
||||||
|
# Using HTTPS
|
||||||
|
git clone https://github.com/ORelio/Minecraft-Console-Client.git
|
||||||
|
|
||||||
|
# Using SSH
|
||||||
|
git clone git@github.com:ORelio/Minecraft-Console-Client.git
|
||||||
|
|
||||||
|
cd Minecraft-Console-Client/Docker
|
||||||
|
|
||||||
|
docker build -t minecraft-console-client:latest .
|
||||||
|
# You could also ignore the -v parameter if you dont want to mount the volume that is up to you. If you don't it's harder to edit the .ini file if thats something you want to do
|
||||||
|
docker run -it -v <PATH_ON_YOUR_MASCHINE_TO_MOUNT>:/opt/data minecraft-console-client:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you could login and the Client is running. To detach from the Client but still keep it running in the Background press: `CTRL + P`, `CTRL + Q`.
|
||||||
|
|
||||||
|
To reattach use the `docker attach` command.
|
||||||
|
|
||||||
Using Configuration files & Enabling bots
|
Using Configuration files & Enabling bots
|
||||||
------
|
------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue