first commit

This commit is contained in:
2025-05-20 12:38:48 -07:00
parent eb601e9ee9
commit 5fa9cf51fe
2 changed files with 53 additions and 0 deletions

31
Dockerfile Normal file
View File

@@ -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" ]

22
files/install_script.sh Normal file
View File

@@ -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