Giter Site home page Giter Site logo

drpsychick / docker-linuxgsm-ark Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 80 KB

LinuxGSM + Steam ARK server base (shared image for ARK servers)

Dockerfile 14.09% Shell 62.98% Python 22.92%
linuxgsm lgsm ark-server ark docker-image ark-servers steam

docker-linuxgsm-ark's Introduction

Docker image Travis build status DockerHub pulls DockerHub stars license GitHub stars Paypal GitHub Sponsor

DISCONTINUED! see https://github.com/sickHub/arkserver if you're looking for a replacement.

Known & Solved issues:

  • All ARK servers in a cluster MUST run with the same user as they share files on the host system
    • Ideally setup docker with user namespace mapping (--userns-remap), to keep the container user generic (UID=1000) and map it to what you need on the host
  • Each ARK server REQUIRES dedicated ports, because the ports are communicated to the client (docker port mapping will not work!)

Usage:

  • create a docker container (with appropriate mounts, ports and ENV - see below)
  • start/stop the container as you wish
  • BACKUP the _saved and shared_clusters directories when the servers are offline.

Directories:

  • serverfiles contains the dedicated ARK server files (downloaded from steam) and links to the directories below
  • serverfiles_mods contains - what a surprise - steam workshop mods (downloaded from steam)
  • <yourserver>_saved contains the save game, config, logs, ... for your individual ARK server instance : BACKUP!
  • shared_clusters shared directory of clusters where ARK stores survivors to download to a world : BACKUP!

Clusters:

To run a cluster with multiple worlds you need:

  • RAM, a lot of it. Expect to provide at least 5G per server.
  • mount the same shared_clusters directory in each docker container
  • mount individual _saved directories in each docker container
  • use the -clusterid=<clustername> and -NoTransferFromFiltering parameters for ShooterGame in each docker container
  • run two servers, go to a drop/obelisk/Tek+ Transmitter and travel to the other server
  • enjoy!

Helpful commands:

  • look inside: docker run --rm -it --name lgsm-ark --entrypoint /bin/bash drpsychick/linuxgsm-ark
    • from within the container, take lgsm/config-lgsm/arkserver/_default.cfg as a starting point for your arkserver.cfg which you need to put into the _saved directory
    • start the server once with mounted directories and stop it when it is fully available - this will create all config files needed.
    • modify the .ini files (created by ARK during first start) in your serverfiles_saved/Config directory to suit your needs
  • run server with directories mounted, environment variables, ports, ...:
    • --tty is required, see entrypoint.sh of base image
    • RCON_* variables are required for healthcheck to work
    • you need to publish all ports, each server needs his own ports (if you run them on the same IP)
docker run --rm -it --name lgsm-ark --memory=5G --tty \
  --env ARK_MODS="731604991,889745138" \
  --env RCON_PORT=27020 --env RCON_PASS=mypass \
  --publish 7777:7777/udp --publish 7778:7778/udp --publish 27015:27015/udp --publish 27020:27020/tcp \
  --mount type=bind,source=$PWD/serverfiles,target=/home/lgsm/serverfiles \
  --mount type=bind,source=$PWD/serverfiles_mods,target=/home/lgsm/serverfiles_mods \
  --mount type=bind,source=$PWD/testark_saved,target=/home/lgsm/serverfiles_saved \
  --mount type=bind,source=$PWD/shared_clusters,target=/home/lgsm/serverfiles_clusters \
  drpsychick/linuxgsm-ark ./arkserver details

Docker user namespace remap

Settings for the docker HOST

  • first line: map UID/GID 0 within the container to UID/GID 1000 on the host
  • second line: map any UID/GID > 0 within the container to 10000+ on the host
  • both lines: everything within the container runs as user: "hostuser" and group: "hostgroup" on the host
  • Be careful! Before switching an existing docker environment to use --userns-remap, make sure to exclude containers that need --priviledged AND take care of permissions (volumes) of existing containers. Search for more information on the web or on the links below.

/etc/subuid

hostuser:10000:65536

/etc/subgid

hostgroup:10000:65536

Further reading:

docker-linuxgsm-ark's People

Contributors

drpsychick avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wilco20004

docker-linuxgsm-ark's Issues

steamcmd missing on first run

Issue

  • steamcmd is only installed upon when installing the server -> the image no longer has steamcmd installed
  • there is no option to only download steamcmd (in lgsm)

Solution

  • A) activate installation of server again during build -> makes builds much slower
  • B) -> find a way to install steamcmd individually, ideally through lgsm

Fix health check

> docker exec -it ark-extinction python /home/lgsm/rcon.py listplayers
Traceback (most recent call last):
  File "/home/lgsm/rcon.py", line 38, in <module>
    main(host, port, password, args[0])
  File "/home/lgsm/rcon.py", line 11, in main
    rcon = mcrcon.MCRcon()
AttributeError: 'module' object has no attribute 'MCRcon'```

Refactor server directories

  • Logs are stored in serverfiles -> need to symlink for each server
  • AwesomeTeleporters also has some files to backup

Refactor:

  • serverfiles : common base ARK server files
  • serverfiles_mods : common ARK mods
  • serverfiles_clusters : shared directory for ark clusters
  • serverfiles_saved : everything that needs to be backed up per server (subdirectories)
    • Logs
    • SavedArks
    • Config
    • SaveGames
  • serverfiles_config : obsolete

Migration

  • identify old installation: has serverfiles_config and has .ark files in serverfiles_saved
  • mkdir Logs, SavedArks, Config, SaveGames in serverfiles_saved
    • move all files into SavedArks
    • move files from serverfiles_config to Config
    • move Logs and SaveGames to serverfiles_saved
  • symlink all within serverfiles_saved to serverfiles/ShooterGame/Saved

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.