From e5a875888b39cbf6aace70d01e2ec12da63b3c60 Mon Sep 17 00:00:00 2001 From: bvn13 Date: Sat, 7 Dec 2024 00:46:42 +0300 Subject: [PATCH] working server --- Dockerfile | 28 ++++++++++++++++++++++++++-- docker-compose.yaml | 3 ++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d1a3f71..80cf71b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,27 @@ -FROM lscr.io/linuxserver/minetest:latest +# https://github.com/minetest/minetest/blob/master/Dockerfile -RUN apk add luajit lua-socket lua-cjson +FROM ghcr.io/linuxserver/minetest:latest + +ARG no-cache cached + +RUN apk add --no-cache luajit lua5.1-socket + +#RUN echo "#!/usr/bin/env bash" > /usr/local/bin/ipv4 +#RUN echo "ifconfig | grep -A 1 eth0 | tail -n 1 | awk '{ print \$2 }' | sed 's/addr://'" >> /usr/local/bin/ipv4 +#RUN chmod o+x /usr/local/bin/ipv4 + +RUN echo "#!/usr/bin/env bash" > /usr/local/bin/start_luanti +#RUN echo "export IPV4=\$(/usr/local/bin/ipv4)" >> /usr/local/bin/start_luanti +#RUN echo "echo \$IPV4" >> /usr/local/bin/start_luanti +RUN echo "/usr/bin/luantiserver --config /config/.minetest/main-config/minetest.conf" >> /usr/local/bin/start_luanti +RUN chmod o+x /usr/local/bin/start_luanti + +ENTRYPOINT ["/usr/local/bin/start_luanti"] + +#RUN echo "#!/usr/bin/env bash" > /usr/bin/app +#RUN echo "for ((;;))" >> /usr/bin/app +#RUN echo "do" >> /usr/bin/app +#RUN echo "sleep 1" >> /usr/bin/app +#RUN echo "done" >> /usr/bin/app +#RUN chmod o+x /usr/bin/app +#ENTRYPOINT ["bash", "/usr/bin/app"] diff --git a/docker-compose.yaml b/docker-compose.yaml index dd5c2c8..3e977c2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,6 @@ services: minetest-server: - #image: lscr.io/linuxserver/minetest:latest + #image: ghcr.io/linuxserver/minetest:latest build: ./ container_name: minetest-server deploy: @@ -17,6 +17,7 @@ services: PGID: '1000' CLI_ARGS: '--gameid minetest_game --port 30000' ports: + - 29999:29999 - 30000:30000/udp volumes: - ${DATA}:/config/.minetest/