Merge pull request #3 from linuxserver/alpine

rebase to alpine linux
This commit is contained in:
sparklyballs 2016-11-25 16:18:46 +00:00 committed by GitHub
commit e7c647fb38
10 changed files with 251 additions and 96 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
.git
.gitignore
.github
.gitattributes
READMETEMPLATE.md
README.md

17
.gitattributes vendored Normal file
View File

@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

21
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,21 @@
<!--- Provide a general summary of the issue in the Title above -->
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- If you have an issue with the project, please provide us with the following information -->
<!--- Host OS -->
<!--- Command line users, your run/create command, GUI/Unraid users, a screenshot of your template settings. -->
<!--- Docker log output, docker log <container-name> -->
<!--- Mention if you're using symlinks on any of the volume mounts. -->
<!--- If you have a suggestion or fix for the project, please provide us with the following information -->
<!--- What you think your suggestion brings to the project, or fixes with the project -->
<!--- If it's a fix, would it be better suited as a Pull request to the repo ? -->
## Thanks, team linuxserver.io

15
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,15 @@
<!--- Provide a general summary of your changes in the Title above -->
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- Before submitting a pull request please check the following -->
<!--- That you have made a branch in your fork, we'd rather not merge from your master -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
<!--- -->
## Thanks, team linuxserver.io

43
.gitignore vendored Normal file
View File

@ -0,0 +1,43 @@
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# =========================
# Operating System Files
# =========================
# OSX
# =========================
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

View File

@ -1,85 +1,111 @@
FROM linuxserver/baseimage FROM lsiobase/alpine
MAINTAINER sparklyballs
MAINTAINER Sparklyballs <sparklyballs@linuxserver.io>
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
ENV APTLIST="libbz2-dev lua-socket libleveldb-dev luajit libluajit-5.1-dev libsqlite3-dev \ # environment variables
libcurl4-gnutls-dev libfreetype6-dev libhiredis0.10 libjsoncpp-dev" ENV HOME="/config" \
MINETEST_SUBGAME_PATH="/config/.minetest/games
ENV BUILD_APTLIST="build-essential git-core gettext cmake doxygen libirrlicht-dev libjpeg-dev libxxf86vm-dev libogg-dev libvorbis-dev libopenal-dev zlib1g-dev libgmp-dev libpng12-dev libgl1-mesa-dev libhiredis-dev" # build variables
ARG LDFLAGS="-lintl"
# Set environment variables # install build packages
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 MINETEST_SUBGAME_PATH="/config/.minetest/games" RUN \
apk add --no-cache --virtual=build-dependencies \
bzip2-dev \
cmake \
curl-dev \
doxygen \
g++ \
gcc \
gettext-dev \
git \
gmp-dev \
hiredis-dev \
icu-dev \
irrlicht-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
luajit-dev \
make \
openal-soft-dev \
openssl-dev \
python-dev \
sqlite-dev && \
ENV configOPTS="-DENABLE_GETTEXT=TRUE \ apk add --no-cache --virtual=build-dependencies \
-DENABLE_SOUND=FALSE \ --repository http://nl.alpinelinux.org/alpine/edge/testing \
-DENABLE_LUAJIT=TRUE \ leveldb-dev && \
-DENABLE_CURL=TRUE \
-DENABLE_REDIS=TRUE \
-DENABLE_GETTEXT=TRUE \
-DENABLE_SYSTEM_GMP=TRUE \
-DENABLE_LEVELDB=TRUE \
-DRUN_IN_PLACE=FALSE \
-DBUILD_SERVER=TRUE "
# install runtime packages
apk add --no-cache \
curl \
gmp \
hiredis \
libgcc \
libintl \
libstdc++ \
luajit \
lua-socket \
sqlite \
sqlite-libs && \
# Set the locale apk add --no-cache \
RUN locale-gen en_US.UTF-8 && \ --repository http://nl.alpinelinux.org/alpine/edge/testing \
leveldb && \
# update apt and install build dependencies # compile spatialindex
apt-get update -q && \ git clone https://github.com/libspatialindex/libspatialindex /tmp/spatialindex && \
apt-get install \ cd /tmp/spatialindex && \
--no-install-recommends \ cmake . \
$APTLIST \ -DCMAKE_INSTALL_PREFIX=/usr && \
$BUILD_APTLIST -qy && \ make && \
make install && \
# clone minitest git repository # compile minetestserver
cd /tmp && \ git clone --depth 1 https://github.com/minetest/minetest.git /tmp/minetest && \
git clone --depth 1 https://github.com/minetest/minetest.git && \ cp /tmp/minetest//minetest.conf.example /defaults/minetest.conf && \
cd /tmp/minetest && \ cd /tmp/minetest && \
cp minetest.conf.example /defaults/minetest.conf && \ cmake . \
-DBUILD_CLIENT=0 \
-DBUILD_SERVER=1 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCUSTOM_BINDIR=/usr/bin \
-DCUSTOM_DOCDIR="/usr/share/doc/minetest" \
-DCUSTOM_SHAREDIR="/usr/share/minetest" \
-DENABLE_CURL=1 \
-DENABLE_GETTEXT=1 \
-DENABLE_LEVELDB=1 \
-DENABLE_LUAJIT=1 \
-DENABLE_REDIS=1 \
-DENABLE_SOUND=0 \
-DENABLE_SYSTEM_GMP=1 \
-DRUN_IN_PLACE=0 && \
make && \
make install && \
# build and configure minitest # copy games to temporary folder
cmake . \ mkdir -p \
$configOPTS && \ /defaults/games && \
make && \ cp -pr /usr/share/minetest/games/* /defaults/games/ && \
make install && \
# copy games to temporary folder # fetch additional game from git
mkdir -p /defaults/games && \ git clone --depth 1 https://github.com/minetest/minetest_game.git /defaults/games/minetest && \
cp -pr /usr/local/share/minetest/games/* /defaults/games/ && \
# fetch additional game from git # cleanup
git clone --depth 1 https://github.com/minetest/minetest_game.git /defaults/games/minetest && \ apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# clean build dependencies # add local files
apt-get purge --remove \ COPY root /
$BUILD_APTLIST -qy && \
apt-get autoremove -y && \
# install runtime dependencies (makes sure we haven't deleted needed packages with removal above) # ports and volumes
apt-get install \
--no-install-recommends \
$APTLIST -qy && \
#clean up
cd / && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# add some files
ADD services/ /etc/service/
ADD init/ /etc/my_init.d/
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
# set volume
VOLUME /config/.minetest
# expose port
EXPOSE 30000/udp EXPOSE 30000/udp
VOLUME /config/.minetest

View File

@ -1,33 +1,49 @@
![https://linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png) [linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io
[ircurl]: https://www.linuxserver.io/irc/
[podcasturl]: https://www.linuxserver.io/podcast/
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring easy user mapping and community support. Find us for support at: [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
* [forum.linuxserver.io](https://forum.linuxserver.io)
* [IRC](https://www.linuxserver.io/irc/) on freenode at `#linuxserver.io`
* [Podcast](https://www.linuxserver.io/podcast/) covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
# lsiodev/minetest The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at:
![](https://raw.githubusercontent.com/linuxserver/beta-templates/master/lsiodev/img/minetest-icon.png) * [forum.linuxserver.io][forumurl]
* [IRC][ircurl] on freenode at `#linuxserver.io`
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
Minetest is a near-infinite-world block sandbox game and a game engine, inspired by InfiniMiner, Minecraft, and the like. [Minetest](http://www.minetest.net/) # linuxserver/minetest
[![](https://images.microbadger.com/badges/version/linuxserver/minetest.svg)](https://microbadger.com/images/linuxserver/minetest "Get your own version badge on microbadger.com")[![](https://images.microbadger.com/badges/image/linuxserver/minetest.svg)](http://microbadger.com/images/linuxserver/minetest "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/minetest.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/linuxserver/minetest.svg)][hub][![Build Status](http://jenkins.linuxserver.io:8080/buildStatus/icon?job=Dockers/LinuxServer.io/linuxserver-minetest)](http://jenkins.linuxserver.io:8080/job/Dockers/job/LinuxServer.io/job/linuxserver-minetest/)
[hub]: https://hub.docker.com/r/linuxserver/minetest/
[Minetest][mineurl] (server) is a near-infinite-world block sandbox game and a game engine, inspired by InfiniMiner, Minecraft, and the like.
[![minetest](https://raw.githubusercontent.com/linuxserver/beta-templates/master/lsiodev/img/minetest-icon.png)][mineurl]
[mineurl]: http://www.minetest.net/
## Usage ## Usage
``` ```
docker create --name=minetest -v <path to data>:/config/.minetest \ docker create \
-e PGID=<gid> -e PUID=<uid> -e TZ=<timezone> \ --name=minetest \
-p 30000:30000/udp lsiodev/minetest -v <path to data>:/config/.minetest \
-e PGID=<gid> -e PUID=<uid> \
-p 30000:30000/udp
linuxserver/minetest
``` ```
**Parameters** ## Parameters
`The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container.
So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080
http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.`
* `-p 30000/udp` - the port(s) * `-p 30000/udp` - the port(s)
* `-v /config/.minetest` - where minetest stores config files and maps etc. * `-v /config/.minetest` - where minetest stores config files and maps etc.
* `-e PGID` for GroupID - see below for explanation * `-e PGID` for GroupID - see below for explanation
* `-e PUID` for UserID - see below for explanation * `-e PUID` for UserID - see below for explanation
* `-e TZ` for Timezone setting, eg Europe/London
It is based on phusion-baseimage with ssh removed, for shell access whilst the container is running do `docker exec -it minetest /bin/bash`.
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it minetest /bin/bash`.
### User / Group Identifiers ### User / Group Identifiers
@ -44,17 +60,24 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
You can find the world maps, mods folder and config files in /config/.minetest. You can find the world maps, mods folder and config files in /config/.minetest.
## Info
## Logs and shell
* To monitor the logs of the container in realtime `docker logs -f minetest`.
* Shell access whilst the container is running: `docker exec -it minetest /bin/bash` * Shell access whilst the container is running: `docker exec -it minetest /bin/bash`
* To monitor the logs of the container in realtime: `docker logs -f minetest`
* container version number
`docker inspect -f '{{ index .Config.Labels "build_version" }}' minetest`
* image version number
`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/minetest`
## Versions ## Versions
+ **25.11.2016:** Rebase to alpine linux, move to main repo.
+ **27.02.2016:** Bump to latest version. + **27.02.2016:** Bump to latest version.
+ **19.02.2016:** Change port to UDP, thanks to slashopt for pointing this out. + **19.02.2016:** Change port to UDP, thanks to slashopt for pointing this out.
+ **15.02.2016:** Make minetest app a service. + **15.02.2016:** Make minetest app a service.
+ **01-02-2016:** Add lua-socket dependency. + **01-02-2016:** Add lua-socket dependency.
+ **06.11.2015:** Initial Release. + **06.11.2015:** Initial Release.

View File

@ -1,5 +0,0 @@
#!/bin/bash
if [[ $(cat /etc/timezone) != $TZ ]] ; then
echo "$TZ" > /etc/timezone
exec dpkg-reconfigure -f noninteractive tzdata
fi

View File

@ -1,9 +1,12 @@
#!/bin/bash #!/usr/bin/with-contenv bash
mkdir -p /config/.minetest/games /config/.minetest/mods # make our folders
mkdir -p \
/config/.minetest/games \
/config/.minetest/mods \
/config/.minetest/main-config
if [ ! -f "/config/.minetest/main-config/minetest.conf" ]; then if [ ! -f "/config/.minetest/main-config/minetest.conf" ]; then
mkdir -p /config/.minetest/main-config
cp /defaults/minetest.conf /config/.minetest/main-config/minetest.conf cp /defaults/minetest.conf /config/.minetest/main-config/minetest.conf
fi fi
@ -11,4 +14,6 @@ if [ ! -d "/config/.minetest/games/minimal" ]; then
cp -pr /defaults/games/* /config/.minetest/games/ cp -pr /defaults/games/* /config/.minetest/games/
fi fi
chown -R abc:abc /config/.minetest # permissions
chown -R abc:abc \
/config

View File

@ -1,7 +1,8 @@
#!/bin/bash #!/usr/bin/with-contenv bash
# predefine some variables # predefine some variables
world_part="--world " world_part="--world "
# shellcheck disable=SC2154
world_set=$world world_set=$world
# set world_string variable to use user-defined world or default world. # set world_string variable to use user-defined world or default world.
@ -10,5 +11,8 @@ world_string=" "
else else
world_string=$world_part$world_set world_string=$world_part$world_set
fi fi
exec /sbin/setuser abc minetestserver $world_string --config /config/.minetest/main-config/minetest.conf --port 30000
# shellcheck disable=SC2086
exec \
s6-setuidgid abc minetestserver $world_string \
--config /config/.minetest/main-config/minetest.conf --port 30000