initial commit
This commit is contained in:
commit
03d15d0ca2
3 changed files with 58 additions and 0 deletions
41
Dockerfile
Normal file
41
Dockerfile
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
FROM debian:stretch
|
||||||
|
MAINTAINER Linuro <cpp@zom.bi>
|
||||||
|
EXPOSE 30000
|
||||||
|
|
||||||
|
# Set to false if you don't need the server terminal.
|
||||||
|
# If so, make sure to not start the server with --terminal.
|
||||||
|
ENV CURSES TRUE
|
||||||
|
|
||||||
|
# Number of CPU Cores that the Compiler should NOT use.
|
||||||
|
ENV FREE_CORES 1
|
||||||
|
|
||||||
|
ENV BUILD_PCKGS "build-essential cmake libirrlicht-dev git ca-certificates"
|
||||||
|
ENV LIVE_PCKGS "zlib1g-dev libbz2-dev libncurses-dev libsqlite3-dev \
|
||||||
|
libcurl4-gnutls-dev libfreetype6-dev libgmp-dev libjsoncpp-dev"
|
||||||
|
ENV DEBIAN_FRONTEND non-interactive
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends ${LIVE_PCKGS} ${BUILD_PCKGS}
|
||||||
|
|
||||||
|
|
||||||
|
# This will clone the minetest engine and game repositories.
|
||||||
|
RUN git clone --depth 1 https://github.com/minetest/minetest.git
|
||||||
|
WORKDIR minetest
|
||||||
|
RUN git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
|
||||||
|
|
||||||
|
RUN cmake . -DRUN_IN_PLACE=FALSE -DBUILD_SERVER=TRUE \
|
||||||
|
-DBUILD_CLIENT=FALSE -DCMAKE_BUILD_TYPE=Release -DENABLE_CURSES=${CURSES}
|
||||||
|
|
||||||
|
RUN make install -j$(($(grep processor /proc/cpuinfo | wc -l)-${FREE_CORES}))
|
||||||
|
|
||||||
|
#free up some space
|
||||||
|
RUN apt-get remove -y --autoremove ${BUILD_PCKGS} && \
|
||||||
|
apt-get clean && rm -rf /root/minetest
|
||||||
|
|
||||||
|
RUN useradd minetest -m && \
|
||||||
|
su minetest -c "mkdir -p ~/.minetest/worlds"
|
||||||
|
|
||||||
|
VOLUME /home/.minetest/worlds
|
||||||
|
|
||||||
|
USER minetest
|
||||||
|
CMD /usr/local/bin/minetestserver --terminal --info
|
8
README.md
Normal file
8
README.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
## minetest-git
|
||||||
|
minetest-git is a Dockerfile to build a minetestserver from git.
|
||||||
|
|
||||||
|
### Building and running minetest-git
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
version: "2"
|
||||||
|
|
||||||
|
services:
|
||||||
|
minetest-git:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- 30000:30000/udp
|
||||||
|
volumes:
|
||||||
|
- /home/.minetest/worlds/:/data/minetest/
|
Loading…
Reference in a new issue