diff --git a/Docker/Dockerfile b/Docker/Dockerfile new file mode 100644 index 00000000..a2f09634 --- /dev/null +++ b/Docker/Dockerfile @@ -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"] \ No newline at end of file diff --git a/Docker/start-latest.sh b/Docker/start-latest.sh new file mode 100644 index 00000000..6c4ff3b0 --- /dev/null +++ b/Docker/start-latest.sh @@ -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 \ No newline at end of file diff --git a/MinecraftClient/config/README.md b/MinecraftClient/config/README.md index faf40044..56a0379a 100644 --- a/MinecraftClient/config/README.md +++ b/MinecraftClient/config/README.md @@ -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 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 :/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 ------