initial commit

This commit is contained in:
leca 2024-09-21 20:14:52 +03:00
parent 7a31522a12
commit 1569b41ba7
4 changed files with 62 additions and 0 deletions

47
Dockerfile Normal file
View File

@ -0,0 +1,47 @@
FROM debian:12
#Update
RUN apt update -y && apt upgrade -y
RUN apt install -y wget curl unzip git g++ make libc6-dev cmake libpng-dev libjpeg-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext libsdl2-dev
#Install minetest
RUN useradd -ms /bin/bash minetest
USER minetest
WORKDIR /home/minetest
RUN git clone --depth 1 https://github.com/minetest/minetest.git minetest-source
RUN mkdir /home/minetest/minetest-source/build
WORKDIR /home/minetest/minetest-source/build
RUN cmake -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE -DENABLE_CURL=ON -DENABLE_CURSES=ON -DENABLE_POSTGRES=ON -DENABLE_SOUND=OFF ..
RUN make -j 6
USER root
WORKDIR /home/minetest/minetest-source/build
RUN make install
#Install game & mods
#Planned to do script for game & mod installation
# USER minetest
# RUN mkdir /home/minetest/.minetest
# WORKDIR /home/minetest/.minetest
# RUN wget https://content.minetest.net/packages/Minetest/minetest_game/releases/27207/download/
# RUN mv index.html minetest_game.zip
# # RUN unzip minetest_game.zip
# # RUN rm minetest_game.zip
# USER root
# RUN mkdir -p /usr/local/share/minetest/games
# RUN mv /home/minetest/.minetest/minetest_game.zip /usr/local/share/minetest/games
# WORKDIR /usr/local/share/minetest/games
# RUN unzip minetest_game.zip
# RUN rm minetest_game.zip
RUN mkdir -p /usr/local/share/minetest/games
USER minetest
EXPOSE 30000/udp
ENTRYPOINT ["/usr/local/bin/minetestserver", "--gameid", "minetest"]
# USER root
# ENTRYPOINT ["/bin/bash"]

10
docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
services:
minetest_server:
build: .
restart: always
network_mode: host
volumes:
- ./data:/use/local/share/minetest
ports:
- "30000:30000/udp"
- "127.0.0.1:30000:30000/tcp"

3
install.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo 1

2
server.env Normal file
View File

@ -0,0 +1,2 @@
SERVER_GAME=""
SERVER_MODS=""