luanti-server-programmable/Dockerfile

29 lines
1.1 KiB
Docker
Raw Permalink Normal View History

2024-12-07 00:46:42 +03:00
# https://github.com/minetest/minetest/blob/master/Dockerfile
2024-12-02 01:05:34 +03:00
2024-12-07 00:46:42 +03:00
FROM ghcr.io/linuxserver/minetest:latest
2024-12-07 23:22:07 +03:00
#ARG GAME_NAME
#ENV CLI_ARGS="--gameid $GAME_NAME"
2024-12-07 00:46:42 +03:00
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
2024-12-07 23:22:07 +03:00
RUN echo "/usr/bin/luantiserver --config /config/.minetest/main-config/minetest.conf --gameid \$GAME_NAME --worldname \$GAME_NAME" >> /usr/local/bin/start_luanti
2024-12-07 00:46:42 +03:00
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"]