From cf594f84cce481a8fa9e90e76208dfff609ef294 Mon Sep 17 00:00:00 2001 From: Niklas Date: Sat, 8 May 2021 23:40:32 +0200 Subject: [PATCH] initial commit --- .drone.yml | 8 ++++++++ Dockerfile | 28 ++++++++++++++++++++++++++++ README.md | 10 ++++++++++ docker-compose.yml | 8 ++++++++ start.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 96 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml create mode 100755 start.sh diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..61e4382 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,8 @@ +kind: pipeline +name: default +steps: +- name: docker + image: plugins/docker + settings: + repo: docker.kapelle.org/red + registry: docker.kapelle.org diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3f94a82 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM java + +EXPOSE 25565 +VOLUME /data + +# Prepare +RUN mkdir /minecraft && \ + mkdir -p /data + + # useradd -ms /bin/bash minecraft && \ + # chown minecraft /minecraft && \ + # chown minecraft /data + +# USER minecraft + +WORKDIR /minecraft + +# Download files +RUN wget https://media.forgecdn.net/files/3255/643/RAD-Serverpack-1.45.zip + +# Unpack +RUN unzip RAD-Serverpack-1.45.zip -d . && \ + cp -r RAD-Serverpack-1.45/* . && \ + rm -r RAD-Serverpack-1.45.zip RAD-Serverpack-1.45 + +COPY start.sh /minecraft/start.sh + +ENTRYPOINT /minecraft/start.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..37b1cb4 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Roguelike Adventures and Dungeons for Docker +Docker image for [Roguelike Adventures and Dungeons](https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons/files/3255643) + +Curent version: 1.45 + +An example [docker-compose.yml](docker-compose.yml) is given. + +# Update image + +Checkout [curseforge](https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons/files/3255643) for new versions. Update the download URL and the filename in the `Dockerfile`. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a3bb607 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.8" +services: + rad-server: + build: . + ports: + - 25565:25565 + volumes: + - ./data:/data \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..3fdf4f7 --- /dev/null +++ b/start.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +set -e + +ls -la +ls -la /data + +toLinkedFiles=( + LaunchServer.sh + README-howto.txt + forge-1.12.2-14.23.5.2854.jar + libraries + llibrary + minecraft_server.1.12.2.jar + mods + scripts + structures +) + +toCoptFiles=( + config + options.txt + server.properties +) + +chmod +x LaunchServer.sh + +for linkedFile in "${toLinkedFiles[@]}" +do + [ -f /data/$linkedFile ] || ln -s /minecraft/$linkedFile /data/$linkedFile +done + +for copyedFile in "${toCoptFiles[@]}" +do + [ -f /data/$copyedFile ] || cp -r /minecraft/$copyedFile /data/$copyedFile +done + +echo "eula=true" > /data/eula.txt + +cd /data + +./LaunchServer.sh