From 5fa9cf51fee7f7cab738aeea7eff119709f9606e Mon Sep 17 00:00:00 2001 From: fithwum Date: Tue, 20 May 2025 12:38:48 -0700 Subject: [PATCH] first commit --- Dockerfile | 31 +++++++++++++++++++++++++++++++ files/install_script.sh | 22 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Dockerfile create mode 100644 files/install_script.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93fe937 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM fithwum/base-image:debian-bullseye +LABEL maintainer "fithwum" + +# Environment Variables +ENV GAME_PORT_1="" +ENV GAME_PORT_2="" +ENV GAME_PORT_3="" + +# URL's for files +ARG INSTALL_SCRIPT=https://gitlab.fithwum.tech/fithwum/veloren/-/raw/master/files/install_script.sh + +# Install java-17 & Dependencies. +RUN apt-get -y update && apt-get autoclean && apt-get autoremove \ + && apt-get install wget lsb-release -y \ + && apt-get -y update && apt-get -y --fix-broken install \ + && apt-get install -y --no-install-recommends bzip2 jq \ + && rm -rf /var/lib/apt/lists/* \ + && update-ca-certificates -f; + +# Folder creation. +RUN mkdir -p /veloren /veloren-temp \ + && chmod 777 -R /veloren /veloren-temp \ + && chown 99:100 -R /veloren /veloren-temp +ADD "$INSTALL_SCRIPT" /veloren +RUN chmod +x /veloren-temp/install_script.sh + +# Directory where data is stored +VOLUME /veloren + +# Run command +CMD [ "/bin/bash", "./veloren-temp/install_script.sh" ] \ No newline at end of file diff --git a/files/install_script.sh b/files/install_script.sh new file mode 100644 index 0000000..49fc026 --- /dev/null +++ b/files/install_script.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright (c) 2022 fithwum +# All rights reserved + +# Main install (Debian). +# Check for server files and download if needed. + + +# Looking for run-${MC_VERSION}.sh + + +# Set permissions. +chown 99:100 -R /veloren +chmod 777 -R /veloren +sleep 1 + +# Run Minecraft server. +echo " " +echo "INFO ! Starting Minecraft Server $MC_VERSION" +exec /veloren/ --dataPath=/MCserver + +exit \ No newline at end of file