fixing ports and volumes
This commit is contained in:
parent
03d15d0ca2
commit
619433e3d1
3 changed files with 15 additions and 13 deletions
18
Dockerfile
18
Dockerfile
|
@ -2,12 +2,10 @@ 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
|
||||
# Set to TRUE if you want to use the server terminal.
|
||||
# If so, make sure to not start the server with --terminal
|
||||
# and specify an admin in your configuration.
|
||||
ENV CURSES FALSE
|
||||
|
||||
ENV BUILD_PCKGS "build-essential cmake libirrlicht-dev git ca-certificates"
|
||||
ENV LIVE_PCKGS "zlib1g-dev libbz2-dev libncurses-dev libsqlite3-dev \
|
||||
|
@ -26,16 +24,16 @@ RUN git clone --depth 1 https://github.com/minetest/minetest_game.git games/mine
|
|||
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}))
|
||||
RUN make install
|
||||
|
||||
#free up some space
|
||||
# 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
|
||||
VOLUME /home/minetest/.minetest/worlds
|
||||
|
||||
USER minetest
|
||||
CMD /usr/local/bin/minetestserver --terminal --info
|
||||
CMD /usr/local/bin/minetestserver --info
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
## minetest-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
|
||||
|
||||
```bash
|
||||
|
|
|
@ -4,6 +4,7 @@ services:
|
|||
minetest-git:
|
||||
build: .
|
||||
ports:
|
||||
- 30000:30000/udp
|
||||
- "30000:30000/udp"
|
||||
- "30000:30000"
|
||||
volumes:
|
||||
- /home/.minetest/worlds/:/data/minetest/
|
||||
- /data/minetest/:/home/minetest/.minetest/worlds/
|
||||
|
|
Loading…
Reference in a new issue