Results 1 to 3 of 3

Thread: Simple MOHAA/SH Docker image

  1. #1
    Client Beta Testers Appelpitje's Avatar
    Join Date
    Jan 2012
    Location
    Belgium
    Posts
    536

    Default Simple MOHAA/SH Docker image

    Hello guys,

    Since Leyok pushed me into Docker, i have created a simple MOHAA/SH docker image.
    The repository can be found here: https://hub.docker.com/r/appelpitje/mohaa

    How it works:
    You can view the dockerfile here: https://hub.docker.com/r/appelpitje/mohaa/dockerfile

    Or here:
    FROM debian:10-slim
    LABEL maintainer "Appelpitje"
    LABEL Description="MOHAA Server docker image" Version="0.1"

    RUN dpkg --add-architecture i386
    RUN apt-get update
    RUN apt-get -y install curl ca-certificates openssl git tar bash sqlite fontconfig libstdc++5 libstdc++5:i386 wget bzip2

    RUN adduser --disabled-password --home /home/container container

    USER container
    ENV USER=container HOME=/home/container

    WORKDIR /home/container

    RUN wget -O MOHAA_MINI_SERVER.tar.bz2 https://appelpitje.be/download/MOHAA...SERVER.tar.bz2
    RUN tar -xjf MOHAA_MINI_SERVER.tar.bz2
    RUN rm -f MOHAA_MINI_SERVER.tar.bz2

    RUN chown -R container:container MOHAA_minisvr

    WORKDIR /home/container/MOHAA_minisvr

    RUN chmod 777 spearhead_lnxded && chmod 777 mainta/fgameded.so

    CMD ./spearhead_lnxded +set dedicated 1 +exec server.cfg

    EXPOSE 12300/udp
    EXPOSE 12203/udp
    EXPOSE 12203/tcp


    The docker file above will first download a minified MOHAA+SH linux server build and will auto start a spearhead server. (Maybe i should remove this option for AA players)


    How to use it:

    1. Pull the image:
    Code:
    docker pull appelpitje/mohaa
    2. Run and create a container:
    Code:
    sudo docker run -t -p 12203:12203/udp -p 12203:12203/tcp -d appelpitje/mohaa:latest
    3. Success! Setting up a SH server without any game panel was never so easy!
    Code:
    CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                     PORTS                                                                                                    NAMES
    9f943cf39340        appelpitje/mohaa:latest   "/bin/sh -c './spear…"   11 days ago         Up 11 days                 0.0.0.0:12203->12203/tcp, 0.0.0.0:12203->12203/udp, 0.0.0.0:12300->12300/tcp, 0.0.0.0:12300->12300/udp   nervous_spence
    According to dockerhub, the image is only 454.21MB!
    I have used a user called container since im willing to implement this image into Pterodactyl Game panel that uses docker to spawn game servers.
    This image can be optimised a lot, now it downloads AA+SH, later i will make it so that you can choose per tag for AA or SH then the docker container will be smaller. Also mounts should be defined to keep your server.cfg and pk3 mods.
    Im still working on the image in the background whenever i have free time, add any ideas here.
    Last edited by Appelpitje; November 2nd, 2019 at 06:42 AM.

  2. #2

    Default

    I heard a just a little about docker before. it looks like a very useful piece of software

    What I'm not sure to understand is:
    Are docker apps supposed to work on Linux, Windows and Mac, seamlessly? (install Docker -> setup the container and you are done?)
    or is this for Linux only?

    and correct me if I'm wrong or missing something, but AFAIK, moh servers don't use tcp ports (at least I never had to open them)

    btw, xcode tags supports dockerfile code: [xcode=docker] or [xcode=dockerfile]

  3. #3
    Client Beta Testers Appelpitje's Avatar
    Join Date
    Jan 2012
    Location
    Belgium
    Posts
    536

    Default

    Quote Originally Posted by Zappa View Post
    What I'm not sure to understand is:
    Are docker apps supposed to work on Linux, Windows and Mac, seamlessly? (install Docker -> setup the container and you are done?)
    or is this for Linux only?
    Yes, it runs on all OSes, i developed it on Macos and run it on a Linux server. It should work on windows as well.

    Quote Originally Posted by Zappa View Post
    and correct me if I'm wrong or missing something, but AFAIK, moh servers don't use tcp ports (at least I never had to open them)
    Woops thats my bad will remove them

    Quote Originally Posted by Zappa View Post
    btw, xcode tags supports dockerfile code: [xcode=docker] or [xcode=dockerfile]
    Cool, i have edited the code block.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •