Giter Club home page Giter Club logo

docker-sof2's Introduction

Soldier of Fortune II - Docker Container

Creates a docker container for Soldier of Fortune II. Base game files are copied into the container so the only thing on the host is the mods/configs.

Build

  1. git clone https://github.com/ryanclouser/docker-sof2.git
  2. Copy the base folder from the CDs to the cloned repository.
  3. docker build -t sof2 .

Configuration

  1. Create a folder with the mod name and place the relevant PK3 files inside. (eg. osp or rocmod)
  2. Create a server.cfg config file in this folder. This is where the server related settings will go.

Service

This is an example. Change the paths and mod name as needed.

[Unit]
Description=sof2 server
After=docker.service
Requires=docker.service

[Service]
Type=simple
Restart=always
RestartSec=60
ExecStart=/usr/bin/docker run --name sof2 --rm -p 20100:20100/udp -e "SOF2_GAME=osp" -v /mnt/sof2/osp:/home/docker/osp:rw sof2
ExecStop=/usr/bin/docker stop sof2

[Install]
WantedBy=multi-user.target

Service Run

systemctl daemon-reload
systemctl start sof2.service
systemctl enable sof2.service

Command Run

docker run -it --name sof2 --rm -p 20100:20100/udp -e "SOF2_GAME=MOD" -v /path/to/MOD:/home/docker/MOD:rw sof2

Environment Variables

  • SOF2_CONFIG
    • Config the server should load. Default is server.cfg.
  • SOF2_GAME
    • Sets the fs_game variable. This can be osp, rocmod, etc. depending on what mods you plan to use. By default this is not set to anything.

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.