fixing ports and volumes

This commit is contained in:
cpp 2018-06-25 14:28:21 +02:00
parent 03d15d0ca2
commit 619433e3d1
3 changed files with 15 additions and 13 deletions

View file

@ -2,12 +2,10 @@ FROM debian:stretch
MAINTAINER Linuro <cpp@zom.bi> MAINTAINER Linuro <cpp@zom.bi>
EXPOSE 30000 EXPOSE 30000
# Set to false if you don't need the server terminal. # Set to TRUE if you want to use the server terminal.
# If so, make sure to not start the server with --terminal. # If so, make sure to not start the server with --terminal
ENV CURSES TRUE # and specify an admin in your configuration.
ENV CURSES FALSE
# 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 BUILD_PCKGS "build-essential cmake libirrlicht-dev git ca-certificates"
ENV LIVE_PCKGS "zlib1g-dev libbz2-dev libncurses-dev libsqlite3-dev \ ENV LIVE_PCKGS "zlib1g-dev libbz2-dev libncurses-dev libsqlite3-dev \
@ -26,7 +24,7 @@ RUN git clone --depth 1 https://github.com/minetest/minetest_game.git games/mine
RUN cmake . -DRUN_IN_PLACE=FALSE -DBUILD_SERVER=TRUE \ RUN cmake . -DRUN_IN_PLACE=FALSE -DBUILD_SERVER=TRUE \
-DBUILD_CLIENT=FALSE -DCMAKE_BUILD_TYPE=Release -DENABLE_CURSES=${CURSES} -DBUILD_CLIENT=FALSE -DCMAKE_BUILD_TYPE=Release -DENABLE_CURSES=${CURSES}
RUN make install -j$(($(grep processor /proc/cpuinfo | wc -l)-${FREE_CORES})) RUN make install
# free up some space # free up some space
RUN apt-get remove -y --autoremove ${BUILD_PCKGS} && \ RUN apt-get remove -y --autoremove ${BUILD_PCKGS} && \
@ -35,7 +33,7 @@ RUN apt-get remove -y --autoremove ${BUILD_PCKGS} && \
RUN useradd minetest -m && \ RUN useradd minetest -m && \
su minetest -c "mkdir -p ~/.minetest/worlds" su minetest -c "mkdir -p ~/.minetest/worlds"
VOLUME /home/.minetest/worlds VOLUME /home/minetest/.minetest/worlds
USER minetest USER minetest
CMD /usr/local/bin/minetestserver --terminal --info CMD /usr/local/bin/minetestserver --info

View file

@ -1,6 +1,9 @@
## minetest-git ## minetest-git
minetest-git is a Dockerfile to build a minetestserver from git. minetest-git is a Dockerfile to build a minetestserver from git.
This conflicts zombi/minetest on Port 30000. If you want to run both,
make sure to let one of it use a different port. It will also use a
present default world at /data/minetest. The World might become
uncompatible with older (stable) Versions of minetest.
### Building and running minetest-git ### Building and running minetest-git
```bash ```bash

View file

@ -4,6 +4,7 @@ services:
minetest-git: minetest-git:
build: . build: .
ports: ports:
- 30000:30000/udp - "30000:30000/udp"
- "30000:30000"
volumes: volumes:
- /home/.minetest/worlds/:/data/minetest/ - /data/minetest/:/home/minetest/.minetest/worlds/